Method: getRecaptchaConfig

Gets parameters needed for reCAPTCHA analysis.

HTTP request

GET https://identitytoolkit.googleapis.com/v2/recaptchaConfig

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
tenantId

string

The id of a tenant.

clientType

enum (ClientType)

reCAPTCHA Enterprise uses separate site keys for different client types. Specify the client type to get the corresponding key.

version

enum (RecaptchaVersion)

The reCAPTCHA version.

Request body

The request body must be empty.

Response body

Configuration for reCAPTCHA

If successful, the response body contains data with the following structure:

JSON representation
{
  "recaptchaEnforcementState": [
    {
      object (RecaptchaEnforcementState)
    }
  ],
  "recaptchaKey": string,
  "useSmsBotScore": boolean,
  "useSmsTollFraudProtection": boolean
}
Fields
recaptchaEnforcementState[]

object (RecaptchaEnforcementState)

The reCAPTCHA enforcement state for the providers that GCIP supports reCAPTCHA protection.

recaptchaKey

string

The reCAPTCHA Enterprise key resource name, e.g. "projects/{project}/keys/{key}". This will only be returned when the reCAPTCHA enforcement state is AUDIT or ENFORCE on at least one of the reCAPTCHA providers.

useSmsBotScore

boolean

Whether to use the rCE bot score for reCAPTCHA phone provider.

useSmsTollFraudProtection

boolean

Whether to use the rCE sms toll fraud protection risk score for reCAPTCHA phone provider.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/identitytoolkit
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

RecaptchaEnforcementState

Enforcement states for reCAPTCHA protection.

JSON representation
{
  "provider": enum (RecaptchaProvider),
  "enforcementState": enum (EnforcementState)
}
Fields
provider

enum (RecaptchaProvider)

The provider that has reCAPTCHA protection.

enforcementState

enum (EnforcementState)

The reCAPTCHA enforcement state for the provider.

RecaptchaProvider

The GCIP providers that support reCAPTCHA protection.

Enums
RECAPTCHA_PROVIDER_UNSPECIFIED reCAPTCHA provider not specified
EMAIL_PASSWORD_PROVIDER Email password provider
PHONE_PROVIDER Phone auth provider

EnforcementState

Enforcement states for reCAPTCHA protection per provider.

Enums
ENFORCEMENT_STATE_UNSPECIFIED Enforcement state has not been set.
OFF Unenforced.
AUDIT reCAPTCHA assessment is created, result is not used to enforce.
ENFORCE reCAPTCHA assessment is created, result is used to enforce.