Captcha bypass tutorials

Was this helpful?

How to Bypass Binance CAPTCHA

Nick McBain
Nick McBain

Technical engineer

Introduction

Binance Captcha is a custom verification system developed by the world's largest cryptocurrency exchange to protect critical operations: account login, registration, and fund withdrawals. Unlike third-party solutions like reCAPTCHA, Binance uses custom visual challenges: selecting objects in images and sliders for aligning elements.

Beyond visual verification, the system employs additional security layers: device fingerprinting, behavioral analysis, and cursor movement tracking. The captcha appears adaptively — when using a VPN, private browsing session, or attempting to log in with a non-existent account.

In this guide, I'll show you how to automate Binance captcha bypass via the 2Captcha API. We'll cover two approaches: direct HTTP requests to the API and using the official Python SDK.

How Binance Captcha Works

Binance captcha doesn't always appear — the system assesses risk based on IP address, browser characteristics, and interaction history. When the suspicion level exceeds a threshold, users are prompted to complete a visual challenge.

Challenge types:

  • Image selection — click on specific objects in a grid (animals, items, vehicles)
  • Slider puzzle — move an element to align shapes

Data about the solution, including click coordinates and movement trajectories, is encrypted and sent to Binance servers for validation.

Direct API Request (API v2)

API Parameters

For BinanceTaskproxyless method (without proxy):

Parameter Type Required Description
type String Yes Task type: BinanceTaskproxyless
websiteURL String Yes Full URL of the page where captcha is loaded
websiteKey String Yes Value of bizId, bizType, or bizCode from page requests
validateId String Yes Dynamic value of validateId, securityId, or securityCheckResponseValidateId
userAgent String No User-Agent of the browser from which captcha was taken

For BinanceTask method (with proxy) additionally:

Parameter Type Required Description
type String Yes Task type: BinanceTask
proxyType String Yes Proxy type: http, socks4, socks5
proxyAddress String Yes IP address or hostname of the proxy server
proxyPort Integer Yes Port of the proxy server
proxyLogin String No Login for proxy authentication
proxyPassword String No Password for proxy authentication

Important: websiteKey and validateId values are dynamic — they change with each page rendering on Binance.

Request Format (JSON)

Combining the parameters from the tables above, we get the request structure:

Without proxy (BinanceTaskproxyless):

json Copy
{
    "clientKey": "YOUR_API_KEY",
    "task": {
      "type": "BinanceTaskproxyless",
      "websiteURL": "https://example.com/page-with-binance",
      "websiteKey": "login",
      "validateId": "cb0bfefa598...e54ecd57b",
      "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"
    }
}

With proxy (BinanceTask):

json Copy
{
    "clientKey": "YOUR_API_KEY",
    "task": {
      "type": "BinanceTask",
      "websiteURL": "https://example.com/page-with-binance",
      "websiteKey": "login",
      "validateId": "cb0bfefa598...e54ecd57b",
      "proxyType": "http",
      "proxyAddress": "1.2.3.4",
      "proxyPort": 8080,
      "proxyLogin": "login",
      "proxyPassword": "password"
    }
}

API Response Example

json Copy
{
    "errorId": 0,
    "status": "ready",
    "solution": {
        "token": "captcha#09ba4905a79f44f...kc99ma5943qIsquNP9D77",
        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
    }
}

How to Find websiteKey and validateId

Method 1: Via DevTools Network

  1. Open DevTools (F12)
  2. Go to the Network tab
  3. Trigger the captcha on Binance page
  4. Find requests to /request/precheck or /getCaptcha
  5. In the request parameters or response, locate:
    • bizId, bizType, or bizCode → this is websiteKey
    • validateId or securityCheckResponseValidateId → this is validateId

Method 2: Via JavaScript

Execute this script in the browser console before the captcha loads:

javascript Copy
let originalBCaptcha = window.BCaptcha;
let BCaptchaData;

Object.defineProperty(window, 'BCaptcha', {
  get: function() {
    return function(args) {
      const BCaptcha = new originalBCaptcha(args);
      let BCaptchaShow = BCaptcha.__proto__.show;

      BCaptcha.__proto__.show = function(args) {
        BCaptchaData = args;
        console.log('websiteKey:', args.bizId);
        console.log('validateId:', args.validateId);
        return 1;
      };

      return BCaptcha;
    };
  }
});

After the captcha appears, the parameters will be logged to the console.

SDK (API Wrapper)

If you don't want to work with raw HTTP requests and JSON, use the official Python SDK. It's a wrapper library that simplifies working with the API:

  • No need to manually format JSON
  • No need to make HTTP requests
  • No need to parse responses
  • Built-in error handling and timeouts

Instead, you just call ready-made methods like solver.binance().

Installation

bash Copy
pip install 2captcha-python

Basic Example

python Copy
import sys
import os

from twocaptcha import TwoCaptcha

# Store the key in environment variables:
# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows

api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')

solver = TwoCaptcha(api_key)

try:
    result = solver.binance(
        sitekey='register',
        pageurl='https://mysite.com/page/with/binance',
        validate_id='e20c622fa9384952832fc1c2a6b75c0a',
    )

except Exception as e:
    sys.exit(e)

else:
    sys.exit('result: ' + str(result))

Note: SDK uses different parameter names:

  • sitekey instead of websiteKey
  • pageurl instead of websiteURL
  • validate_id instead of validateId

Solution with Additional Options

python Copy
import sys
import os

from twocaptcha import TwoCaptcha

api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')

config = {
    'server': '2captcha.com',  # or 'rucaptcha.com'
    'apiKey': api_key,
    'softId': 123,
    'defaultTimeout': 120,
    'recaptchaTimeout': 600,
    'pollingInterval': 10,
}

solver = TwoCaptcha(**config)

try:
    result = solver.binance(
        sitekey='register',
        pageurl='https://mysite.com/page/with/binance',
        validate_id='e20c622fa9384952832fc1c2a6b75c0a',
        useragent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) "
                  "Chrome/148.0.0.0 Safari/537.36",
        # proxy={'type': 'HTTP',
        #        'uri': 'login:password@IP_address:PORT'}
    )

except Exception as e:
    sys.exit(e)

else:
    sys.exit('result: ' + str(result))

Advanced Configuration

SDK Client Configuration

python Copy
config = {
    'server': '2captcha.com',  # or 'rucaptcha.com'
    'apiKey': api_key,
    'softId': 123,
    'defaultTimeout': 120,      # timeout for all captchas
    'recaptchaTimeout': 600,    # timeout for reCAPTCHA
    'pollingInterval': 10,      # polling interval in seconds
}

solver = TwoCaptcha(**config)

Asynchronous Mode via Callback

If your application shouldn't block while waiting, configure a webhook. The solver.binance() method stays the same, but the result will be sent as a POST request to the specified URL:

python Copy
solver = TwoCaptcha(api_key)
solver.callback = 'https://your-app.com/captcha/webhook'

result = solver.binance(
    sitekey='register',
    pageurl='https://mysite.com/page/with/binance',
    validate_id='e20c622fa9384952832fc1c2a6b75c0a'
)

Debugging & Exception Handling

The SDK raises specialized exceptions:

python Copy
try:
    result = solver.binance(
        sitekey='register',
        pageurl='https://mysite.com/page/with/binance',
        validate_id='e20c622fa9384952832fc1c2a6b75c0a'
    )
    print(f"Result: {result}")
except ValidationException as e:
    print(f"Invalid parameters: {e}")
except NetworkException as e:
    print(f"Network error: {e}")
except TimeoutException as e:
    print(f"Timeout exceeded: {e}")
except ApiException as e:
    print(f"API error: {e}")

Common Error Codes

Error Code Cause Action
ERROR_WRONG_USER_KEY Invalid API key Verify environment variable
ERROR_ZERO_BALANCE Insufficient balance Top up your account
ERROR_NO_SLOT_AVAILABLE Queue is full Retry after 10–15 seconds
ERROR_BAD_PARAMETERS Missing required fields Check parameters against documentation
ERROR_PROXY_CONNECT_REFUSED Proxy unreachable Verify proxy format and availability
ERROR_CAPTCHA_UNSOLVABLE Captcha not solved Funds are refunded; refresh captcha and retry

Pre-Launch Checklist

  • API key loaded from environment variables
  • websiteURL (or pageurl in SDK) points to the full page with captcha
  • websiteKey (or sitekey in SDK) extracted dynamically (bizId/bizType/bizCode)
  • validateId (or validate_id in SDK) obtained from current captcha rendering
  • User-Agent matches the browser from which validateId was taken
  • Proxy format and accessibility verified (if used)
  • try/except block implemented (for SDK) or error handling (for API)
  • Integration tested against real Binance page

Code

Ready-made implementation examples for popular programming languages are available in the official repository:
https://github.com/2captcha

API Documentation:
https://2captcha.com/api-docs/binance-captcha

Conclusion

Binance captcha is a multi-layered security system that combines visual challenges with behavioral analysis and fingerprinting. The 2Captcha API allows you to automate its bypass using two approaches:

  1. Direct HTTP API requests — full control, suitable for custom integrations
  2. SDK — convenient wrapper that hides the boilerplate

The key feature of working with Binance captcha is the dynamic parameters (websiteKey and validateId) that change with each rendering. They must be extracted programmatically or via DevTools before submitting the task.

Start with direct API requests to understand the mechanics, then switch to SDK for convenience. Add exception handling and connect proxy or webhook routing as needed. This is enough for stable integration.