How to bypass hCaptcha

To bypass hCaptcha, send the page URL and the site key to a captcha solver API, wait for the token it returns and place it in the form’s h-captcha-response field before it expires. This guide explains how to bypass hCaptcha with ilovecaptcha: why its image prompts keep changing, which integration modes exist, and what the site’s server verifies afterwards.

Updated on · Written and maintained by the ilovecaptcha team

Preview: the API described here is in public beta. Endpoint names, fields and codes can still change until the end of the beta, and no API key is distributed yet.

What is hCaptcha, and why do its challenges keep changing?

hCaptcha is a CAPTCHA service operated by Intuition Machines, Inc. that protects sites and apps from bots, spam and other automated abuse. When in doubt, its widget asks the visitor to complete a visual task described by a short written prompt. According to Cloudflare, which announced on 8 April 2020 that it had migrated from Google’s reCAPTCHA to hCaptcha, the service emerged as the best alternative. Its prompts are not a fixed catalogue: new ones appear regularly and old ones disappear.

Why does a model trained once age on hCaptcha?

Because of that rotation. A classifier trained on one prompt, say a category of object, stays accurate until the prompt is retired; the next one may ask for another object, a relation between two pictures, or a gesture instead of a selection. A frozen model ages by itself, without any change on its side.

What does the visitor see in an hCaptcha challenge?

hCaptcha challenge families and the gesture each one expects
Family What is shown Expected gesture
Image grid A prompt, often with a sample picture, above a set of tiles Click every matching tile
Single picture One image drawn in a canvas and a prompt naming a target Click the designated object or spot
Drag and drop A movable item and a scene Drag the item where the prompt says
Text A written question, an accessibility option in over 100 languages Answer in writing

The sample picture often shows the target in another pose, so the task is recognition, not pixel comparison. Some canvas challenges are animated: one still frame may not contain the answer.

Which hCaptcha mode does a site run: checkbox, invisible or passive?

A site chooses how visible hCaptcha is, and that choice decides whether a visitor sees a challenge. The default is a checkbox rendered in an element of class h-captcha, which carries the public site key in data-sitekey. According to hCaptcha’s documentation, the invisible variant is rendered in the background and only presented when a challenge is required.

What does each hCaptcha mode show the visitor?

hCaptcha integration modes, per the vendor documentation
Mode What the visitor sees Setting or plan
Checkbox A box to tick, then a challenge if hCaptcha asks for one data-size set to normal or compact
Invisible Nothing, unless the visitor meets the challenge criteria data-size set to invisible
99.9% Passive A challenge for less than 0.1% of users Pro and Enterprise accounts
Passive No challenge; the site reads a risk score Enterprise accounts only

How does hCaptcha set the difficulty of a challenge?

The site sets it for each site key. According to hCaptcha’s FAQ, Publisher accounts have four levels, Easy, Medium, Difficult and Auto, and Auto always presents a challenge of varying difficulty. Whether a second challenge follows depends, in the vendor’s words, on computed confidence in the visitor’s humanity, the site difficulty setting and other security factors.

What does the site’s server check once hCaptcha is solved?

It checks a token, not the answer to the images. After a successful challenge, hCaptcha adds an h-captcha-response token to the form submission. The site’s back end then sends a POST request to https://api.hcaptcha.com/siteverify with its secret and that token in the response parameter, and reads the JSON reply: success, the challenge_ts timestamp and the hostname where the challenge was passed. The form is trusted only if success is true.

How long is an hCaptcha token valid?

Not long, and only once. According to hCaptcha’s developer guide, tokens can only be used once and must be verified within a short period of time after being issued; the error table sets the default at 120 seconds. After that, siteverify answers success: false with one of these codes:

  • expired-input-response: the token is past its validity, 120 seconds by default.
  • already-seen-response: the token was already verified once.
  • invalid-input-response: the token is invalid or malformed.
  • sitekey-secret-mismatch: the site key is not registered with the secret sent.

Why can a token be refused although the challenge was solved?

Because the site may ask siteverify for more than a valid token. hCaptcha recommends sending the optional sitekey parameter, which prevents a token issued on one site key from being redeemed elsewhere, and the visitor’s remoteip. On Enterprise accounts the reply also carries a score from 0.0, no risk, to 1.0, confirmed threat, and the site applies its own threshold.

How does a captcha solver keep up with hCaptcha’s prompts?

By reading the prompt first. A solver built for hCaptcha sorts each challenge into a family according to the wording of the prompt and the gesture expected, then hands it to the reader written for that family. A prompt it has never met must be recognised as new, not forced into the closest known family: that is how a frozen model starts answering wrongly without noticing.

For people too, the prompts weigh unevenly: in a USENIX Security 2023 study in which 1,400 participants solved 14,000 CAPTCHAs, the time a challenge took and how users rated it were not always correlated.

What does ilovecaptcha return for hCaptcha?

A token. In its API, ilovecaptcha exposes hCaptcha as a token type named hcaptcha: the request carries websiteURL and websiteKey, the challenge is handled on the service side whatever its family, and the result holds solution.token. Your code receives neither tiles nor coordinates.

What do you send for an hCaptcha task, and what comes back?

You send the address of the page that shows hCaptcha in websiteURL and the site’s public key in websiteKey, with the task type hcaptcha. No image is uploaded. The API answers with one string, solution.token, which is the value the form expects in its h-captcha-response field.

The hCaptcha task at a glance
Item Value
Publisher Intuition Machines
Challenge family Image grid
Task type hcaptcha
You send Site key + page URL
You get back Token to inject
Vendor documentation hCaptcha documentation

How do you bypass hCaptcha with the ilovecaptcha API?

In five steps, from any language that can send HTTPS requests. No screenshot is taken: the site key is enough to request a token.

  1. Read the site key. Copy the data-sitekey value of the h-captcha element in the page source.
  2. Create the task. POST createTask with the type hcaptcha, the page’s websiteURL and its websiteKey.
  3. Poll the result. Call getTaskResult every 1 to 2 seconds until status is ready.
  4. Insert the token. Write the value of solution.token into the form field named h-captcha-response.
  5. Submit without delay. Send the form inside the 120-second default validity; each token is verified once.

If the site reports an expired or already-seen token, create a new task.

What does an hCaptcha request look like?

The request below asks for a token for a page protected by hCaptcha. The site key shown is the test key hCaptcha publishes for Publisher and Pro accounts, which, the vendor warns, provides no anti-bot protection; a real task carries the key read on the target page. The response holds the token, truncated here.

POST /createTask
Content-Type: application/json

{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "hcaptcha",
    "websiteURL": "https://example.com/login",
    "websiteKey": "10000000-ffff-ffff-ffff-000000000001"
  }
}

→ 200 { "errorId": 0, "taskId": "tsk_8f3a1c2e", "status": "processing" }

POST /getTaskResult
Content-Type: application/json

{ "clientKey": "YOUR_API_KEY", "taskId": "tsk_8f3a1c2e" }

→ 200 { "errorId": 0, "status": "ready", "solution": { "token": "P1_eyJ0eXAiOiJKV1QiLCJhbGciOi…" } }
A createTask request for a hCaptcha task, then the getTaskResult answer once the task is ready (preview format).

hCaptcha bypass: frequently asked questions

Can hCaptcha be bypassed without solving the images yourself?

Yes. hCaptcha does not hand the site your clicks; it hands it a token, and a solver API can obtain that token for a given page and site key. What cannot be skipped is the verification that follows: the site’s server submits the token to hCaptcha’s siteverify endpoint. A token that is expired, already used or issued for another site key is refused there.

How long does an hCaptcha token last, and can it be reused?

According to hCaptcha’s developer guide, a token expires after 120 seconds by default and can be verified only once. An expired token makes siteverify return expired-input-response; a token presented twice returns already-seen-response. Request the token late in your flow, submit the form as soon as it arrives, and ask for a new one after every submission, expiry or error.

Does invisible or passive hCaptcha change how a solver is used?

Invisible mode does not: the page still carries a site key, and the form still expects a token in the same field. The passive modes are another matter. In 99.9% Passive, offered to Pro and Enterprise accounts, challenges are kept to less than 0.1% of users. In Passive, reserved for Enterprise, no challenge is shown and the site consumes a risk score, so its own rules decide the outcome.

Does hCaptcha integrate the same way as reCAPTCHA v2?

Nearly. hCaptcha’s FAQ states that it is API-compatible with reCAPTCHA V2, and its migration page lists what changes: the script comes from js.hcaptcha.com, the form field is h-captcha-response instead of g-recaptcha-response, and the server calls api.hcaptcha.com/siteverify. On Enterprise accounts the score also reads the opposite way to reCAPTCHA’s: 0.0 means no risk, 1.0 a confirmed threat.

When is it acceptable to automate an hCaptcha?

When you are authorised to run that automation. To test your own integration, hCaptcha publishes test keys. A solver API is for cases where the real configuration must be exercised: monitoring your own forms, QA, accessibility automation, availability checks, academic research, or collecting public data within the target site’s terms and applicable law. OWASP files the abusive uses under OAT-009, CAPTCHA Defeat; credential stuffing, spam and payment fraud are not supported.

Sources

The facts and figures quoted on this page come from these sources.