Chat with us, powered by LiveChat
← Return to MyDisct Solver

reCAPTCHA v2 Enterprise Token Solving

Solve Google reCAPTCHA v2 Enterprise captchas with premium accuracy. Enterprise version provides enhanced security features and advanced bot detection for high-security applications.

What is reCAPTCHA v2 Enterprise?

Google reCAPTCHA v2 Enterprise is the premium version of reCAPTCHA v2, designed for businesses requiring enhanced security. It includes advanced threat analysis, custom risk scoring, and enterprise-grade analytics. Enterprise tokens work with Google's Enterprise API endpoints and provide additional security features compared to standard reCAPTCHA v2.

Captcha Type

"type": "RECAPTCHA_V2_ENTERPRISE_TOKEN"

Request Format

POST /createTask

Request Parameters

Parameter Type Required Description
auth.token string required Your API key
captcha.type string required Must be "RECAPTCHA_V2_ENTERPRISE_TOKEN"
captcha.metadata.siteUrl string required The URL where the captcha appears
captcha.metadata.siteKey string required reCAPTCHA Enterprise site key (data-sitekey attribute)
captcha.payload.sValue string optional The "s" metadata value (required by some Enterprise sites)
captcha.payload.userAgent string optional User agent string for solving
captcha.payload.cookies array optional Array of cookie objects
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.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

JavaScript
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_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"
    }
  }
}
Understanding the Response

The token field contains the reCAPTCHA Enterprise response token. This token should be submitted in the g-recaptcha-response field of your form. Enterprise tokens are compatible with Google's Enterprise verification endpoints.

Implementation Guide

Step 1: Identify Enterprise reCAPTCHA

// Enterprise reCAPTCHA uses enterprise.js instead of api.js
function isEnterpriseRecaptcha() {
  const scripts = document.querySelectorAll('script');
  for (const script of scripts) {
    if (script.src?.includes('recaptcha/enterprise.js')) {
      return true;
    }
  }
  return false;
}

function getEnterpriseSiteKey() {
  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 = getEnterpriseSiteKey();
console.log('Enterprise Site Key:', siteKey);

Step 2: Solve Enterprise Token

JavaScript
async function solveRecaptchaV2Enterprise(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_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 token solving failed');
    }
  }
}

const token = await solveRecaptchaV2Enterprise(
  'https://example.com/login',
  '6LcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAA'
);
console.log('Enterprise Token:', token);

Step 3: Submit Token

// Submit Enterprise token with form
async function submitWithEnterpriseToken(token) {
  const formData = new FormData();
  formData.append('username', 'myusername');
  formData.append('password', 'mypassword');
  formData.append('g-recaptcha-response', token);

  const response = await fetch('https://example.com/login', {
    method: 'POST',
    body: formData
  });

  return await response.json();
}

function injectEnterpriseToken(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;
  document.querySelector('form').submit();
}

Python Example

Python
import requests
import time

def solve_recaptcha_v2_enterprise(site_url, site_key, api_key, s_value=None):
    """Solve reCAPTCHA v2 Enterprise 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_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 token solving failed')

        print('Waiting for solution...')

# Example usage
token = solve_recaptcha_v2_enterprise(
    site_url='https://example.com/login',
    site_key='6LcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAA',
    api_key='YOUR_API_KEY'
)

print(f'Enterprise 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

Recommendations
  • sValue Parameter: Some Enterprise sites require the "s" metadata value - extract it from the page if token is rejected
  • User Agent: Use a realistic user agent string matching the target platform
  • Polling Intervals: Enterprise tokens take 10-30 seconds, use 5-second polling intervals
  • Token Expiration: Enterprise tokens expire after ~2 minutes, use immediately
  • Proxy Usage: Consider using proxies for sensitive Enterprise implementations
  • Cookies: Include relevant cookies for better success rates on some sites

Common Issues

Issue: Enterprise token rejected

Solution: Ensure you're using the correct Enterprise site key. Enterprise keys are different from standard reCAPTCHA keys. Also check if the site requires the sValue parameter.

Issue: Wrong captcha type

Solution: Verify the site uses Enterprise reCAPTCHA by checking for recaptcha/enterprise.js in the page source instead of recaptcha/api.js.