In the Principal column, find all rows that identify you or a group that
you're included in. To learn which groups you're included in, contact your
administrator.
For all rows that specify or include you, check the Role column to see whether
the list of roles includes the required roles.
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-17。"],[],[],null,["# Test reCAPTCHA in a demo website\n================================\n\nThis document shows you how to deploy a demo website on Google Cloud, which is a\nsample website integrated with reCAPTCHA, to\nunderstand how reCAPTCHA works.\n\nA demo website helps you do the following:\n\n- Understand your users' experience with reCAPTCHA.\n- Use as a reference to integrate reCAPTCHA in your own application.\n- Experiment with different frontend and backend approaches by editing the sample application source code.\n\nYou can deploy a demo website in one of the following languages: Java,\nNode.js, or Python.\n\nFor a Google Cloud project, you can deploy only one demo website at\na time.\n| **Note:** When you deploy a demo website, it is deployed on your Cloud Shell VM. The demo site is visible only to you and not to the other members of the project.\n\nBefore you begin\n----------------\n\n1.\n\n\n In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n\n \u003cbr /\u003e\n\n2.\n\n\n Enable the reCAPTCHA Enterprise API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=recaptchaenterprise.googleapis.com)\n\n \u003cbr /\u003e\n\n3.\n\n\n Make sure that you have the following role or roles on the project:\n\n reCAPTCHA Enterprise Admin, reCAPTCHA Enterprise Agent\n\n #### Check for the roles\n\n 1.\n In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/projectselector/iam-admin/iam?supportedpurview=project)\n 2. Select the project.\n 3.\n In the **Principal** column, find all rows that identify you or a group that\n you're included in. To learn which groups you're included in, contact your\n administrator.\n\n 4. For all rows that specify or include you, check the **Role** column to see whether the list of roles includes the required roles.\n\n #### Grant the roles\n\n 1.\n In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/projectselector/iam-admin/iam?supportedpurview=project)\n 2. Select the project.\n 3. Click person_add **Grant access**.\n 4.\n In the **New principals** field, enter your user identifier.\n\n This is typically the email address for a Google Account.\n\n 5. In the **Select a role** list, select a role.\n 6. To grant additional roles, click add **Add\n another role** and add each additional role.\n 7. Click **Save**.\n\n \u003cbr /\u003e\n\n4. If you have previously deployed a demo website, delete the relevant\n demo key.\n\nDeploy a demo website\n---------------------\n\n1. In the Google Cloud console, go to the demo website page.\n\n [Go to demo website](https://console.cloud.google.com/security/recaptcha/demo)\n2. In the **Language** list, select a language.\n\n The entire deployment process might take about 1 minute.\n3. If prompted, authorize Cloud Shell to make calls using your\n credentials.\n\n4. To navigate to your new demo **Key details** page, click **View site**.\n\n5. To view the demo website, in the **Frontend** card, click\n **View sample web page**.\n\n The demo website opens in a separate tab.\n6. To learn the patterns for integrating\n reCAPTCHA with your website, click through the examples.\n\n7. If you want to make changes to the demo website, do the following:\n\n 1. In the **Key details** page, click **Edit source**.\n 2. In the Cloud Shell Editor, find the required files in the\n **Explorer** and edit them as required.\n\n The saved changes to the source code get reloaded into the demo\n website.\n\n Don't close the Cloud Shell Editor because it closes\n Cloud Shell and stops the demo website.\n\n| **Warning:** Don't use the demo key in a production environment because its configuration is specific to demo environments. For instructions to create a new key, see [Create reCAPTCHA keys for websites](/recaptcha/docs/create-keys-websites).\n\nWhat's next\n-----------\n\n- [Get started with reCAPTCHA](/recaptcha/docs/implementation-workflow)."]]