Start free · Free tools · Fair usage limits
Browse Tools

Categories

Custom AI Solutions – AI2Flows
LIVE NEWS
Loading latest AI & SEO news…
Home›Tools›HTTP Status Codes Reference›HTTP 407 Proxy Authentication Required
4xx Client Error

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 code407
NameProxy Authentication Required
Class4xx Client Error
Defined inRFC 9110 §15.5.8
Cacheable by defaultNo, unless Cache-Control says so
Safe to retry automatically?No: change the request first
Related headersProxy-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?

  1. Set proxy credentials (for example HTTPS_PROXY=http://user:pass@proxy:8080, or the npm/pip/git proxy settings).
  2. 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.

Frequently asked questions

npm or pip returns 407. How do I fix it?
Configure the proxy with credentials, for example npm config set proxy http://user:pass@host:port (and https-proxy), or set HTTPS_PROXY for pip.
407 vs 401?
401 is a challenge from the destination server; 407 is a challenge from a proxy in between.
Is 407 a client or server error?
407 is in the 4xx class, so it is classed as a client error: the request needs to change before it can succeed.