Bypassing a hCaptcha with callback?

Hello so i am trying to bypass hCaptcha in a website called "" with using 2captcha bypass but it seems to not work. I am getting the bypass code but when i type it in both "grecaptcha-response" & "hcaptcha-response" and click the check button it doesnt accept the bypass code and asks me to do captcha again. When that happened, i went to 2captchas support and asked him why. He said the site uses "callback" and gave me a code to get callback function (i believe?). Heres the code that he gave me:

window.myInterval = setInterval(() => {

    if (window.hcaptcha) {

        console.log('hcaptcha available, lets redefine render method')

        // if hcaptcha object is defined, we save the original render method into window.originalRender

        window.originalRender = hcaptcha.render

        // then we redefine hcaptcha.render method with our function

        window.hcaptcha.render = (container, params) => {



            // storing hcaptcha callback globally

            window.hcaptchaCallback = params.callback

            // returning the original render method call

            return window.originalRender(container, params)



    } else {

        console.log('hcaptcha not available yet')


}, 500)

The result was:


    "sitekey": "12c3f8c6-a15c-4b83-8767-8050ee30fb70",

    "size": "invisible",

    "theme": "dark",

    "hl": "en"

callback and others

So i didnt understand anything and typed the sitekey, url once again in the python project they give in their site to bypass the hCaptcha but it didnt bypass hCaptcha again.

Code i am trying to bypass hCaptcha:

import sys

import os


from twocaptcha import TwoCaptcha

api_key = os.getenv('APIKEY_2CAPTCHA', '52aec93fb7d4c1b0e99c6c0f614a11ce')

solver = TwoCaptcha(api_key)


    result = solver.hcaptcha(




except Exception as e:



    sys.exit('solved: ' + str(result))
So basically i am asking for how to solve hCaptcha with callBack function? My english is not that good but I hope i was able to describe my problem.