簡體   English   中英

Google reCAPTCHA 錯誤:提供的雲項目編號不擁有給定的 reCAPTCHA 密鑰

[英]Google reCAPTCHA error: The provided cloud project number does not own the given recaptcha key

我正在嘗試在我的 rails 項目中使用 google ReCaptcha 企業,但出現此錯誤:

{"error"=>{"code"=>403, "message"=>"The provided cloud project number does not own the given recaptcha key", "status"=>"PERMISSION_DENIED"}}

我有的:

  • 我的項目ID,我是從ID欄下的項目列表中得到的
  • reCAPTCHA 密鑰(站點密鑰)和在 reCAPTCHA Enterprise 面板中創建的域
  • An API Key created here https://console.cloud.google.com/apis/credentials , Application restrictions: none, API restrictions: reCAPTCHA Enterprise API

我將數據發布到此端點: https://recaptchaenterprise.googleapis.com/v1beta1/projects/#{project_id}/assessments?key=#{API_key}

請求的正文是:

{
    event:
    {
        token: response_token,
        siteKey: site_key,
        userIpAddress: domain
    }
}

正如 OP 在評論部分確認的那樣,問題的根本原因是錯誤的enterprise key

你是對的,我在客戶端使用 v3 站點密鑰,這意味着 response_token 是錯誤的。 我忘了通過企業密鑰更新客戶端。 謝謝大佬,現在可以了

錯誤The provided cloud project number does not own the given recaptcha key ,表示該密鑰不匹配。 當 OP 更新client-side密鑰時,它開始工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM