407

Proxy Authentication Required

Overview

407 Proxy Authentication Required means you must authenticate with an intermediate proxy before the request can proceed. Unlike 401, which asks for authentication to the origin server, 407 is the proxy between client and server demanding credentials.

By spec a 407 response includes a Proxy-Authenticate header stating which scheme the proxy wants, and the client must reply with credentials in a Proxy-Authorization header.

When it happens

Request / Response example

Request
GET http://example.com/ HTTP/1.1
Host: example.com
(sent through a corporate proxy without credentials)
Response
HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: Basic realm="Corporate Proxy"
Content-Type: text/html

<h1>Proxy Authentication Required</h1>

In code

curl -x http://proxy.corp:8080 \
     --proxy-user alice:secret \
     http://example.com/

Common causes

How to fix

Notes

Related status codes

Related headers

Specification