HTTP 407 Proxy Authentication Required
HTTP 407 Proxy Authentication Required means a proxy server between the client and the destination needs credentials before it will forward the request.
Quick answer
HTTP 407 Proxy Authentication Required means a proxy server between the client and the destination needs credentials before it will forward the request. It is common on corporate networks; the proxy sends a Proxy-Authenticate header describing the required method.
Last updated · Maintained by FreeAIToolz · How we test
What does HTTP 407 Proxy Authentication Required mean?
407 works like 401, but the challenge comes from a proxy rather than the origin server. Command-line tools and package managers often hit it on company networks when proxy credentials are not configured.
| Status code | 407 |
|---|---|
| Name | Proxy Authentication Required |
| Class | 4xx Client Error |
| Defined in | RFC 9110 §15.5.8 |
| Cacheable by default | No, unless Cache-Control says so |
| Safe to retry automatically? | No: change the request first |
| Related headers | Proxy-Authenticate, Proxy-Authorization (request) |
What causes HTTP 407?
- A corporate or authenticated proxy without credentials configured.
- Expired proxy credentials.
How do I fix HTTP 407?
- Set proxy credentials (for example HTTPS_PROXY=http://user:pass@proxy:8080, or the npm/pip/git proxy settings).
- Ask IT whether the proxy uses NTLM/Kerberos, which some tools need extra support for.
What should a client do after HTTP 407?
Supply Proxy-Authorization and retry.
Does HTTP 407 affect SEO?
No impact on public sites; it happens inside private networks.
Example 407 response
HTTP/1.1 407 Proxy Authentication Required
Date: Mon, 01 Dec 2026 12:00:00 GMT
Proxy-Authenticate: Basic realm="corp-proxy"
Content-Type: application/json
{"error":{"status":407,"message":"Proxy Authentication Required"}} How to return 407 Proxy Authentication Required in code
Express (Node.js)
res.status(407).json({ error: 'Proxy Authentication Required' }); Next.js route handler
return Response.json({ error: 'Proxy Authentication Required' }, { status: 407 }); FastAPI (Python)
raise HTTPException(status_code=407, detail="Proxy Authentication Required") PHP
http_response_code(407); Nginx
location = /example {
return 407;
} Other 4xx status codes
The request contains an error or cannot be fulfilled as sent. Fix the request before retrying.
- 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
- 425 Too Early
- 426 Upgrade Required
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 451 Unavailable For Legal Reasons
- 499 Client Closed Request
Frequently asked questions
npm or pip returns 407. How do I fix it?
407 vs 401?
Is 407 a client or server error?
Related
- 401 Unauthorized HTTP 401 Unauthorized means the request lacks valid authentication credentials: no token, an expired token or .
- 403 Forbidden HTTP 403 Forbidden means the server understood the request but refuses to allow it.
- 511 Network Authentication Required HTTP 511 Network Authentication Required means you must log in to the network itself before you can browse, wh.
- Open the HTTP Status Codes Reference → Free, no signup.