Skip to content

Invalid API key when using Enterprise #414

@ephracis

Description

@ephracis

Hi,

I am trying to figure out how to configure this gem for Enterprise reCaptcha.

First issue I ran into was that it seems like one needs to specify config.site_key, even when using enterprise. Should this be the same as config.enterprise_api_key? If so, it seems weird to specify the same data twice.

Next issue is that my recaptcha_reply states:

{
  "error"=>{
    "code"=>400, 
    "message"=>"API key not valid. Please pass a valid API key.", 
    "status"=>"INVALID_ARGUMENT", 
    "details"=>[
      {
        "@type"=>"type.googleapis.com/google.rpc.ErrorInfo", 
        "reason"=>"API_KEY_INVALID", 
        "domain"=>"googleapis.com", 
        "metadata"=>{
          "service"=>"recaptchaenterprise.googleapis.com"
        }
      }
    ]
  }
}

I have tried using both the name of the key (that I chose), and the key ID (which was generated and is used in Googles example JS snippet), but I get the same error for both: Invalid API key.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions