{ }HttpStatus.com

407 Proxy Authentication Required

Like 401, but the client must first authenticate with an intermediary proxy before the request can be forwarded.

Defined in RFC 9110 §15.5.8

What 407 means

407 Proxy Authentication Required is the proxy-layer counterpart to 401: it means an intermediary proxy between the client and the origin server needs authentication before it will forward the request further. RFC 9110 requires the proxy to send a Proxy-Authenticate header naming an acceptable scheme, and the client is expected to retry with a Proxy-Authorization header carrying credentials for that proxy specifically, separate from any Authorization header intended for the origin server.

This shows up almost exclusively in environments with a mandatory forward proxy: corporate networks that route all outbound traffic through an authenticating gateway, some VPN configurations, and certain enterprise API testing setups. It is distinct from a normal 401, which concerns the origin server's own authentication; a request can pass proxy authentication and still receive a 401 from the destination server, or vice versa.

Debugging 407s in practice usually means checking the client's or the system's proxy configuration rather than the application's own authentication logic, since many HTTP libraries need proxy credentials configured completely separately from any request-level Authorization header meant for the origin server, and some authentication schemes that proxies rely on, such as NTLM or Kerberos/Negotiate, require a multi-step handshake that simple HTTP clients don't implement by default, which produces failures that look more like a stuck connection than a clean, obvious 407.

Common causes

  • The client has no proxy credentials configured in its network or HTTP client settings.
  • Previously cached proxy credentials have expired or been revoked.
  • The proxy requires an authentication handshake, such as NTLM or Kerberos, that the client library doesn't support.
  • System or application proxy settings point to an authenticating proxy the client wasn't expecting.

How to fix a 407

If you are the client (browser user or API caller)

  • Configure the proxy username and password in the operating system's or HTTP client's network settings.
  • Confirm the HTTP client library supports the proxy's required authentication scheme, such as Basic, NTLM, or Negotiate.
  • Verify the configured proxy host and port are still correct for the current network.

If you run the server

  • Send a Proxy-Authenticate header naming the scheme the proxy actually supports.
  • Keep the proxy's credential store or identity provider in sync so valid users aren't rejected.
  • Return error messaging that clearly distinguishes proxy authentication from origin-server authentication to avoid confusing debugging.

Example

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

HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: Basic realm="corp-proxy"
Content-Length: 0
The corporate forward proxy, not the origin server, is demanding credentials before it will relay the request.

Try it live

Our free status responder returns a real HTTP 407 you can point tests, monitors or a browser at.

GET https://mcp.httpstatus.com/status/407

Related status codes

Tools for debugging this