407 Proxy Authentication Required
Like 401, but the credentials are demanded by an intermediate proxy (often a corporate or ISP proxy) rather than the origin server.
The client must authenticate with a proxy server before the request can proceed.
What HTTP 407 Proxy Authentication Required Means
The client must authenticate with a proxy server before the request can proceed.
Like 401, but the credentials are demanded by an intermediate proxy (often a corporate or ISP proxy) rather than the origin server.
Common Causes
- Corporate or ISP proxy requires login
- Missing or expired Proxy-Authorization header
- Incorrect proxy credentials configured in the client
How to Fix It (For Visitors)
- Enter your proxy username and password
- Check your network/proxy settings
- Contact your IT department
How to Fix It (For Developers/Admins)
- Send a Proxy-Authorization header
- Respond with a Proxy-Authenticate header describing the scheme
- Verify proxy configuration in your HTTP client
Returning a 407 Proxy Authentication Required (Code Examples)
If you build APIs or web apps, here is how to send an HTTP 407 response and how to test for it:
Node.js (Express)
app.get('/resource', (req, res) => {
res.status(407).json({ error: 'Proxy Authentication Required' });
});
Python (Flask)
@app.route('/resource')
def resource():
return jsonify(error='Proxy Authentication Required'), 407
PHP
<?php
http_response_code(407);
header('Content-Type: application/json');
echo json_encode(['error' => 'Proxy Authentication Required']);
Check the status with curl
curl -I https://example.com/resource
# Look for: HTTP/1.1 407 Proxy Authentication Required
Frequently Asked Questions
What does HTTP 407 Proxy Authentication Required mean?
Like 401, but the credentials are demanded by an intermediate proxy (often a corporate or ISP proxy) rather than the origin server. In short: The client must authenticate with a proxy server before the request can proceed.
Is 407 Proxy Authentication Required a client or server error?
407 is a 4xx client-error code, so the request itself needs to change. The server is running normally and is rejecting the request as it was sent by the browser, app, or API client.
How do I fix a 407 Proxy Authentication Required error?
Send a Proxy-Authorization header. Respond with a Proxy-Authenticate header describing the scheme. Verify proxy configuration in your HTTP client.
Official Specification
The 407 Proxy Authentication Required status code is defined in RFC 9110 Section 15.5.8.