---
title: "Change the robot check (reCAPTCHA) setting of sign-up and sign-in"
type: reference
method: POST
path: /rest-api/white-label/sign-up-protection.do
tag: "White Label"
---

# Change the robot check (reCAPTCHA) setting of sign-up and sign-in

`POST https://YOUR-NETWORK-DOMAIN/rest-api/white-label/sign-up-protection.do`

Switches Google reCAPTCHA v2 Invisible on the console's sign-up and Contact Us forms on or off, switches the console sign-in's check after repeated failures on or off (signInEnabled), and sets the network's own key pair and the extra domains a token may come from. A parameter left out keeps its stored value; an empty secretKey keeps the stored secret, and removeOwnKeys=true drops both keys so the platform's are used. A new secret is checked with Google before it is stored. Switching it on needs a key pair: the network's own, or the platform's. Takes effect at once and answers the saved setting, read back like the GET. Requires the WHITE_LABEL admin permission.

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `enabled` | boolean | no | `true` | Ask for reCAPTCHA on the console's sign-up and Contact Us forms |
| `siteKey` | string | no | `6LcAbCdEfGhIjKlMnOpQrStUvWxYz0123456789_` | The network's own reCAPTCHA v2 Invisible site key; empty with removeOwnKeys to use the platform's |
| `secretKey` | string | no | `6LcAbCdEfGhIjKlMnOpQrStUvWxYz9876543210-` | The secret of that key. Write-only: never returned; empty keeps the stored one |
| `hostnames` | string | no | `ads.adnetwork.example, console.adnetwork.example` | Domains besides the console's own a token may be solved on, such as another domain the console is reached by, separated by commas or new lines; subdomains count too |
| `removeOwnKeys` | boolean | no | `false` | Drop the network's own key pair and use the platform's |
| `signInEnabled` | boolean | no | `true` | Ask for reCAPTCHA at console sign-in once a username or an address has failed signInAfterFailures times; uses the same keys and runs whenever a key pair is available |

## Responses

- `200` — {enabled, siteKey, secretKeySet, secretKeyLast4, hostnames, consoleHostnames, platformKeyAvailable, keySource (OWN, PLATFORM or NONE), active, signInEnabled, signInActive, signInAfterFailures, signInWindowMinutes}
- `400` — Field errors under 'errors': a malformed key (errors.siteKey, errors.secretKey), only one of the two keys (errors.siteKey or errors.secretKey), a secret Google refuses or could not be asked about (errors.secretKey), something that is not a domain or more than 50 domains (errors.hostnames), or switching on with no key pair at all (errors.enabled)
- `401` — Authentication error
- `403` — Insufficient permissions, naming the missing one

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/white-label/sign-up-protection.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'enabled=true' \
  --data-urlencode 'siteKey=6LcAbCdEfGhIjKlMnOpQrStUvWxYz0123456789_' \
  --data-urlencode 'secretKey=6LcAbCdEfGhIjKlMnOpQrStUvWxYz9876543210-'
```

Source: https://epom.com/ad-server/docs/api/white-label/post-white-label-sign-up-protection