407 Proxy Authentication Required Error
The proxy did not recognize you: the username, password or sign-in method did not match. The request never reached the site.
Updated · Prokso editorial team
- Code 407 comes from the proxy itself: it rejected your username, password or sign-in method
- The usual cause is a typo in the username or password, such as an extra space
- Copy the proxy line from the dashboard again, the whole line, using the copy button
What the error means
The 407 code is sent by the proxy server itself, not by the site. It means the proxy requires authentication and either did not get it or got wrong credentials. Until you are authenticated, no request goes past the proxy.
In Prokso the code comes with a reason name in capital letters, for example 407 NO_USER or 407 TRAFFIC_EXHAUSTED. It shows what exactly is wrong: the credentials, the remaining traffic, the number of connections or the port.
What the error looks like in your app
| Where | What you see |
|---|---|
| curl, HTTPS website | curl: (56) CONNECT tunnel failed, response 407 |
| curl -v | < HTTP/1.1 407 NO_USER and a Proxy-Authenticate line |
| curl, HTTP website | a HTTP/1.1 407 NO_USER response instead of the page |
| Python requests, HTTPS website | ProxyError: … Tunnel connection failed: 407 NO_USER |
| Python requests, HTTP website | no exception: you get a response with status 407 - check r.status_code |
| Firefox | a window asking for the proxy username and password (see the guide) |
| Port 824 (SOCKS5) | there is no 407: curl prints (97) User was rejected by the SOCKS5 server, see SOCKS5 errors |
What the code means in Prokso
| Code | What happened | What to do |
|---|---|---|
NO_USER | the username or password did not match or was not sent | copy the line from the dashboard again; check that your app sends the username and password |
TRAFFIC_EXHAUSTED | the plan is out of traffic | top up gigabytes |
USER_BLOCKED | the plan is paused | resume the plan in the dashboard |
THREADS_EXHAUSTED | more connections are open than the plan allows | reduce the number of threads or split the work between plans |
PORT_NOT_ALLOWED | the sticky IP port is outside the 10000-20000 range | take a port from the generator in the dashboard: sticky ports run from 10000 to 20000 |
Causes
- A typo in the username or password. An extra space, the username and password swapped, or a line cut off while copying.
- The password was changed. After a plan password reset, the old one stops working at once.
- The geo parameters are written incorrectly. The country and other parameters go in the username after “__” with no spaces; one extra character breaks the whole username.
- The program does not send the username and password. Some programs and extensions only understand the host:port format and silently drop the credentials.
- The plan has run out of traffic or is paused. In that case you get
TRAFFIC_EXHAUSTEDorUSER_BLOCKEDinstead ofNO_USER. - Too many simultaneous connections. The
THREADS_EXHAUSTEDcode: the program opened more threads than the plan allows.
How to fix it
- Open the plan in the dashboard and copy the proxy line again - the whole line, using the copy button.
- Check the format the program expects. If it needs the parts in a different order, convert the line in the proxy format converter.
- Make sure the port is correct: 823 is HTTP, 824 is SOCKS5, 10000 to 20000 is a sticky IP.
- Check the remaining traffic and the plan status. If the gigabytes have run out, top up traffic; if the plan is paused, resume it.
- If the program cannot send a username and password, turn on the IP whitelist in the plan settings and add your address.
- On
THREADS_EXHAUSTED, reduce the number of threads or split the tasks between plans.
How to check that it works
Paste the line into the proxy checker: it shows whether the proxy accepts your credentials and which country it exits from. If the check passes but the program still returns 407, the cause is in the program settings.
Two-minute diagnosis
First paste the line into the proxy checker. If the proxy works there, the cause is in your app or its settings. If not, test the line from a terminal:
curl -v -x "http://USERNAME:PASSWORD@gw.prokso.com:823" https://api.ipify.org
- A
< HTTP/1.1 407line right afterCONNECTmeans the proxy answered. The name after the code, for exampleNO_USER, points to the cause. - The proxy answered
CONNECTwith 200 and then another code arrived - the proxy works, and that answer came from the website. - No answer at all, only a timeout - the connection never reached the proxy: check the host, port and network.
Special characters in the password and old environment variables
In the protocol://username:password@host:port format, the characters @ : / # ? % inside the username or password break parsing: the app picks the wrong username and gets 407. Encode such characters (for example, @ → %40) or choose the host:port:username:password format in the generator if your app supports it.
If a script takes the proxy from the HTTP_PROXY and HTTPS_PROXY variables, the old line may still be there after a password change. Check the environment variables and restart the terminal or the app.
How 407 differs from 401 and 403
| Code | Who answers | What it is about |
|---|---|---|
| 407 | the proxy | proxy username and password, traffic left, number of connections - all in your Prokso dashboard |
| 401 | the website | signing in to an account on the website itself; proxy credentials are not involved |
| 403 | the website | the website refused access to the page |
The 407 code and the Proxy-Authenticate header are defined in the HTTP standard, RFC 9110.
407 on a work network and on Windows
Sometimes 407 shows up even though you never set a proxy. Then the answer comes from your organization's proxy: on work computers it is often set in the system settings. On Windows this is the proxy section of the network settings. Browsers and many apps take the address from there, and that section has no fields for a username and password: each app asks for them separately.
You can tell someone else's proxy from Prokso by the response. The Prokso gateway writes the reason name after the code, for example 407 NO_USER. A corporate proxy often offers sign-in with a Windows account in the Proxy-Authenticate header - the Negotiate or NTLM schemes:
< HTTP/1.1 407 Proxy Authentication Required
< Proxy-Authenticate: Negotiate
< Proxy-Authenticate: NTLM
Under RFC 9110, a proxy must send at least one Proxy-Authenticate header with a sign-in scheme along with 407. The Negotiate and NTLM schemes themselves are not part of the HTTP standard: they are a Microsoft extension (RFC 4559), and sign-in with them is tied to one connection. An app that only knows a username and password keeps getting 407 on such a network. curl has the --proxy-negotiate, --proxy-ntlm and --proxy-anyauth options for these proxies, but access to a corporate proxy comes from your network administrator, not from Prokso.
How to pass the proxy username and password to git, npm, pip and Docker
Command-line tools do not show a sign-in window, so the username and password go into the proxy URL. The examples use HTTP port 823; encode special characters in the password as described above.
| Tool | How to set a proxy with a username |
|---|---|
| git | git config --global http.proxy http://USERNAME:PASSWORD@gw.prokso.com:823. You can leave the password out (http://USERNAME@gw.prokso.com:823): git will then ask for it the same way it asks for other credentials. The sign-in scheme is set by http.proxyAuthMethod, anyauth by default. |
| npm | npm config set proxy http://USERNAME:PASSWORD@gw.prokso.com:823 and npm config set https-proxy http://USERNAME:PASSWORD@gw.prokso.com:823. If they are not set, npm takes the proxy from the HTTP_PROXY and HTTPS_PROXY variables. |
| pip | pip install --proxy http://USERNAME:PASSWORD@gw.prokso.com:823 package or the PIP_PROXY variable with the same line. |
| Docker Engine | a "proxies" block in /etc/docker/daemon.json with the http-proxy, https-proxy and no-proxy keys, then a restart of the Docker service. Docker Desktop ignores this file: set the proxy in its settings instead. |
| curl | curl -x http://gw.prokso.com:823 -U "USERNAME:PASSWORD" https://api.ipify.org - the username goes in a separate option, with no special characters in the URL. |
git and npm keep the password in their settings files as plain text. On shared computers IP access is more convenient: the URL is then just http://gw.prokso.com:823. Ports and the username format are collected on the gateway settings page, and a step-by-step check is in proxy troubleshooting.
Setup guides where this error comes up
FAQ
How is 407 different from 401?
401 is sent by the site: it asks you to sign in to an account on the site itself. 407 is sent by the proxy: it did not accept the proxy username and password. Your site credentials have nothing to do with it.
The password is correct, but 407 remains. Why?
Most often the program does not send the credentials or sends them in a different format. Test the line in the proxy checker on the site: if everything works there, look for the authentication setting in the program.
Can I connect without a username and password?
Yes, with the IP whitelist: add up to 5 of your IP addresses in the plan settings and connect in the host:port format.
Why do I get 407 on a work network when I never set a proxy?
Your requests go through the organization's proxy set in the system. If the response has no reason name like NO_USER and Proxy-Authenticate lists Negotiate or NTLM, the answer is not from Prokso. Access to that proxy comes from your network administrator.
What should I do about 407 on a phone?
On an iPhone, turn on authentication in the Wi-Fi proxy settings and enter the plan username and password without spaces. Android has no username field there, and only the browser shows a sign-in window, so turn on IP access for apps. Step by step: the iPhone and Android guides.
The password is right, but my antidetect browser shows 407. What should I check?
Most often a space got into the field, the username was cut off when pasting, or the profile still has the old password after a reset. Check the traffic left too: TRAFFIC_EXHAUSTED also comes with code 407, and apps often show only the code itself. You can test the line quickly in the proxy checker.
Other proxy errors
Residential $1.59, mobile $2.50, datacenter $0.65 per GB
Sign up in a minute, get access right after payment.