开发者指南
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Google 提供 reCAPTCHA(v3 和 v2)和 reCAPTCHA Enterprise,
免受欺诈活动、垃圾内容和滥用行为的侵扰。如需详细了解
reCAPTCHA 和 reCAPTCHA Enterprise 的功能比较,请参阅 reCAPTCHA 版本之间的功能比较。
本文档简要介绍了 Google reCAPTCHA v3 和 v2。对于
请参阅
reCAPTCHA Enterprise 文档。
如需开始使用 reCAPTCHA Enterprise,您可以使用我们的
网站注册工具。这个
工具会帮助您创建新的 reCAPTCHA 网站密钥,如果需要,
新的 Google Cloud 账号。
开始使用
受众群体
本文档适用于熟悉 HTML 表单、服务器端处理或移动应用开发的人员。如需安装 reCAPTCHA,您可能需要修改一些代码。
我们希望本文档易于理解。您可以在
Stack Overflow,使用标记 recaptcha
。
概览
要开始使用 reCAPTCHA,您需要注册 API 密钥
“配对”。密钥对由网站密钥和
密钥。网站密钥用于在您的网站或移动应用中调用 reCAPTCHA 服务。通过
密钥可授权应用后端与 reCAPTCHA 服务器之间的通信,
验证用户的回复。密钥需要妥善保存
安全目的。
首先,选择 reCAPTCHA 类型,然后填写已获授权的网域或软件包名称。在您之后
已接受服务条款,请点击注册以获取新的 API 密钥对。
现在,请执行以下步骤,将 reCAPTCHA 添加到您的网站或移动应用:
- 选择客户端集成:
- 验证用户的回答。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-18。
[null,null,["最后更新时间 (UTC):2024-09-18。"],[[["\u003cp\u003eGoogle reCAPTCHA helps protect your website from spam, abuse, and fraudulent activities with v3, v2, and Enterprise options.\u003c/p\u003e\n"],["\u003cp\u003eTo use reCAPTCHA, you'll need to sign up for an API key pair (site key and secret key) and integrate it into your website or mobile application.\u003c/p\u003e\n"],["\u003cp\u003ereCAPTCHA offers different integration options including v3, v2 (checkbox, invisible), and Android, allowing you to choose the best fit for your needs.\u003c/p\u003e\n"],["\u003cp\u003eThis documentation is intended for developers familiar with HTML, server-side processing, or mobile application development and requires code edits for installation.\u003c/p\u003e\n"]]],["Google offers reCAPTCHA v3, v2, and reCAPTCHA Enterprise to protect against fraud and spam. To begin, register for an API key pair (site and secret keys) using the Site Registration Tool. Choose a reCAPTCHA type and provide authorized domains or package names. Integrate reCAPTCHA on the client-side, selecting from v3, v2 checkbox, invisible, or Android options. Finally, verify the user's response by authorizing communication with the reCAPTCHA server using the secret key.\n"],null,["# Developer's Guide\n\nGoogle offers reCAPTCHA (v3 and v2) and reCAPTCHA Enterprise to help you protect\nyour sites from fraudulent activities, spam, and abuse. To know more about the\nfeatures of reCAPTCHA and reCAPTCHA Enterprise, see [Comparison of features between reCAPTCHA versions](https://cloud.google.com/recaptcha/docs/compare-tiers).\n\nThis document provides an overview of Google reCAPTCHA v3 and v2. For\ninformation about reCAPTCHA Enterprise, see the\n[reCAPTCHA Enterprise documentation](https://cloud.google.com/recaptcha/docs/overview).\n\nTo get started with reCAPTCHA Enterprise, you can use our\n[Site Registration Tool](https://www.google.com/recaptcha/admin/create). This\ntool will help you create a new reCAPTCHA Site Key, and if needed also create a\nnew Google Cloud account.\n\n[Get Started](https://www.google.com/recaptcha/admin/create)\n\nAudience\n--------\n\nThis documentation is designed for people familiar with HTML forms, server-side processing or mobile\napplication development. To install reCAPTCHA, you might need to edit some code.\n\nWe hope you find this documentation easy to follow. You can ask a question about reCAPTCHA on\n[Stack Overflow](https://stackoverflow.com/questions/tagged/recaptcha), using the tag `recaptcha`.\n\nOverview\n--------\n\nTo start using reCAPTCHA, you need to [sign up for an API key\npair](http://www.google.com/recaptcha/admin) for your site. The key pair consists of a site key and\nsecret key. The site key is used to invoke reCAPTCHA service on your site or mobile application. The\nsecret key authorizes communication between your application backend and the reCAPTCHA server to\n[verify the user's response](/recaptcha/docs/verify). The secret key needs to be kept safe for\nsecurity purposes.\n\nFirst, choose the [type of reCAPTCHA](/recaptcha/docs/versions) and then fill in authorized domains\nor [package\nnames.](https://developer.android.com/guide/topics/manifest/manifest-element.html#package) After you\nhave accepted the terms of service, click **Register** to get new API key pair.\n\nNow, perform the following steps to add reCAPTCHA to your site or mobile application:\n\n1. Choose the client-side integration:\n - [reCAPTCHA v3](/recaptcha/docs/v3)\n - reCAPTCHA v2\n - [Checkbox](/recaptcha/docs/display)\n - [Invisible](/recaptcha/docs/invisible)\n - [Android](https://developer.android.com/training/safetynet/recaptcha.html)\n2. [Verify the user's response](/recaptcha/docs/verify)."]]