# Enable reCAPTCHA to Protect Against Automated Abuse

We have decided to enable Google's reCAPTCHA to protects you against spam and other types of automated abuse from making verification requests, especially using SMS or WhatsApp as it will cause you to lose money from sending these messages.

## Enabling Google reCAPTCHA

reCAPTCHA is now available for the [JavaScript SDK](/sdk-reference/web/web-sdk-verify-email-phone.md). We are using [invisible Google reCAPTCHA v2](https://developers.google.com/recaptcha/docs/invisible). This means that the reCAPTCHA prompt will be automatically triggered when the user press "Login", and if Google has suspicions about this request, it may prompt the user to solve some puzzle. Here's how it looks:

![reCAPTCHA using Cotter's JS SDK](/files/-M6IDwN56_baF7yJq50j)

### Step 1: To show the reCAPTCHA in your website, enable it in the dashboard:

Go to Settings > Branding > Magic Link Form or OTP Verification Form > Phone Number

![Captcha settings can only be enabled for Phone Number verification](/files/-MBMP8YU5UDdl-eQeF0M)

#### Adjust your container `div` to fit the reCAPTCHA prompt:

**Option 1:** Set the container `div` to at least `530px` high, `300px` wide.

```markup
<div
    id="cotter-container-signup"
    style="width: 300px; height: 530px"
></div>
```

**Option 2:** Allow scrolling.

```markup
<div
    id="cotter-container-signup"
    style="overflow: scroll; width: 300px; height: 300px;"
></div>
```

### Step 2: To Require valid reCAPTCHA, update Rules in your dashboard

Under **Rules**, turn on Captcha Required:

![Require Captcha for Email/Phone Number verification](/files/-M6IEy5tQkGMcrbRSvZh)

Note that **any verification request for email/phone number will require a valid reCAPTCHA token.**

## See reCAPTCHA in action

To test how reCAPTCHA looks like:

#### Step 1: Inspect element and click Toggle Device Toolbar

![Inspect Element > Toggle Device Toolbar](/files/-M6IHdRF7mWZPM-QZZI_)

#### Step 2: Click the dropdown to select a device and click Edit&#x20;

![Select from the Dropdown and click Edit](/files/-M6II5Mn8j1-UMVBrAvh)

#### Step 3: Add a custom device and name it Googlebot/2.1

![Add a custom device called Googlebot/2.1](/files/-M6IIXq2uNyxDEd1jvfu)

From now on, if you're using this emulated device, you will be prompted to solve the reCAPTCHA.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cotter.app/protecting-your-account/enable-recaptcha-to-protect-against-automated-abuse.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
