Javascript 谷歌 reCAPTCHA V3.0 不工作。“网站所有者错误:密钥类型无效”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 
原文地址: http://stackoverflow.com/questions/53108522/
Warning: these are provided under cc-by-sa 4.0 license.  You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Google reCAPTCHA V3.0 not working. "ERROR for site owner: Invalid key type"
提问by Christopher Karam
I can't get the Google reCAPTCHA to work on my Squarespace form. Site Key and Secret Key are both entered correctly. Both domains have been entered as well.
我无法让 Google reCAPTCHA 处理我的 Squarespace 表单。站点密钥和密钥都正确输入。这两个域也已输入。
Both Client Side integration codes have been put into the pages' Header
两个客户端集成代码都已放入页面的标题中
And even after waiting 30 or so minutes, and creating a new set of keys and going over the same process by replacing the old codes, I'm still stuck with this error message, even when accessing the page from another medium.
即使等待了 30 分钟左右,创建了一组新的密钥并通过替换旧代码来完成相同的过程,我仍然被这个错误消息所困扰,即使从其他媒体访问页面时也是如此。
Link to the webpage: https://mydietgoal.com/contact-us
网页链接:https: //mydietgoal.com/contact-us
If anyone has any idea how to integrate V3.0 Captcha into Squarespace it would be really appreciated!
如果有人知道如何将 V3.0 Captcha 集成到 Squarespace 中,将不胜感激!
回答by Christopher Karam
Squarespace form blocks do not support reCAPTCHA V3.0 Site or Secret Keys at the moment. Must stick with V2.0 Keys for the time being.
Squarespace 表单块目前不支持 reCAPTCHA V3.0 站点或密钥。暂时必须坚持使用 V2.0 Keys。
回答by Hunter Wiley
Also, this error will occur if the version (V2 or V3) you have created on the Google reCAPTCHA admin page hereis different than the one you specify in your CDN admin panel (such as Wordpress, Squarespace, etc.).
此外,如果您在此处的 Google reCAPTCHA 管理页面上创建的版本(V2 或 V3)与您在 CDN 管理面板(例如 Wordpress、Squarespace 等)中指定的版本不同,则会发生此错误。
Meaning, if you created a V2 reCAPTCHA in Google reCAPTCHA admin, the keys will be different than if you created a V3. Notice the version on left side. Thus, specifying V3 in the CDN (ie: Wordpress) admin panel of a reCAPTCHA plugin on your site, like shown here, will give 'key type' error. Notice the version options below the keys. Version created in Google must match plugin settings.
这意味着,如果您在Google reCAPTCHA admin 中创建了 V2 reCAPTCHA ,则密钥将与创建 V3 时不同。注意左侧的版本。因此,在CDN指定V3(即:WordPress的),您的网站上的reCAPTCHA插件管理面板,如所示这里,将给予“重点型”的错误。请注意键下方的版本选项。在 Google 中创建的版本必须与插件设置匹配。
回答by Sahan
Downgrade to V2. For some reason. it works for me.
降级到 V2。因为某些原因。这个对我有用。
回答by Webperts.com
Make sure your website would be on the same domain which is registered for reCaptcha, if your website is on testing server or any other domain for sure it will show you error.
确保您的网站与注册 reCaptcha 的域相同,如果您的网站位于测试服务器或任何其他域上,它肯定会显示错误。


