# 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 data parameter should be provided as a 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:

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 data parameter with the options Dict that is used as the 2nd argument to grecaptcha.enterprise.render.

For this particular example, you should set the properties of data with the following:

Parameter Type Value
theme String dark
s String SLav4jAdHeXxWl3pde6BQttP...V9bQMV12RLQTTbI25b_c6UQ
{
    '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 data .