Troubleshooting

ERROR_PROXY_NOT_AUTHORIZED: Proxy Authentication Fixes

ERROR_PROXY_NOT_AUTHORIZED means CaptchaAI cannot connect through your specified proxy. This guide covers all causes and fixes.


Common Causes

Cause How to Check
Wrong proxy format Verify type:host:port:user:pass format
Proxy requires IP whitelisting Check if proxy provider whitelists IPs
Proxy credentials expired Test proxy connection directly
Wrong proxy type specified Verify HTTP vs SOCKS4 vs SOCKS5
Proxy server down Test connectivity to proxy
Special characters in password URL-encode the password

Correct Proxy Format

CaptchaAI expects the proxy in this format:

proxytype: HTTP | HTTPS | SOCKS4 | SOCKS5
proxy: host:port:username:password
import requests

# Correct format
data = {
    "key": "YOUR_API_KEY",
    "method": "userrecaptcha",
    "googlekey": "SITE_KEY",
    "pageurl": "https://example.com",
    "proxytype": "HTTP",
    "proxy": "192.168.1.1:8080:myuser:mypass",
    "json": 1,
}

resp = requests.post("https://ocr.captchaai.com/in.php", data=data)

Proxy Format Variations

# With authentication
proxy = "192.168.1.1:8080:username:password"

# Without authentication (rare — most captcha proxies need auth)
proxy = "192.168.1.1:8080"

# SOCKS5
proxytype = "SOCKS5"
proxy = "192.168.1.1:1080:user:pass"

Validation Before Submission

import re
import requests


def validate_proxy(proxy_str, proxy_type="HTTP"):
    """Validate proxy format and connectivity."""
    # Check format
    parts = proxy_str.split(":")
    if len(parts) < 2:
        raise ValueError(f"Invalid proxy format: {proxy_str}")

    host = parts[0]
    port = parts[1]

    if not port.isdigit():
        raise ValueError(f"Invalid port: {port}")

    # Check proxy type
    valid_types = {"HTTP", "HTTPS", "SOCKS4", "SOCKS5"}
    if proxy_type not in valid_types:
        raise ValueError(f"Invalid proxy type: {proxy_type}")

    return True


def test_proxy(proxy_str, proxy_type="HTTP"):
    """Test if proxy is working."""
    parts = proxy_str.split(":")
    host = parts[0]
    port = parts[1]

    if len(parts) == 4:
        user, password = parts[2], parts[3]
        proxy_url = f"{proxy_type.lower()}://{user}:{password}@{host}:{port}"
    else:
        proxy_url = f"{proxy_type.lower()}://{host}:{port}"

    proxies = {"http": proxy_url, "https": proxy_url}

    try:
        resp = requests.get(
            "https://httpbin.org/ip",
            proxies=proxies,
            timeout=10,
        )
        print(f"Proxy working. IP: {resp.json()['origin']}")
        return True
    except Exception as e:
        print(f"Proxy failed: {e}")
        return False


# Test before using with CaptchaAI
proxy = "192.168.1.1:8080:user:pass"
if test_proxy(proxy, "HTTP"):
    print("Proxy is ready to use")

Handling Special Characters in Passwords

from urllib.parse import quote


def format_proxy(host, port, username, password):
    """Format proxy string, handling special characters."""
    # URL-encode password if it contains special characters
    safe_password = quote(password, safe="")
    return f"{host}:{port}:{username}:{safe_password}"


# Password with special characters
proxy = format_proxy("192.168.1.1", "8080", "user", "p@ss:word!")

Proxy Type Detection

def detect_proxy_type(host, port):
    """Try to detect which proxy protocol works."""
    import socket

    for proxy_type in ["HTTP", "SOCKS5", "SOCKS4"]:
        try:
            # Basic TCP connection test
            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            sock.settimeout(5)
            result = sock.connect_ex((host, int(port)))
            sock.close()

            if result == 0:
                return proxy_type  # Port is open, try this type
        except Exception:
            continue

    return None

Troubleshooting

Issue Cause Fix
Error with correct credentials Proxy requires IP whitelisting Whitelist CaptchaAI IPs or use auth-only proxies
Works locally, fails via CaptchaAI CaptchaAI server IP not whitelisted Use username/password auth instead
SOCKS proxy fails Wrong type specified Try SOCKS5 or SOCKS4
Intermittent auth failures Proxy rate limiting Use dedicated/premium proxies
Password with : breaks format Unescaped special characters URL-encode the password

FAQ

Does CaptchaAI connect through my proxy?

Yes. When you provide proxy parameters, CaptchaAI's solver loads the target page through your proxy. This ensures the token matches your browsing context.

Which proxy type should I use?

Use HTTP/HTTPS for most sites. Use SOCKS5 when the target requires it or for better anonymity. SOCKS4 is rarely needed.

Do I always need a proxy?

No. Proxies are optional. Many CAPTCHAs solve fine without a proxy. Use proxies when the target site checks if the solver's IP matches the token submission IP.



Fix proxy issues — solve with CaptchaAI.

Discussions (0)

No comments yet.

Related Posts

Explainers How Proxy Quality Affects CAPTCHA Solve Success Rate
Understand how proxy quality, IP reputation, and configuration affect CAPTCHA frequency and solve success rates with Captcha AI.

Understand how proxy quality, IP reputation, and configuration affect CAPTCHA frequency and solve success rate...

Python reCAPTCHA v2 Cloudflare Turnstile
Feb 06, 2026
Explainers Mobile Proxies for CAPTCHA Solving: Higher Success Rates Explained
Why mobile proxies produce the lowest CAPTCHA trigger rates and how to use them with Captcha AI for maximum success.

Why mobile proxies produce the lowest CAPTCHA trigger rates and how to use them with Captcha AI for maximum su...

Python reCAPTCHA v2 Cloudflare Turnstile
Apr 03, 2026
Integrations Oxylabs + CaptchaAI: Datacenter Proxy Integration
Integrate Oxylabs datacenter, residential, and SERP proxies with Captcha AI for fast, reliable CAPTCHA solving at high throughput.

Integrate Oxylabs datacenter, residential, and SERP proxies with Captcha AI for fast, reliable CAPTCHA solving...

Python reCAPTCHA v2 Cloudflare Turnstile
Jan 31, 2026
Explainers Rotating Residential Proxies: Best Practices for CAPTCHA Solving
Best practices for using rotating residential proxies with Captcha AI to reduce CAPTCHA frequency and maintain high solve rates.

Best practices for using rotating residential proxies with Captcha AI to reduce CAPTCHA frequency and maintain...

Python reCAPTCHA v2 Cloudflare Turnstile
Mar 01, 2026
Integrations Smartproxy + CaptchaAI: Residential Proxy Setup for CAPTCHA Solving
Set up Smartproxy residential proxies with Captcha AI for reliable CAPTCHA solving with clean residential IPs.

Set up Smartproxy residential proxies with Captcha AI for reliable CAPTCHA solving with clean residential IPs.

Python reCAPTCHA v2 Cloudflare Turnstile
Feb 26, 2026
Integrations Bright Data + CaptchaAI: Complete Proxy Integration Guide
Integrate Bright Data's residential, datacenter, and ISP proxies with Captcha AI for high-success-rate CAPTCHA solving at scale.

Integrate Bright Data's residential, datacenter, and ISP proxies with Captcha AI for high-success-rate CAPTCHA...

Python reCAPTCHA v2 Cloudflare Turnstile
Feb 21, 2026
Use Cases Job Board Scraping with CAPTCHA Handling Using CaptchaAI
Scrape job listings from Indeed, Linked In, Glassdoor, and other job boards that use CAPTCHAs with Captcha AI integration.

Scrape job listings from Indeed, Linked In, Glassdoor, and other job boards that use CAPTCHAs with Captcha AI...

Python reCAPTCHA v2 Cloudflare Turnstile
Feb 28, 2026
Tutorials Handling Multiple CAPTCHAs on a Single Page
how to detect and solve multiple CAPTCHAs on a single web page using Captcha AI.

Learn how to detect and solve multiple CAPTCHAs on a single web page using Captcha AI. Covers multi-iframe ext...

Python reCAPTCHA v2 Cloudflare Turnstile
Apr 09, 2026
Integrations Selenium Wire + CaptchaAI: Request Interception for CAPTCHA Solving
Complete guide to using Selenium Wire for request interception, proxy routing, and automated CAPTCHA solving with Captcha AI in Python.

Complete guide to using Selenium Wire for request interception, proxy routing, and automated CAPTCHA solving w...

Python reCAPTCHA v2 Cloudflare Turnstile
Mar 13, 2026
Use Cases Shipping and Logistics Rate Scraping with CAPTCHA Solving
Scrape shipping rates, tracking data, and logistics information from carrier websites protected by CAPTCHAs using Captcha AI.

Scrape shipping rates, tracking data, and logistics information from carrier websites protected by CAPTCHAs us...

Python reCAPTCHA v2 Cloudflare Turnstile
Jan 25, 2026
Troubleshooting GeeTest v3 Error Codes: Complete Troubleshooting Reference
Complete reference for Gee Test v 3 error codes — from registration failures to validation errors — with causes, fixes, and Captcha AI-specific troubleshooting.

Complete reference for Gee Test v 3 error codes — from registration failures to validation errors — with cause...

Automation Testing GeeTest v3
Apr 08, 2026
Troubleshooting Turnstile Token Invalid After Solving: Diagnosis and Fixes
Fix Cloudflare Turnstile tokens that come back invalid after solving with Captcha AI.

Fix Cloudflare Turnstile tokens that come back invalid after solving with Captcha AI. Covers token expiry, sit...

Python Cloudflare Turnstile Web Scraping
Apr 08, 2026
Troubleshooting Common GeeTest v3 Errors and Fixes
Diagnose the most common Gee Test v 3 errors — stale challenge, bad parameters, validation failures — and fix them with practical troubleshooting steps.

Diagnose the most common Gee Test v 3 errors — stale challenge, bad parameters, validation failures — and fix...

Automation Testing GeeTest v3
Jan 24, 2026