How to automatically solve hCaptcha?

CAPTCHAFORUM

Administrator
hCaptcha is a quite new type of captcha that is really similar to reCAPTCHA and looks like this:

1630069741978.png

Solving hCaptcha is pretty simple:
  1. Find the value of data-sitekey parameter in the source code of the page.
  2. Submit a HTTP GET or POST request to our API URL: http://2captcha.com/in.php with method set to hcaptcha and provide the value found on previous step as value for sitekey and full page URL as value for pageurl.
    You can find the full list of parameters in the table below.

    Request URL example:
    http://2captcha.com/in.php?key=1abc234de56fab7c89012d34e56fa7b8&method=hcaptcha&sitekey=10000000-ffff-ffff-ffff-000000000001&pageurl=http://mysite.com/register
  3. If everything is fine server will return the ID of your captcha as plain text, like: OK|2122988149 or as JSON {"status":1,"request":"2122988149"} if json parameter was used.
    Otherwise server will return an error code.

  4. Make a 15-20 seconds timeout then submit a HTTP GET request to our API URL: http://2captcha.com/res.php to get the result.
    The full list of parameters is in the table below.

    If captcha is already solved server will respond in plain text or JSON and return the answer token that looks like:
    P0_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXNza2V5IjoiNGQ3MTI5ZmUtOTQxZi00NGQ4LWI5MzYtMzAwZjUyMmM3Yzc2IiwiZXhwIjoxNTY4MTA3MjY4LCJzaGFyZF9pZCI6MzAyMzQ1NDg4fQ.yJuANPBc1uzCw9tW6CoLqiijBgh6zF00KdsnqaJtugg
    If captcha is not solved yet server will return CAPCHA_NOT_READY result. Repeat your request in 5 seconds.
    If something went wrong server will return an error code.

  5. Place the token into h-captcha-response and g-recaptcha-response hidden elements and submit the form.
    Please note, hcaptcha also has a callback. If there is no form to submit you MUST explore the website code and find the callback.

    1630069805254.png
    Request URL example:
    http://2captcha.com/res.php?key=1abc234de56fab7c89012d34e56fa7b8&action=get&id=2122988149