Cannot find the right callback function

I cannot figure out how to solve a captchav2 with Selenium.
I picked for testing the Spotify ( website.
I inject the token inside the HTML and I call the callback function which I retrived typing ___grecaptcha_cfg.clients['0'] in the Chrome Dev Console.
This is my code. But when i submit the form after this code, the captcha is not solved.
The error in the console is HTTP 400.
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("document.getElementById(\"g-recaptcha-response\").innerHTML=\"" + tokenID + "\";");
js.executeScript("___grecaptcha_cfg.clients['0']['I']['I']['callback']('" + tokenID + "')");


Last edited:


New member
Same problem here. The callback function for Recaptcha V2 returns 400 with a "Checkbox score below defined threshold." response.
The page uses Recaptcha Enterprise with V2 and V3 present.