SiteError.comYour friendly guide to HTTP status codes
Status CodesBlog
  1. Home
  2. 4xx Client Error
  3. 407 Proxy Authentication Required

407 Proxy Authentication Required

🎫
407
Proxy Authentication Required
!
?

Example HTTP Response

HTTP Response
HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: Basic realm="Proxy"
Common Causes
  • Corporate proxy requiring login
  • Proxy credentials expired
  • Missing proxy authentication
Technical Details

What does this mean?

The middleman needs ID too! Before reaching your destination, you need to prove yourself to the proxy server.

Technical Definition

The client must first authenticate itself with the proxy.

RFC Says

"The 407 (Proxy Authentication Required) status code is similar to 401 (Unauthorized), but it indicates that the client needs to authenticate itself in order to use a proxy. The proxy MUST send a Proxy-Authenticate header field containing a challenge applicable to that proxy for the target resource."

Plain English:

407 means 'You need to log in to the proxy server first.' Unlike 401 which is about authenticating with the destination server, 407 is specifically about authenticating with an intermediate proxy server that sits between you and the destination.

Common Misinterpretation

Don't confuse 407 with 401. Use 407 only when a proxy server needs authentication, not when your application server needs it. Most developers will never need to return 407 since it's specific to proxy server implementations.

View RFC Documentation
Code Snippets

Ready-to-use code for returning this HTTP status in your application:

Node.js
// Express.js
app.get('/example', (req, res) => {
  res.status(407).json({
    error: 'Proxy Authentication Required',
    message: 'Your error message here'
  });
});

// Native HTTP
const http = require('http');

http.createServer((req, res) => {
  res.writeHead(407, { 'Content-Type': 'application/json' });
  res.end(JSON.stringify({
    error: 'Proxy Authentication Required',
    message: 'Your error message here'
  }));
}).listen(3000);
Related Status Codes
🔐401Unauthorized🚫403Forbidden

407 Proxy Authentication Required FAQ

What causes a 407 Proxy Authentication Required error?

Corporate proxy requiring login. Proxy credentials expired. Missing proxy authentication.

406 Not Acceptable408 Request Timeout

Popular Status Codes

  • 200 OK
  • 301 Moved Permanently
  • 302 Found
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 500 Internal Server Error
  • 502 Bad Gateway
  • 503 Service Unavailable

Compare Codes

  • 401 vs 403
  • 301 vs 302
  • 404 vs 410
  • 500 vs 502
  • Compare any codes →

Categories

  • Informational
  • Success
  • Redirection
  • Client Error
  • Server Error
  • NGINX
  • Cloudflare
  • AWS ELB
  • Microsoft IIS

Tools

  • Cheat Sheet
  • Status Code Quiz
  • URL Checker
  • API Playground
  • Blog

© 2026 SiteError.com. All rights reserved.