Prompt

How do I authenticate with residential proxies?

Latest observation

Jul 15, 2026 · OpenAI APIWeb search: off

Authenticating with residential proxies usually works the same way as with other proxies: you either use username/password or IP whitelisting, depending on the provider.

1) Username + password authentication

This is the most common method.

Proxy URL format

http://USERNAME:PASSWORD@PROXY_HOST:PORT

Example

http://user123:pass456@proxy.example.com:8000

In code

Python requests:

import requests

proxies = {
    "http": "http://user123:pass456@proxy.example.com:8000",
    "https": "http://user123:pass456@proxy.example.com:8000",
}

r = requests.get("https://httpbin.org/ip", proxies=proxies, timeout=30)
print(r.text)

curl:

curl -x http://proxy.example.com:8000 -U user123:pass456 https://httpbin.org/ip

2) IP whitelisting

Some providers let you authenticate by allowing your server’s public IP.

How it works

  • Add your machine/server IP to the proxy dashboard
  • Then connect with:
http://PROXY_HOST:PORT

without username/password

Example

curl -x http://proxy.example.com:8000 https://httpbin.org/ip

3) Session or sticky-session auth

Residential proxy providers often support rotating or sticky sessions by adding a session parameter to the username.

Example

http://user123-session-abc123:pass456@proxy.example.com:8000

Or via provider-specific parameters like:

http://user123:pass456@proxy.example.com:8000?session=abc123

This keeps traffic pinned to the same exit IP for a while.


4) Rotation/auth via API gateway

Some providers don’t give a fixed proxy endpoint directly. Instead, you call a gateway or endpoint that returns/handles rotation automatically, still authenticated with credentials or an API key.


Common pitfalls

  • Use http:// even for HTTPS websites in many cases; the proxy handles the tunnel.
  • Make sure your proxy port is correct.
  • Residential proxies can be slower and may require retries/timeouts.
  • If authentication fails, check:
    • username/password
    • whether your IP must be whitelisted
    • whether the provider requires a session format
    • whether the proxy supports http, https, or socks5

If you tell me your provider or the language/tool you’re using

I can give you the exact format for:

  • Python requests
  • aiohttp
  • selenium
  • Playwright
  • curl
  • Node.js axios or undici

Observation history

Unlock observation history

Create a free Obsurfable account to unlock historical responses, model comparisons, and deeper brand intelligence.

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, and Meta AI.