Search code examples
javascriptinvisible-recaptcha2captcha

How to Submit Invisible reCAPTCHA with 2Captcha api response


I received 2captcha response and can show g-recaptcha-response text field. I input 2captcha response into g-recaptcha-response text field but not sure how to submit this?

Here is code:

window.captchaOnloadCallback = function () {
        var div = document.getElementById("captcha-div");
        grecaptcha.render(
          div,
          {
            'sitekey': div.getAttribute("data-sitekey"),
            'callback': window.captchaSuccessCallback
          }
        );
      };

Can anybody please help me to find what I need to do to submit after solved captcha code placed.

maybe I need to call the callback function but not sure how.


Solution

  • I suggest you to solve captcha manually and track all requests sent to server in process. This way you can see how exactly callback function is called and then emulate it with token received from 2captcha. Did you check the 2captcha instructions here? https://2captcha.com/2captcha-api#invisible And here: https://2captcha.com/2captcha-api#callback

    If previous links still didn't solve your problem, try this one: https://captchaforum.com/threads/problem-with-invisible-recaptcha-v2-callback-function-at-mail-com-sign-up-page.56/ Pay close attention to point 5.