Problem with invisible ReCaptcha v2 callback function at Sign-up page


New member
Hi, is the method you mentioned above valid for hcaptcha? When I search "___grecaptcha_cfg.clients[0]" like this, I can't find any results.
Last edited:


New member
Hello everyone,

I came across this form while looking for a way to solve a Recaptcha v2 with a callback function. I've found the forum super helpful, but I am still stuck at the step after solving the Recaptcha.

After I obtain the token with the 2captcha service, I need to invoke the Recaptcha callback and provide it with the token. I found the callback function using @Mark Miller's amazing GitHub gist (see the attached screenshot). When I invoke the callback in the Console in Chrome Dev tools and provide it with the token from 2captcha, I bypass the captcha successfully and get redirected to the search results.

I can invoke the callback function in two ways:

However, when I invoke these functions using the driver.execute_script() method in Python Selenium, I get an error. I also tried executing other standard Javascript functions with this method (e.g., scrolling down a page), and I keep getting errors. It's likely because domain I am trying to crawl prevents me from executing any Javascript with automation tools.

So, my question is, how can I invoke the callback function after I obtain the token from the 2captcha service?

Some extra info to help with my question:
1. Automation framework used --> Python Selenium or scrapy. Both are fine by me
2. Code --> In the txt file attached
3. Error messages --> Attached
4. The URL I am trying to crawl -->

Thank you very much for your help in advance. You'd be helping a brother in dire need :D


  • Callback function.png
    Callback function.png
    103.8 KB · Views: 8
  • selenium_code.txt
    1.4 KB · Views: 3
  • err message 1.png
    err message 1.png
    99.6 KB · Views: 8
  • err message 2.png
    err message 2.png
    88.5 KB · Views: 8