reCAPTCHA v2 Enterprise Invisible Token Solving
Solve Google reCAPTCHA v2 Enterprise Invisible captchas. The Enterprise version of invisible reCAPTCHA v2 combines enhanced security features with seamless background verification for high-security applications.
Google reCAPTCHA v2 Enterprise Invisible is the premium variant of invisible reCAPTCHA, designed for
businesses requiring the highest level of security without user interaction. It uses
recaptcha/enterprise.js instead of the standard API and includes enhanced threat analysis,
custom risk scoring, and enterprise-grade analytics. The invisible behavior means it runs automatically
in the background, triggered programmatically on page actions like form submission.
Captcha Type
"type": "RECAPTCHA_V2_ENTERPRISE_INVISIBLE_TOKEN"
Request Format
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
auth.token |
string | required | Your API key |
captcha.type |
string | required | Must be "RECAPTCHA_V2_ENTERPRISE_INVISIBLE_TOKEN" |
captcha.metadata.siteUrl |
string | required | URL where the enterprise invisible captcha appears |
captcha.metadata.siteKey |
string | required | reCAPTCHA Enterprise site key (data-sitekey attribute) |
captcha.payload.sValue |
string | optional | The Enterprise "s" metadata value (required by some Enterprise sites) |
captcha.payload.recaptcha_data_s |
string | optional | The "data-s" attribute value if present on the reCAPTCHA element |
captcha.payload.userAgent |
string | optional | Your browser's user agent to improve solving accuracy |
captcha.payload.cookies |
array | optional | Array of cookie objects (see Cookie Object Structure below) |
captcha.payload.cookies[].name |
string | required* | Cookie name |
captcha.payload.cookies[].value |
string | required* | Cookie value |
captcha.payload.cookies[].domain |
string | required* | Cookie domain (e.g., ".example.com") |
captcha.payload.domain |
string | optional | reCAPTCHA API endpoint domain if the site uses an alternative |
captcha.payload.proxy |
object | optional | Proxy configuration (recommended for Enterprise) |
captcha.payload.proxy.protocol |
string | required* | Proxy protocol: "http", "https", "socks4", or "socks5" |
captcha.payload.proxy.host |
string | required* | Proxy IP address or hostname |
captcha.payload.proxy.port |
number | required* | Proxy port number |
captcha.payload.proxy.username |
string | optional | Proxy authentication username |
captcha.payload.proxy.password |
string | optional | Proxy authentication password |
* Required only if parent object (proxy/cookies) is provided
Example Request
const response = await fetch('https://solver-api.mydisct.com/createTask', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({
auth: {
token: 'YOUR_API_KEY'
},
context: {
source: 'api',
version: '1.0.0'
},
captcha: {
type: 'RECAPTCHA_V2_ENTERPRISE_INVISIBLE_TOKEN',
metadata: {
siteUrl: 'https://example.com/login',
siteKey: '6LcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAA'
},
payload: {
sValue: 'OPTIONAL_S_VALUE',
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36...',
proxy: {
protocol: 'http',
host: '1.2.3.4',
port: 8080,
username: 'proxyuser',
password: 'proxypass'
}
}
}
})
});
const data = await response.json();
console.log('Task ID:', data.task.id);
Response Format
Create Task Response (Processing)
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha task created successfully",
"task": {
"id": "MyDisctSolver_abc123",
"status": "processing"
}
}
Fetch Result Response (Processing)
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha is being processed",
"task": {
"id": "MyDisctSolver_abc123",
"status": "processing"
}
}
Fetch Result Response (Completed)
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha solved successfully",
"task": {
"id": "MyDisctSolver_abc123",
"status": "completed",
"result": {
"token": "03AGdBq24PBCbwiDRaS_MJ7Z...",
"timestamp": "2025-12-13T12:00:00.000Z"
}
}
}
The token field contains the reCAPTCHA Enterprise response token. This token should be
submitted in the g-recaptcha-response field of your form. Enterprise invisible tokens
are compatible with Google's Enterprise verification endpoints and work the same way as standard
invisible tokens.
Implementation Guide
Step 1: Identify Enterprise Invisible reCAPTCHA
// Enterprise Invisible reCAPTCHA uses enterprise.js AND data-size="invisible"
function isEnterpriseInvisibleRecaptcha() {
let isEnterprise = false;
const scripts = document.querySelectorAll('script');
for (const script of scripts) {
if (script.src?.includes('recaptcha/enterprise.js')) {
isEnterprise = true;
break;
}
}
if (!isEnterprise) return false;
const recaptchaDiv = document.querySelector('.g-recaptcha');
if (recaptchaDiv) {
return recaptchaDiv.getAttribute('data-size') === 'invisible';
}
return false;
}
function getEnterpriseInvisibleSiteKey() {
const recaptchaDiv = document.querySelector('.g-recaptcha, [data-sitekey]');
if (recaptchaDiv) {
return recaptchaDiv.getAttribute('data-sitekey');
}
const scripts = document.querySelectorAll('script');
for (const script of scripts) {
const match = script.src?.match(/render=([^&]+)/);
if (match) return match[1];
}
return null;
}
const siteKey = getEnterpriseInvisibleSiteKey();
console.log('Enterprise Invisible Site Key:', siteKey);
Step 2: Solve Enterprise Invisible Token
async function solveRecaptchaV2EnterpriseInvisible(siteUrl, siteKey) {
const createResponse = await fetch('https://solver-api.mydisct.com/createTask', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({
auth: { token: 'YOUR_API_KEY' },
context: { source: 'api', version: '1.0.0' },
captcha: {
type: 'RECAPTCHA_V2_ENTERPRISE_INVISIBLE_TOKEN',
metadata: { siteUrl, siteKey },
payload: {
userAgent: navigator.userAgent
}
}
})
});
const createData = await createResponse.json();
if (!createData.success) throw new Error(createData.error.message);
const taskId = createData.task.id;
while (true) {
await new Promise(resolve => setTimeout(resolve, 5000));
const resultResponse = await fetch('https://solver-api.mydisct.com/fetchResult', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({ taskId })
});
const resultData = await resultResponse.json();
if (resultData.task.status === 'completed') {
return resultData.task.result.token;
} else if (resultData.task.status === 'failed') {
throw new Error('Enterprise invisible token solving failed');
}
}
}
const token = await solveRecaptchaV2EnterpriseInvisible(
'https://example.com/login',
'6LcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAA'
);
console.log('Enterprise Invisible Token:', token);
Step 3: Submit Token
// Inject enterprise invisible token and trigger the callback
function injectEnterpriseInvisibleToken(token) {
let responseField = document.querySelector('[name="g-recaptcha-response"]');
if (!responseField) {
responseField = document.createElement('textarea');
responseField.name = 'g-recaptcha-response';
responseField.style.display = 'none';
document.querySelector('form').appendChild(responseField);
}
responseField.value = token;
// Trigger the callback if defined
const recaptchaDiv = document.querySelector('.g-recaptcha');
const callbackName = recaptchaDiv?.getAttribute('data-callback');
if (callbackName && typeof window[callbackName] === 'function') {
window[callbackName](token);
} else {
document.querySelector('form').submit();
}
}
Python Example
import requests
import time
def solve_recaptcha_v2_enterprise_invisible(site_url, site_key, api_key, s_value=None):
"""Solve reCAPTCHA v2 Enterprise Invisible token challenge"""
payload_data = {
'userAgent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
}
# Add sValue if provided (required by some Enterprise sites)
if s_value:
payload_data['sValue'] = s_value
# Step 1: Create task
create_response = requests.post(
'https://solver-api.mydisct.com/createTask',
headers={
'Content-Type': 'application/json',
'apikey': api_key
},
json={
'auth': {'token': api_key},
'context': {'source': 'api', 'version': '1.0.0'},
'captcha': {
'type': 'RECAPTCHA_V2_ENTERPRISE_INVISIBLE_TOKEN',
'metadata': {
'siteUrl': site_url,
'siteKey': site_key
},
'payload': payload_data
}
}
)
create_data = create_response.json()
if not create_data['success']:
raise Exception(create_data['error']['message'])
task_id = create_data['task']['id']
print(f'Task created: {task_id}')
# Step 2: Poll for result
while True:
time.sleep(5)
result_response = requests.post(
'https://solver-api.mydisct.com/fetchResult',
headers={
'Content-Type': 'application/json',
'apikey': api_key
},
json={'taskId': task_id}
)
result_data = result_response.json()
if result_data['task']['status'] == 'completed':
return result_data['task']['result']['token']
elif result_data['task']['status'] == 'failed':
raise Exception('Enterprise invisible token solving failed')
print('Waiting for solution...')
# Example usage
token = solve_recaptcha_v2_enterprise_invisible(
site_url='https://example.com/login',
site_key='6LcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAA',
api_key='YOUR_API_KEY'
)
print(f'Enterprise Invisible Token: {token}')
# Submit with form
response = requests.post(
'https://example.com/login',
data={
'username': 'myusername',
'password': 'mypassword',
'g-recaptcha-response': token
}
)
print(f'Login response: {response.status_code}')
Best Practices
- sValue Parameter: Some Enterprise sites require the "s" metadata value - extract it from the page if token is rejected
- Enterprise Detection: Verify the site loads
recaptcha/enterprise.jsinstead ofrecaptcha/api.js - Invisible Detection: Check for
data-size="invisible"attribute to confirm invisible variant - Proxy Recommended: Enterprise invisible implementations often benefit from proxy usage for better success rates
- Polling Intervals: Enterprise tokens take 10-30 seconds, use 5-second polling intervals
- Token Expiration: Enterprise tokens expire after ~2 minutes, use immediately
Common Issues
Solution: Ensure you're using the correct Enterprise site key and check if the site requires the sValue parameter. Enterprise invisible tokens may need additional metadata for successful verification.
Solution: Verify the site uses Enterprise reCAPTCHA by checking for
recaptcha/enterprise.js in the page source. Also confirm the invisible variant by
checking for data-size="invisible". If it shows a checkbox, use
RECAPTCHA_V2_ENTERPRISE_TOKEN instead.