# Method: getRecaptchaConfig

- [HTTP request](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#body.HTTP_TEMPLATE)
- [Query parameters](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#body.request_body)
- [Response body](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#body.RecaptchaConfig.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#body.aspect)
- [RecaptchaEnforcementState](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#RecaptchaEnforcementState)
  - [JSON representation](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#RecaptchaEnforcementState.SCHEMA_REPRESENTATION)
- [RecaptchaProvider](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#RecaptchaProvider)
- [EnforcementState](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#EnforcementState)
- [Try it!](https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#try-it)

Gets parameters needed for reCAPTCHA analysis.

### HTTP request

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

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Query parameters

| Parameters ||
|---|---|
| `tenantId` | `string` The id of a tenant. |
| `clientType` | ``enum (`https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/ClientType`)`` reCAPTCHA Enterprise uses separate site keys for different client types. Specify the client type to get the corresponding key. |
| `version` | ``enum (`https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/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 (`https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#RecaptchaEnforcementState`) } ], "recaptchaKey": string, "useSmsBotScore": boolean, "useSmsTollFraudProtection": boolean } ``` |

| Fields ||
|---|---|
| `recaptchaEnforcementState[]` | ``object (`https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#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](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

## RecaptchaEnforcementState

Enforcement states for reCAPTCHA protection.

| JSON representation |
|---|
| ``` { "provider": enum (`https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#RecaptchaProvider`), "enforcementState": enum (`https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#EnforcementState`) } ``` |

| Fields ||
|---|---|
| `provider` | ``enum (`https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#RecaptchaProvider`)`` The provider that has reCAPTCHA protection. |
| `enforcementState` | ``enum (`https://docs.cloud.google.com/identity-platform/docs/reference/rest/v2/TopLevel/getRecaptchaConfig#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. |