Unfuncaptcha

FunCaptcha API Examples

This page demonstrates usage of the FunCaptcha token retrieval API for Roblox authentication.

FunCaptcha Token Retrieval

The following API demonstrates how to obtain a FunCaptcha token for Roblox authentication using the Unfuncaptcha service.

def get_token(roblox_session: requests.Session, blob, proxy, cookie):
    try:
        session = requests.Session()

        payload = {
            "task": {
                "type": "FunCaptchaTask",
                "preset": "roblox_login",
                "blob": blob,
                "cookie": cookie
            },
            "clientKey": "API_KEY_HERE",
            "proxy": proxy,
        }

        response = session.post("https://api.unfuncaptcha.com/solve", json=payload, timeout=120).json()

        if "token" in response:
            return response["token"]
        elif "error" in response:
            return None
        else:
            return None

    except Exception as e:
        return None

The get_token function handles the communication with Unfuncaptcha's API to solve FunCaptcha challenges. It includes automatic retries and proper error handling for robust operation in production environments.