HTTP 407 Proxy Authentication Required

A proxy between you and the server needs credentials before it will forward the request. It names the scheme it wants in Proxy-Authenticate.

Defined in RFC 9110 §15.5.8 — 407 Proxy Authentication Required · MDN reference

Where you meet HTTP 407 in production

Corporate and school networks with authenticating forward proxies; CI runners behind one; package managers failing to download for no apparent reason.

Why you would test it

Mostly a test of environment rather than code: what does your client do on a corporate network? Make sure the error it shows mentions the proxy, not the API.

What your client should do about a 407

Do not retry with the API's credentials — they go in Authorization, the proxy wants Proxy-Authorization. Most HTTP clients read proxy credentials from configuration or environment (HTTPS_PROXY with user:pass), not from code.

407 versus the codes it gets confused with

Endpoints that return 407

1 endpoint in this playground answers with 407. Every one is free, needs no signup, and can be called from the browser or with curl.

Questions about HTTP 407

Why do I get 407 only on one machine?
Because that machine is behind an authenticating proxy and the others are not, or its proxy credentials are missing or expired.
Which header carries proxy credentials?
Proxy-Authorization. It is consumed by the proxy and never forwarded to the server.

Other client error codes

All HTTP status codes · All 39 mock REST APIs · Getting started guide

Last updated