407 Proxy Authentication Required

The proxy between the client and the destination requires credentials before it will forward the request.

Status

HTTP/1.1 407 Proxy Authentication Required

Details

407 is 401's counterpart for intermediaries. It comes from the proxy itself, not from the site being requested, and it means the request never reached its destination. The response must carry a Proxy-Authenticate header naming the scheme, and the client answers with Proxy-Authorization rather than Authorization.

In proxy-based automation it is the single most common configuration error: credentials in the wrong header, credentials that were never sent because the library only handles Authorization, or a URL-embedded username and password containing characters that need percent-encoding.

Headers

Common causes

How to fix it

As the client

As the server

Examples

GET http://example.com/ HTTP/1.1
Host: example.com

HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: Basic realm="proxy"

GET http://example.com/ HTTP/1.1
Host: example.com
Proxy-Authorization: Basic dXNlcjpwYXNz

HTTP/1.1 200 OK

Notes for proxy users

Stat Proxies authenticates proxy connections with username and password over HTTP and HTTPS, so a 407 always points at the credential pair or how the client is passing it. Check the credentials in the dashboard, then reproduce with curl before blaming the target site: if curl through the proxy succeeds, the problem is in how your library forwards proxy credentials.

Specifications

RFC 9110 §15.5.8

See also