devkult_
tools29converters34

407 Proxy Authentication Required

4xx client error

Like 401, but a proxy between you and the server wants credentials.

407 comes from a proxy, not from the origin server. The proxy requires the client to authenticate before it forwards anything, and says how in a Proxy-Authenticate header; credentials go back in Proxy-Authorization. You'll mostly meet it on corporate networks.

Class4xx Client Error
Retry?No — change the request first
Cacheable by defaultNo — only with explicit Cache-Control
Response bodyAllowed
Defined inRFC 9110 §15.5.8 — 407 Proxy Authentication Required
Example response
HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: Basic realm="proxy"
Content-Type: application/json
Content-Length: 41

{"error":"Proxy Authentication Required"}

Common causes

  • A corporate proxy requiring a login.
  • HTTP_PROXY / HTTPS_PROXY environment variables set without credentials.
  • npm, pip or git going through a proxy that needs authentication.

How to fix it

  1. Include credentials in the proxy URL: http://user:pass@proxy:8080, URL-encoding special characters.
  2. Configure the tool's own proxy settings (npm config set proxy …, git config --global http.proxy …).
  3. NTLM or Kerberos proxies may need a local helper such as cntlm — ask IT which schemes are supported.

Useful here: URL Encoder / Decoder

Check what a URL returns

Print just the status line from the command line, or check a whole list of URLs at once, with their response headers, in the HTTP Status Checker.

curl -sI https://example.com/your-path | head -n 1

Frequently asked questions

Why do I get 407 during npm install?

npm is going through a proxy that needs credentials. Set npm config set proxy and https-proxy to a URL that includes your username and password, URL-encoded.

Headers used with 407
Related status codes