# reCAPTCHA Enterprise

### Formatting reCAPTCHA Enterprise payload for Token API.

You may be required to provide extra data to solve reCAPTCHA Enterprise via Token API.

The [!badge variant="primary" text="data"] parameter should be provided as a [!badge variant="danger" text="Dict"].

This guide shows you how to format this value.

---

Let's take a look at an example.

On this example site, you can find the following piece of code that renders reCAPTCHA Enterprise:

```js
function RenderRecaptcha(parent_sel, gid, sitekey, s) {
    const render_div_id = 'recaptcha_render_' + gid;
    $J(parent_sel).append('<div id="' + render_div_id + '"></div>');
    const options = {
        'sitekey': sitekey,
        'theme': 'dark',
        'callback': function(n){},
        's': s
    };
    g_recaptchaInstance = grecaptcha.enterprise.render(render_div_id, options);
}

RenderRecaptcha(
    '#captcha_entry_recaptcha',
    3532539834320993603,
    '6LdIFr0ZAAAAAO3vz0O0OQrtAefzdJcWQM2TMYQH',
    'SLav4jAdHeXxWl3pde6BQttP...V9bQMV12RLQTTbI25b_c6UQ'
);
```

Set the [!badge variant="primary" text="data"] parameter with the `options` [!badge variant="danger" text="Dict"] that is used as the 2nd argument to `grecaptcha.enterprise.render`.

For this particular example, you should set the properties of [!badge variant="primary" text="data"] with the following:

Parameter                               | Type                                     | Value { class="compact" }
:---                                    | :---:                                    | :---
[!badge variant="primary" text="theme"] | [!badge variant="success" text="String"] | `dark`
[!badge variant="primary" text="s"]     | [!badge variant="success" text="String"] | `SLav4jAdHeXxWl3pde6BQttP...V9bQMV12RLQTTbI25b_c6UQ`

!!!
`sitekey` is omitted because it is already a required parameter for `POST https://api.nopecha.com/token/`.

`callback` is omitted because it is irrelevant for solving the reCAPTCHA Enterprise.
!!!

=== Example Request with reCAPTCHA Enterprise
```js POST https://api.nopecha.com/token/
{
    'key': 'MY_NOPECHA_KEY',
    'type': 'recaptcha2',
    'sitekey': '6LdIFr0ZAAAAAO3vz0O0OQrtAefzdJcWQM2TMYQH',
    'url': 'https://store.example.com/join/',
    'enterprise': true,
    'data': {
        'theme': 'dark',
        's': 'SLav4jAdHeXxWl3pde6BQttP...V9bQMV12RLQTTbI25b_c6UQ'
    }
}
```
===

If you find other properties passed to `grecaptcha.enterprise.render` that is not covered above, you should list them all in [!badge variant="primary" text="data"].

For more information, see our API Reference for [reCAPTCHA v2](https://nopecha.com/api-reference/#postRecaptcha2Token) and [reCAPTCHA v3](https://nopecha.com/api-reference/#postRecaptcha3Token).
