To set your Google Cloud project in the gcloud session, run the gcloud config set project
command. Replace PROJECT_ID with your Google Cloud project ID.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Prepare your environment for reCAPTCHA\n\nThis document shows you how to prepare your environment to set up\nreCAPTCHA.\n\nBefore you begin\n----------------\n\nTo get started with reCAPTCHA, do the following:\n\n1. [Sign up](https://accounts.google.com/) to create a Google Account in the\n [Google Cloud console](https://console.cloud.google.com/security/recaptcha).\n\n2.\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\nEnable the reCAPTCHA Enterprise API\n-----------------------------------\n\n**Note:** To enable and get started with reCAPTCHA on Google Cloud, you don't need to enable billing for your Google Cloud project. However, we recommend enabling billing to ensure that your site remains protected after you exceed the free monthly usage limit of reCAPTCHA. For more information, see [Billing information](/recaptcha/docs/billing-information). \n\n### Console\n\n1. In the Google Cloud console, go to the **reCAPTCHA Enterprise API** page.\n\n [Go to reCAPTCHA Enterprise API](https://console.cloud.google.com/apis/library/recaptchaenterprise.googleapis.com)\n2. Verify that the name of your project appears in the project selector at the top of the page.\n\n If you don't see the name of your project, click the project selector, and then select your project.\n3. Click **Enable**.\n\n### gcloud\n\n1. In the Google Cloud console, activate Cloud Shell.\n\n [Activate Cloud Shell](https://console.cloud.google.com/?cloudshell=true)\n2. To set your Google Cloud project in the gcloud session, run the [`gcloud config set project`](/sdk/gcloud/reference/config/set) command. Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with your Google Cloud project ID. \n\n ```scdoc\n gcloud config set project PROJECT_ID\n \n ```\n3. To enable the reCAPTCHA Enterprise API, run the [`gcloud services enable`](/sdk/gcloud/reference/services/enable) command: \n\n ```text\n gcloud services enable recaptchaenterprise.googleapis.com\n \n ```\n4. To verify that the reCAPTCHA Enterprise API is enabled, run the [`gcloud services list`](/sdk/gcloud/reference/services/list) command: \n\n ```text\n gcloud services list --enabled\n \n ```\n\n Verify that the reCAPTCHA Enterprise API is listed in the list of enabled APIs.\n\nConfigure roles and permissions\n-------------------------------\n\n\nTo get the permissions that\nyou need to set up reCAPTCHA,\n\nask your administrator to grant you the\nfollowing IAM roles on the project:\n\n- [reCAPTCHA Enterprise Admin](/iam/docs/roles-permissions/recaptchaenterprise#recaptchaenterprise.admin) (`roles/recaptchaenterprise.admin`)\n- [reCAPTCHA Enterprise Agent](/iam/docs/roles-permissions/recaptchaenterprise#recaptchaenterprise.agent) (`roles/recaptchaenterprise.agent`)\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nFor more information about the access control for reCAPTCHA, see\n[Access control with IAM](/recaptcha/docs/access-control).\n\nWhat's next\n-----------\n\n- [Understand reCAPTCHA keys](/recaptcha/docs/keys)"]]