What HTTP 407 means
Like 401, but for a proxy between the client and the server, usually a corporate proxy. The proxy sends Proxy-Authenticate, and the client retries with Proxy-Authorization.
How to fix a 407 error
-
For command-line tools, set credentials in the proxy URL:
HTTPS_PROXY=http://user:pass@proxy:8080.
Retrying
No. Fix the request first; sending it again unchanged will get the same response.
Example response
HTTP/1.1 407 Proxy Authentication Required
Date: Wed, 21 Oct 2026 10:30:00 GMT
Proxy-Authenticate: Basic realm="corp-proxy"
Content-Type: application/json
How to return 407
res.status(407).json({ error: 'Proxy Authentication Required' });
from fastapi import HTTPException
raise HTTPException(status_code=407, detail="Proxy Authentication Required")
http.Error(w, http.StatusText(http.StatusProxyAuthRequired), http.StatusProxyAuthRequired)
location /private/ {
return 407;
}
Related status codes
- 401 Unauthorized : The request needs valid authentication credentials.
- 403 Forbidden : The server understood the request but refuses to authorize it.
Other 4xx status codes
400 Bad Request · 401 Unauthorized · 402 Payment Required · 403 Forbidden · 404 Not Found · 405 Method Not Allowed · 406 Not Acceptable · 408 Request Timeout · 409 Conflict · 410 Gone · 411 Length Required · 412 Precondition Failed · 413 Content Too Large · 414 URI Too Long · 415 Unsupported Media Type · 416 Range Not Satisfiable · 417 Expectation Failed · 418 I’m a Teapot · 421 Misdirected Request · 422 Unprocessable Content · 423 Locked · 424 Failed Dependency · 425 Too Early · 426 Upgrade Required · 428 Precondition Required · 429 Too Many Requests · 431 Request Header Fields Too Large · 444 No Response · 451 Unavailable For Legal Reasons · 499 Client Closed Request
See the full list of HTTP status codes.
Sources
Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.
Frequently asked questions
What does HTTP 407 Proxy Authentication Required mean?
HTTP 407 Proxy Authentication Required means the client must authenticate with a proxy before the request can go through. Like 401, but for a proxy between the client and the server, usually a corporate proxy. The proxy sends Proxy-Authenticate, and the client retries with Proxy-Authorization.
How do I fix HTTP 407?
For command-line tools, set credentials in the proxy URL: HTTPS_PROXY=http://user:pass@proxy:8080.