SurSolver

reCAPTCHA v3 Enterprise tokens

Match the Enterprise integration, site key and action before generating a token for the protected request.

Updated

$0.65 / 1K tasksCharged when a task is accepted

On this page

What is reCAPTCHA v3 Enterprise and how to recognise it

The Enterprise score-based integration uses enterprise.js and the grecaptcha.enterprise API. A page can look much like standard reCAPTCHA v3, so the badge alone does not identify which task to create.

Inspect the script URL and the execute call. The site's key, protected action and Enterprise-specific request values describe the integration more reliably than a screenshot of the form.

For api.js and grecaptcha.execute, use the standard reCAPTCHA v3 guide. If the page triggers an image challenge instead of a score-only action, confirm whether it is a v2 integration before requesting a v3 token.

How to find the site key, action and enterprise payload

Copy the complete page URL as websiteURL and its site key as websiteKey. The key can appear in the Enterprise script's render parameter, the execute call or an anchor request in the Network panel.

Find the action argument of grecaptcha.enterprise.execute and send that exact value as pageAction. Do not assume that every site uses login or submit.

When the integration supplies extra Enterprise fields, capture them for the current request and send them in enterprisePayload. If a value expires or changes per load, an older capture is not a substitute for a fresh one.

minScore expresses the threshold requested by the solve. It does not override the protected site's decision. The Enterprise API reference lists the request fields and proxy variants.

Where the token goes

The solution returns gRecaptchaResponse. Submit that value where the application's own page sends the result, commonly the g-recaptcha-response field or the corresponding field in its protected API request.

Use the exact field name and request structure from the application. Do not send the whole SurSolver solution object in place of the token. Preserve the returned userAgent when one is supplied.

Generate close to the protected action and use the token promptly. The site evaluates the submitted token in the context of its own action, hostname and policy; a ready task is not a guarantee of application approval.

Common mistakes

Choosing the standard v3 task for an Enterprise integration loses the distinction that the page makes. Confirm enterprise.js and the Enterprise execute call before selecting the task type.

A mismatched action or stale Enterprise payload can make a correctly shaped token unusable for the intended request. Copy the current integration values rather than a public example's placeholders.

Do not treat a higher requested score as a universal fix. Check the application's action, hostname, submission timing and response first. Reusing a token across several protected calls is also not equivalent to generating a fresh result.

Solve it with SurSolver

Create ReCaptchaV3EnterpriseTokenProxyLess with the page URL, site key, actual action and any current Enterprise payload. Use ReCaptchaV3EnterpriseToken when the solve must use your own proxy.

Poll getTaskResult and submit gRecaptchaResponse with the protected request. The Enterprise API reference contains the exact request example; the standard v3 guide covers non-Enterprise integrations.

A complete Node.js example

The script below runs the whole flow with nothing but Node's built-in fetch: it creates the task from the page URL, site key and action (plus an optional minScore and Enterprise payload), polls for the token, posts the form with it and checks the response for a success string you choose.

recaptcha-v3-enterprise-node.js
// recaptcha-v3-enterprise-node.js - solve reCAPTCHA v3 Enterprise and post the token with the
// form.
// Install: Node.js 18 or newer (no packages).
// Run: node recaptcha-v3-enterprise-node.js

const { setTimeout: sleep } = require('node:timers/promises');

// Your SurSolver API key.
const CLIENT_KEY = 'YOUR_API_KEY';
// The page that renders the widget, with its path and query string.
const TARGET_URL = 'https://example.com/page';
// The render= value of the api.js or enterprise.js script URL.
const SITE_KEY = 'YOUR_SITE_KEY';
// The action in the page's grecaptcha.execute(key, { action }) call.
const PAGE_ACTION = 'YOUR_PAGE_ACTION';
// The lowest score you need, from 0 to 1.
const MIN_SCORE = undefined;
// The object passed to grecaptcha.enterprise.render, such as { "s": "..." }, copied just before
// the solve.
const ENTERPRISE_PAYLOAD = undefined;
// Where the page posts the form (the form action, or the request in DevTools, Network).
const FORM_URL = 'https://example.com/submit';
// The form's other fields as a JSON object, such as {"username":"demo"}.
const FORM_FIELDS = undefined;
// Text that appears only in a response the site accepted.
const SUCCESS_TEXT = 'PASTE_ACCEPTED_MARKER';

const API = 'https://api.sursolver.com';
const POLL_ATTEMPTS = 60;

// API errors are HTTP 200 with errorId 1; anything else is a transport failure.
async function call(path, body) {
  const res = await fetch(`${API}${path}`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(body),
  });
  if (!res.ok) throw new Error(`HTTP ${res.status}`);
  const data = await res.json();
  if (data.errorId !== 0) throw new Error(`${data.errorCode}: ${data.errorDescription}`);
  return data;
}

async function solve(task) {
  const created = await call('/createTask', { clientKey: CLIENT_KEY, task });

  for (let attempt = 0; attempt < POLL_ATTEMPTS; attempt += 1) {
    const result = await call('/getTaskResult', {
      clientKey: CLIENT_KEY,
      taskId: created.taskId,
    });
    if (result.status === 'ready') return result.solution;
    await sleep(3000);
  }
  throw new Error(`task ${created.taskId} was not ready in ${POLL_ATTEMPTS} polls`);
}

// Optional task fields are sent only when they have a value.
function withoutEmpty(fields) {
  return Object.fromEntries(
    Object.entries(fields).filter(([, value]) => value !== undefined && value !== ''),
  );
}

async function main() {
  const solution = await solve({
    type: 'ReCaptchaV3EnterpriseTokenProxyLess',
    websiteURL: TARGET_URL,
    websiteKey: SITE_KEY,
    pageAction: PAGE_ACTION,
    ...withoutEmpty({
      minScore: MIN_SCORE,
      enterprisePayload: ENTERPRISE_PAYLOAD,
    }),
  });

  // Send the token the way the page does; some sites name it differently or send JSON.
  const headers = { 'Content-Type': 'application/x-www-form-urlencoded' };
  // The solver reports a user agent only for some solves; present it when it does.
  if (solution.userAgent) headers['User-Agent'] = solution.userAgent;
  const body = new URLSearchParams({
    ...(FORM_FIELDS ?? {}),
    ['g-recaptcha-response']: solution.gRecaptchaResponse,
  });
  const response = await fetch(FORM_URL, { method: 'POST', headers, body });
  const text = await response.text();
  if (!response.ok || !text.includes(SUCCESS_TEXT)) {
    throw new Error(`The site did not accept the result (HTTP ${response.status}).`);
  }
  console.log('The site accepted the result.');
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

A full Playwright walkthrough of the Enterprise integration lives in reCAPTCHA v3 Enterprise with Playwright.

FAQ

How do I distinguish Enterprise from standard reCAPTCHA v3?

Look for enterprise.js and grecaptcha.enterprise.execute in the page integration. Standard v3 normally uses api.js and grecaptcha.execute. Verify the request rather than choosing by the appearance of the badge.

Which task type should I use?

Use ReCaptchaV3EnterpriseTokenProxyLess without a caller proxy, or ReCaptchaV3EnterpriseToken when supplying your own proxy.

Where do I find pageAction?

Use the action passed by the page to grecaptcha.enterprise.execute. Copy it exactly; a token for another action does not reproduce the intended check.

When should I send enterprisePayload?

Send the extra values that the actual Enterprise integration provides, such as a captured s value. Capture them shortly before the solve rather than copying old values from an example.

Does minScore guarantee that the site accepts the token?

No. minScore requests a solve threshold, but the protected site still evaluates the token and applies its own policy. Correct action, hostname and request timing remain important.