Text of docs.cloud.google.com › recaptcha › docs › create-key-mobile as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Create reCAPTCHA keys for mobile applications | Google Cloud Fraud Defense | Google Cloud Documentation

Skip to main content Console English Deutsch Español Español – América Latina Français Indonesia Italiano Português Português – Brasil עברית 中文 – 简体 中文 – 繁體 日本語 한국어 Sign in Google Cloud Fraud Defense Start free reCAPTCHA is a part of Google Cloud Fraud Defense. For more information, see Google Cloud Fraud Defense . Home Documentation Security Google Cloud Fraud Defense Guides Create reCAPTCHA keys for mobile applications Stay organized with collections Save and categorize content based on your preferences.

Mobile keys in reCAPTCHA let you configure application identity and risk parameters for Android and iOS deployments. Create dedicated mobile keys to help secure client-server communication and prevent automated bot traffic in mobile applications. reCAPTCHA keys represent how reCAPTCHA is configured for a mobile application. Before you begin Prepare your environment for Google Cloud Fraud Defense . Ensure that you have the following Identity and Access Management role: reCAPTCHA Enterprise Admin ( roles/recaptchaenterprise.admin ).

Create a reCAPTCHA key You can create only score-based keys for mobile applications. We recommend the following when creating reCAPTCHA keys for mobile applications: Create one reCAPTCHA key for each mobile application. For Android, create separate keys for the following scenarios: Android package is only available on the Google Play Store. Android package is only available on non-Google Play Store app stores. Create separate reCAPTCHA keys for staging and production environments.

Otherwise, you risk polluting reCAPTCHA risk analysis with data from your test environment. The simplest way to create a reCAPTCHA key is through the Google Cloud console. Alternatively, you can use the reCAPTCHA Enterprise API or the Google Cloud CLI. Console In the Google Cloud console, go to the Google Cloud Fraud Defense page. Go to Google Cloud Fraud Defense Verify that the name of your project appears in the resource selector at the top of the page.

If you don't see the name of your project, click the resource selector, then select your project. Select the Keys tab. Click Create key . In the Display name field, enter a display name for the key. Depending on the type of reCAPTCHA key you want to create for your mobile application, perform the appropriate action: Create reCAPTCHA keys for iOS applications We recommend creating one reCAPTCHA key per iOS application.

For the Application type , select iOS . In the iOS bundle ID list section, click Add iOS bundle ID . In the Bundle ID field, enter the name of your iOS bundle ID. Optional: To add an additional bundle ID, click Add iOS bundle ID and enter the name of your iOS bundle ID in the Bundle ID field. To protect the reCAPTCHA key for your bundle IDs, ensure that the Disable bundle ID verification toggle is turned off. If you disable bundle ID verification, you must verify the tokenProperties.iosBundleId field in the assessments you create.

Optional: Provide Apple Developer settings . We recommend providing this data because it allows Fraud Defense to provide more accurate risk scores for your traffic. Enter the following information: Private key (.p8) : This is generated in the Apple Developer Center under Certificates, Identifiers & Profiles. Key identifier : The Apple developer key identifier (10-character string). Team ID : The Apple team ID (10-character string) owning the provisioning profile that is used to build your application.

Optional: Click Next Step (optional) . For your non-production environment, if you want to specify a score that you want the key to return when any assessments are created for it, do the following: In Additional settings , click the Are you creating this key for testing purposes only? toggle. Use the Set score slider to specify a score between 0 to 1.0. Click Create key . The newly created key is listed on the reCAPTCHA keys page.

Create reCAPTCHA keys for Android applications For the Application type , select Android . In the Android package list section, click Add Android package . In the Android package field, enter the name of your Android package. Optional: To add an additional package, click Add Android package and enter the name of another Android package in the Android package field. To enforce that reCAPTCHA key is only used within your app, turn off the Disable package name verification toggle.

If you disable package name verification, you must verify the tokenProperties.androidPackageName field in the assessments you create. If you want to create a key for an application that is available on other app stores in addition to the Google Play Store, turn on Support applications distributed outside of the Google Play Store . Optional: Click Next Step (optional) . For your non-production environment, if you want to specify a score that you want the key to return when any assessments are created for it, do the following: In Additional settings , click the Are you creating this key for testing purposes only? toggle.

Use the Set score slider to specify a score between 0 to 1.0. Click Create key . The newly created key is listed on the reCAPTCHA keys page. gcloud (iOS) To create reCAPTCHA keys, use the gcloud recaptcha keys create command. Before using any of the command data below, make the following replacements: DISPLAY_NAME : Name for the key. Typically a site name. BUNDLE_IDs : iOS bundle ids of apps allowed to use the key. Specify multiple bundle IDs as a comma-separated list.

Execute the gcloud recaptcha keys create command: Linux, macOS, or Cloud Shell gcloud recaptcha keys create \ --display-name = DISPLAY_NAME \ --ios --bundle-ids = BUNDLE_IDs Windows (PowerShell) gcloud recaptcha keys create ` --display-name = DISPLAY_NAME ` --ios --bundle-ids = BUNDLE_IDs Windows (cmd.exe) gcloud recaptcha keys create ^ --display-name = DISPLAY_NAME ^ --ios --bundle-ids = BUNDLE_IDs The response contains the newly created reCAPTCHA key. gcloud (Android) To create reCAPTCHA keys, use the gcloud recaptcha keys create command.

Before using any of the command data below, make the following replacements: DISPLAY_NAME : Name for the key. Typically a site name. PACKAGE_NAMES : Android package names of apps allowed to use the key. Specify multiple package names as a comma-separated list. Execute the gcloud recaptcha keys create command: Linux, macOS, or Cloud Shell gcloud recaptcha keys create \ --display-name = DISPLAY_NAME \ --android --package-names = PACKAGE_NAMES Windows (PowerShell) gcloud recaptcha keys create ` --display-name = DISPLAY_NAME ` --android --package-names = PACKAGE_NAMES Windows (cmd.exe) gcloud recaptcha keys create ^ --display-name = DISPLAY_NAME ^ --android --package-names = PACKAGE_NAMES The response contains the newly created reCAPTCHA key.

REST (iOS) Before using any of the request data, make the following replacements: DISPLAY_NAME : Name for the key. Typically an app name. BUNDLE_IDs : iOS bundle ids of apps allowed to use the key. Specify multiple bundle IDs as a comma-separated list. HTTP method and URL: POST https://recaptchaenterprise.googleapis.com/v1/projects/ PROJECT_ID /keys Request JSON body: { "displayName": " DISPLAY_NAME ", "iosSettings": { "allowedBundleIds":" BUNDLE_IDs " } } To send your request, choose one of these options: curl Save the request body in a file named request.json , and execute the following command: curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ -d @request.json \ "https://recaptchaenterprise.googleapis.com/v1/projects/ PROJECT_ID /keys" PowerShell Save the request body in a file named request.json , and execute the following command: $cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method POST ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -InFile request.json ` -Uri "https://recaptchaenterpris

The rest of this page is on the live site.