Skip to content
Troubleshooting

407 Proxy Authentication Required: Every Cause and Its Fix

HTTP 407 Proxy Authentication Required means the proxy refused your request before it ever reached the target. Nothing about the destination site is involved yet: the connection stopped at your provider's edge because it did not receive credentials it recognised. That makes 407 the most tractable error in the whole stack — the fault is always on your side, and there are only about eight things it can be.

seamless Team9 min readAugust 9, 2026
  • troubleshooting
  • 407
  • proxy authentication
  • http status codes
A routing line halted at a relay block whose empty keyhole recess glows crimson, the onward path fading into darkness

The reason 407 is worth its own page is that the error message points in the wrong direction for most people. It arrives while you are fetching a website, it looks like an HTTP error from that website, and the natural next step — change the target, change the headers, rotate the exit — is wasted effort every single time.

Confirm it in one command

Before touching application code, take the application out of the picture entirely.

Run curl -x http://USER:PASS@HOST:PORT https://api.ipify.org and read the result. An IP address means the proxy accepted your credentials and the problem is in your client. Another 407 means the credentials, the plan or the endpoint is wrong, and no client change will help.

Run this from the same machine and network as the failing job. IP-authenticated proxies behave completely differently from your laptop than from a cloud worker, and that difference is itself one of the eight causes.

The eight causes, in order of frequency

1. A typo, or a character the shell ate

Proxy passwords often contain @, : and #, all of which are meaningful inside a URL. A password containing @ splits the URL at the wrong point and sends half of it as a hostname. URL-encode the credentials, or pass them with a dedicated flag such as curl's -U user:pass instead of embedding them.

2. The client never sends proxy credentials

Plenty of tools accept a proxy URL and quietly discard the userinfo part. Chromium is the significant one: --proxy-server takes no credentials at all, which is why Puppeteer and Playwright need an explicit authentication step rather than a URL. Anything built on Chromium inherits the same gap.

3. IP authentication and a changed address

Whitelist authentication works until your public address moves — a router reboot, a new office, a cloud instance recycled onto a different address, a VPN toggled on. Nothing in the error says so. Check your current address against the allowlist first; our IP tool shows what the proxy actually sees.

4. Mixing the two authentication modes

Most providers, including us, expect one mode per sub-user: either credentials or an allowlisted address. Configuring an allowlist and then also sending a username can be read as a mismatch rather than as belt and braces.

5. Wrong port for the protocol

HTTP and SOCKS5 endpoints usually listen on different ports. Pointing a SOCKS client at the HTTP port produces a confusing mixture of 407s and connection resets rather than a clean protocol error.

6. An expired plan or exhausted balance

Correct credentials against an inactive plan are still refused, and the status code does not distinguish the two. Check the dashboard before assuming a configuration fault.

7. Session syntax in the username

Sticky sessions and geo-targeting are commonly encoded in the username — country, session id, TTL, separated by a delimiter. A typo in that string is a bad username, not a bad option, and comes back as 407. Generate it rather than hand-editing it.

8. An intermediary stripping the header

Corporate networks, VPN clients and some container runtimes rewrite or drop Proxy-Authorization. If curl succeeds on your machine and fails from a build agent with the same credentials, suspect the path rather than the payload.

Check credentials without writing code

Paste a proxy into the tester and get reachability, exit IP, latency and the exact failure reason back in seconds.

Open the proxy tester

Language-specific traps

ClientWhat goes wrong
Python requestsWorks with credentials in the URL, but the password must be URL-encoded — see python requests proxies
Chromium / Puppeteer / PlaywrightCredentials in --proxy-server are ignored; authenticate through the API instead
SeleniumThe Chrome driver inherits the same limitation; a manifest extension or an authenticated local relay is the usual workaround
ScrapyNeeds a Proxy-Authorization header, not just proxy in the request meta
curl-x accepts userinfo, but the shell may consume special characters before curl sees them
Node fetch / undiciNo proxy support out of the box; without a dispatcher the proxy setting is silently ignored

Telling 407 apart from its neighbours

SymptomMeaning
407Proxy refused your credentials
403Target refused you — see HTTP 403
Connection refusedNothing listening on that host and port
502 from the proxyUpstream fetch failed; retry on a new exit
Timeout on CONNECTWrong port, or a firewall between you and the proxy

Log the exit IP alongside every failure. A 407 that appears only on some requests usually means one sub-user in a rotation has different credentials or a different authentication mode from the rest.

Stopping it happening again

  • Keep credentials in environment variables, never inline in the code that gets copied between projects.
  • URL-encode at build time rather than trusting the shell, the YAML parser and the client to agree.
  • Prefer credential authentication anywhere the source address can change — laptops, CI runners, autoscaling workers.
  • Give each workload its own sub-user, so a rotated password takes down one job instead of all of them.
  • Treat a first 407 in production as a credentials incident, not a transient error, and skip the retry loop.

Once the curl test passes, everything left is client behaviour, and client behaviour is documented. That is why 407 is the error worth fixing properly the first time: unlike a block, it never comes back on its own.

Sources

Frequently asked questions

What does 407 Proxy Authentication Required mean?

The proxy server rejected your request because it did not receive credentials it recognised. The request never reached the destination website, so the target site plays no part in the error.

Why does my proxy work in curl but not in my application?

Because the application is not sending the credentials. Chromium-based tools ignore userinfo in the proxy URL entirely, some HTTP libraries need a separate proxy-auth setting, and Node's built-in fetch needs an explicit dispatcher before it uses a proxy at all.

Does a 407 mean my proxy is banned?

No. A ban would come from the target as a 403 or a challenge page. A 407 is your own provider declining the connection, which points at credentials, plan status or authentication mode.

Why did IP authentication suddenly stop working?

Your public address almost certainly changed — a router reboot, a new network, a recycled cloud instance or a VPN. Check the address the proxy sees against your allowlist, and switch to credential authentication for anything that moves between networks.

How do I handle special characters in a proxy password?

URL-encode them. Characters such as @, : and # have structural meaning inside a proxy URL, and an unencoded @ will split the URL at the wrong place. Alternatively pass credentials through a dedicated option instead of embedding them in the URL.

Should my scraper retry after a 407?

No. A 407 is a configuration fault, not a transient one, so retrying only burns the queue. Fail fast, alert, and fix the credentials or the allowlist.

SE
seamless Team
Proxy infrastructure

The seamless team runs residential, ISP and datacenter proxy infrastructure and writes these guides from day-to-day operational experience.

Ready to try seamless proxies?

Residential, ISP and datacenter proxies with no data expiry.

Browse Plans