HTTP 407 Proxy Authentication Required
Updated Free mock REST & WebSocket APIs
HTTP 407 Proxy Authentication Required — Like 401, but the client must first authenticate with the proxy in between.
- Class
- 4xx Client Error
- Defined in
- RFC 9110 §15.5.8
- Official
- Yes (IANA registry)
- Cacheable by default
- No (unless Cache-Control/Expires say so)
- Safe to retry
- Not without changing the request
Try it: get a real 407 response
Our test endpoint answers every request with 407 Proxy Authentication Required.
curl -i https://mockfox.dev/api/status/407Use it in tests, health-check monitors or to see how your client handles a 407. Add ?delay=2000 to slow it down.
What does HTTP 407 mean?
Sent by a forward proxy (corporate proxy, Squid) with a Proxy-Authenticate header; the client must retry with Proxy-Authorization. If you see it from curl or npm, configure proxy credentials, e.g. https_proxy=http://user:pass@proxy:3128 or npm config set proxy.
How to fix 407
- Visitors: Reload the page, check the address for typos, and clear the site's cookies. If it persists, the site owner needs to fix it.
- Developers: Read the response body and server logs for details, fix the request (method, headers, body, credentials) and return a clear error message to clients.
Example 407 response
HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: Basic realm="corporate-proxy"
Content-Type: application/json
{"status":407,"error":"Proxy Authentication Required"}4xx Client Error: The request contains an error or can't be fulfilled — fix the request before retrying. See the full list of HTTP status codes.
Related status codes
- 401 UnauthorizedThe request lacks valid authentication credentials; it must include a WWW-Authenticate challenge.
- 403 ForbiddenThe server understood the request but refuses to authorize it.
- 511 Network Authentication RequiredThe client must authenticate to gain network access (captive portal).
Related tools
Frequently asked questions
What does HTTP 407 Proxy Authentication Required mean?
Like 401, but the client must first authenticate with the proxy in between.
Is 407 a client or a server error?
407 is a 4xx code, so it signals a problem with the request (as seen by the server). Retrying the identical request usually gives the same result.
Where is 407 defined?
In RFC 9110 §15.5.8. It's listed in the IANA HTTP Status Code Registry.
How can I test how my app handles a 407?
Call https://mockfox.dev/api/status/407 — it responds with 407 to any method, with CORS enabled. Add ?delay=2000 to simulate a slow response.