Quickstart: Setting up reCAPTCHA Enterprise on non-Google Cloud environments using API Keys
This quickstart guides you how to set up reCAPTCHA Enterprise on a non-Google Cloud environment by using the API Keys for authentication in the following scenarios:
- You are using reCAPTCHA Enterprise in a cloud other than Google Cloud, CRM, or SaaS environment that does not support external authentication methods such as service accounts.
You need to use the
v1beta1endpoint to satisfy the following requirements in your environment:
- Your environment requires preview and Early Access Program (EAP) features, such as Multi-factor Authentication (MFA) or password leak detection.
- Your environment does not need Role-Based Access Control (RBAC).
Before you begin
In the Google Cloud Console, on the project selector page, select or create a Google Cloud project.
Make sure that billing is enabled for your Cloud project. Learn how to confirm that billing is enabled for your project.
reCAPTCHA Enterprise requires billing to be linked and enabled on the project to access the API. You can enable billing by using either a credit card or an existing Google Cloud project billing ID. If you require assistance with billing, contact the Cloud Billing Support.
Enabling the reCAPTCHA Enterprise API
In the Cloud Console, go to the reCAPTCHA Enterprise API page.
Verify that the name of your project appears in the project selector at the top of the page.
If you don't see the name of your project, click the project selector, then select your project.
- Click Enable.
- To set your Google Cloud project in the gcloud session, run the
gcloud config set projectcommand. Replace PROJECT_ID with your Google Cloud project ID.
gcloud config set project PROJECT_ID
- To enable the reCAPTCHA Enterprise API, run the
gcloud services enablecommand:
gcloud services enable recaptchaenterprise.googleapis.com
- To verify that the reCAPTCHA Enterprise API is enabled, run the
gcloud services listcommand:
gcloud services list --enabled
Verify that the reCAPTCHA Enterprise API is listed in the list of enabled APIs.
Creating an API key
Create an API key in your Google Cloud project:
In the Cloud Console, go to the Credentials page.
ClickCreate credentials, and then select API key.
Optionally, click Restrict key to restrict and rename the API key.
Using the API Key for backend authentication
Use the API Key that you created with the
v1beta1 endpoint when
creating an assessment.
- Decide what type of reCAPTCHA (site) key to use and create a reCAPTCHA key.
Interpret an assessment and take an appropriate action for your site based on the score.