NEWStandard createTask and in.php APIs. Change the address and you are connected.View API docs
GATESOLVER

Glossary

g-recaptcha-response

g-recaptcha-response is the name of the hidden field where the reCAPTCHA widget writes its token, and the parameter most servers read it from.

What the field is

When reCAPTCHA renders inside a form, it adds a textarea with the id and name g-recaptcha-response. The element is hidden with CSS, starts empty, and receives the token as soon as the visitor passes the check. Because it has a name attribute and sits inside the form, the browser includes it automatically on submit, next to the email, password or search fields.

On the server, the site reads the parameter of the same name and forwards it to Google for verification. So the field name you see in the DOM is usually the exact key the backend expects.

How a normal submission looks

If you submit a protected form by hand with the network tab open, the request body contains something like this:

email=reader%40example.com&password=********&g-recaptcha-response=03AFcWeA6x...

Frameworks change the details. A React form may collect the token from a callback and post JSON such as {"captcha": "03AF..."}, or send it in a header like X-Recaptcha-Token. The hidden textarea still exists, but nobody reads it. Always confirm which field the real request uses before you write injection code.

Injecting a solved token in a browser

In Selenium, Playwright or Puppeteer, you solve the challenge through the API, write the token into the textarea, then trigger the same action a person would. The textarea is hidden, so set its value through JavaScript instead of typing into it.

// Playwright (Node.js), after the task returns a token
const answer = result.solution.gRecaptchaResponse;
await page.evaluate((tok) => {
  document.querySelectorAll('[name="g-recaptcha-response"]')
    .forEach((el) => { el.value = tok; el.innerHTML = tok; });
}, answer);
await page.click('button[type="submit"]');

The loop over all matching elements matters on pages with more than one widget, where the textareas are named g-recaptcha-response and g-recaptcha-response-1 and so on. Fill the one that belongs to the form you are sending.

Injecting without a browser

For plain HTTP clients the process is simpler: you never render the widget. Load the page to read the site key and any hidden inputs such as CSRF tokens, solve the task, and add g-recaptcha-response to the POST body yourself. This works well for forms that verify only the token. Sites that also require JavaScript generated cookies or headers will need a browser.

When filling the field is not enough

Many pages disable the submit button until the widget fires its callback, or run validation code inside it. Writing the textarea does not fire anything, so the button stays grey or the request never leaves. In that case, find the callback name in the widget's data-callback attribute or in ___grecaptcha_cfg and call it with the token. The callback guide covers the common hiding places.

Other vendors use similar fields

Turnstile writes to cf-turnstile-response; when it runs in reCAPTCHA compatibility mode it also fills g-recaptcha-response. MTCaptcha uses mtcaptcha-verifiedtoken. The injection method is identical: set the value, then submit or call the callback. For the token's lifetime and single use rules, see CAPTCHA token.

Debugging a submission that keeps failing

Work from the outside in. First, compare your request with a manual one: same URL, same method, same field names, same content type. Second, check timing: if more than two minutes pass between the solve and the submit, the token is dead before it arrives. Third, check the hidden inputs that travel with the token, such as CSRF values or a form nonce, which must come from the same page load as the one you submit from. Finally, confirm that the site key in your task matches the widget on that exact page, not one cached from an older visit. Most failures turn out to be one of these four, and none of them is visible in the token itself.

Common questions

Why is the textarea hidden?

Visitors never need to see the token, so the widget hides the field with CSS while keeping it inside the form for submission.

Should I set value or innerHTML?

Set both. Most forms read value, while some older scripts read the text content, and writing both costs nothing.

What if the request has no g-recaptcha-response at all?

The site sends the token another way, usually in JSON or a header. Copy the field name from a real submission in the network tab.

Can I send the token with curl?

Yes, if the form verifies only the token. Add it to the POST body with the other fields and the cookies from the page load.

Does injection work for reCAPTCHA v3?

Yes. v3 tokens are submitted the same way, though sites more often pass them in JSON from a grecaptcha.execute promise.

Keep reading