Skip to main content
Are you experiencing issues obtaining the token?
Contact support

RecaptchaV2EnterpriseTask

Recaptcha Enterprise
$1 / 1000 tokens
97%
Recaptcha Enterprise (Spotify, Yahoo)
$4 / 1000 tokens
98%

The object contains data for Google reCAPTCHA Enterprise solving task. To provide solid universality for solving this type of task we have reproduce every piece of environment used for an automation task you plan to complete. Including, proxy access, browser's user-agent, cookies (optionally).

This type of captcha has no visual differences from ReCaptcha v.2, you can see the difference using the captcha code, for example in developer tools under the Network tab in Queries:

Request URL (anchor): https://www.google.com/recaptcha/enterprise/anchor?ar=1&k=6Lf26sUnAAAAAIKLuWNYgRsFUfmI-3Lex3xT5N-s&co=aHR0cHM6Ly8yY2FwdGNoYS5jb206NDQz&hl=en&v=1kRDYC3bfA-o6-tsWzIBvp7k&size=normal&cb=43r1q2d3mx66

This type of captcha might be solved a bit longer than usual image captcha, but this issue is compensated by the fact that g-captcha-response value we send to you is valid for the next 60 seconds after we solves your ReCaptcha2.

Attention!

If the proxy is authorized by IP, then be sure to add 116.203.55.208 to the white list.

Request parameters

type<string>required

RecaptchaV2EnterpriseTaskProxyless


websiteURL<string>required

Address of a webpage with Google ReCaptcha Enterprise.


websiteKey<string>required

Recaptcha website key.
<div class="g-recaptcha" data-sitekey="THIS_ONE"></div>
or <iframe title="reCAPTCHA" src="...;k=6LdIFr0ZAAAAAO3vz0O0OQrtAefzdJcWQM2TMYQH&amp;... , where 6LdIFr0ZAAAAAO3vz0O0OQrtAefzdJcWQM2TMYQH - websiteKey


enterprisePayload<string>optional

Some implementations of the reCAPTCHA Enterprise widget may contain additional parameters that are passed to the “grecaptcha.enterprise.render” method along with the sitekey. For example: <pre lang="js" ><code>grecaptcha.enterprise.render("some-div-id", { sitekey: "6Lc_aCMTAAAAABx7u2N0D1XnVbI_v6ZdbM6rYf16" theme: "dark" s: "2JvUXHNTnZl1Jb6WEvbDyB...ugQA" });</code></pre>


apiDomain<string>optional

Domain address from which to load reCAPTCHA Enterprise. For example:
- www.google.com
- www.recaptcha.net

Don't use a parameter if you don't know why it's needed.


userAgent<string>optional

Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser".


cookies<string>optional

Additional cookies which we must use during interaction with target page or Google.
Format: cookiename1=cookievalue1; cookiename2=cookievalue2

For enterprisePayload - before calling it, you need to replace the grecaptcha.enterprise.render function with your own and take the value from its parameters. The function exists after loading the script, and the captcha is usually rendered immediately or based on a page event. If the captcha is rendered with the current field s on the client, then the token will most likely not be accepted. The original function can be called without the s field.

apiDomain is the domain that hosts the API interface for interacting with reCAPTCHA, it is used to verify that the user passes the captcha.

Script
var __test_grc = undefined;

var __test_enterprise = undefined;

var __test_render = undefined;

var __test_render_widget = undefined;

var __test_render_args = undefined; // here will be the object with which render is called.

var __test_handler = {
get: function(target, name, receiver) {
if (name == 'enterprise') {
return __test_enterprise ? __test_enterprise : (__test_enterprise = new Proxy(target[name], __test_handler));
} else if (name == 'render') {
__test_render = target[name];
return (function(a, b) {
__test_render_args = b;
__test_render_widget = a;
return __test_render(a, {sitekey: b.sitekey}); });
} else {
return target[name];
}
}
};

Object.defineProperty(window, 'grecaptcha', {
enumerable: true,
configurable: false,
get: function() {
return __test_grc;
},
set: function(value) {
__test_grc = new Proxy(value, __test_handler);
}
});

Create task method

POST
https://api.capmonster.cloud/createTask

Request

{
"clientKey":"API_KEY",
"task": {
"type":"RecaptchaV2EnterpriseTaskProxyless",
"websiteURL":"https://mydomain.com/page-with-recaptcha-enterprise",
"websiteKey":"6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd",
"enterprisePayload": {
"s": "SOME_ADDITIONAL_TOKEN"
}
}
}

Response

{
"errorId":0,
"taskId":407533072
}

Get task result method

Use the getTaskResult method to request answer for ReCaptcha2. You will get response within 10 - 80 sec period depending on service workload.

POST
https://api.capmonster.cloud/getTaskResult

Request

{
"clientKey":"API_KEY",
"taskId": 407533072
}

Response

{
"errorId":0,
"status":"ready",
"solution": {
"gRecaptchaResponse":"3AHJ_VuvYIBNBW5yyv0zRYJ75VkOKvhKj9_xGBJKnQimF72rfoq3Iy-DyGHMwLAo6a3"
}
}

PropertyTypeDescription
gRecaptchaResponseStringHash which should be inserted into Recaptcha2 submit form in <textarea id="g-recaptcha-response" ..></textarea>. It has a length of 500 to 2190 bytes.

Use SDK Library

// https://github.com/ZennoLab/capmonstercloud-client-js

import { CapMonsterCloudClientFactory, ClientOptions, RecaptchaV2EnterpriseProxylessRequest, /*RecaptchaV2EnterpriseRequest*/ } from '@zennolab_com/capmonstercloud-client';

document.addEventListener('DOMContentLoaded', async () => {
const cmcClient = CapMonsterCloudClientFactory.Create(new ClientOptions({ clientKey: '<your capmonster.cloud API key>' }));
console.log(await cmcClient.getBalance());

const recaptchaV2EnterpriseRequest = new RecaptchaV2EnterpriseProxylessRequest({
websiteURL: 'https://mydomain.com/page-with-recaptcha-enterprise',
websiteKey: '6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd',
enterprisePayload: {
s: 'SOME_ADDITIONAL_TOKEN',
},
});

// const recaptchaV2EnterpriseRequest = new RecaptchaV2EnterpriseRequest({
// websiteURL: 'https://mydomain.com/page-with-recaptcha-enterprise',
// websiteKey: '6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd',
// enterprisePayload: {
// s: 'SOME_ADDITIONAL_TOKEN',
// },
// proxyType: 'http',
// proxyAddress: '8.8.8.8',
// proxyPort: 8080,
// proxyLogin: 'proxyLoginHere',
// proxyPassword: 'proxyPasswordHere',
// userAgent: 'userAgentPlaceholder',
// });

console.log(await cmcClient.Solve(recaptchaV2EnterpriseRequest));
});