Proxy Shows 407 Proxy Authentication Required: How to Fix It
A 407 response is good news in one sense: the proxy answered. Here is how to find out why your credentials or IP authorization were not accepted, and how to fix it.
10 min readUpdated Nov 15, 2026By XPASS Editorial Team

An HTTP 407 status is one of the most common messages people meet in their first week with a proxy. The text is short, "Proxy Authentication Required", and it can look alarming, but it carries useful news: your request reached the proxy, and the proxy is willing to talk to you. It simply does not accept the way you introduced yourself. That narrows the problem down to a small set of causes, almost all of which you can fix on your own in a few minutes.
This guide explains what a 407 really means, how it differs from the similar 401 and 403 responses, the usual causes, and a step-by-step method to test and repair each one. It assumes you are using a proxy for lawful purposes and respect the terms of the websites you contact.
What a 407 actually says
HTTP defines a challenge and response pattern for authentication, described in RFC 9110, HTTP Semantics. When a proxy requires credentials, it answers with status 407 and a Proxy-Authenticate header that names the scheme it accepts, most often Basic. The client is expected to repeat the request with a Proxy-Authorization header that carries the credentials. With the Basic scheme, the header contains username:password encoded in Base64. Note that Base64 is an encoding, not encryption, which is one reason credentials should travel only to proxies you trust and over connections you control.
So a 407 means one of the following:
- Your tool did not send a
Proxy-Authorizationheader at all. - It sent one, but the username or password was wrong.
- It sent a scheme the proxy does not support.
- The proxy uses IP authorization and your source address is not on its list.
- The account or plan behind the credentials is not currently active.
You can see the challenge yourself by running curl -v -x http://host:port https://example.com/ without credentials. The verbose output will show the 407 and the Proxy-Authenticate line. That is a handy way to confirm that you are talking to the right endpoint before you debug anything else.

401, 403 and 407: do not mix them up
Three status codes cause most of the confusion.
| Code | Who sends it | What it means | Typical fix |
|---|---|---|---|
| 401 Unauthorized | The destination website | You must log in to that site | Use the site's own credentials |
| 403 Forbidden | The website (or sometimes the proxy) | Access is understood but refused | Review permissions, rules and terms |
| 407 Proxy Authentication Required | The proxy | You must authenticate to the proxy | Fix proxy username, password or IP authorization |
If you see a 407, the website has not even been contacted yet. Changing the target URL, rotating user agents or adding headers meant for the website will not help. If you instead see a 403 after the proxy connection works, the cause lies elsewhere, as discussed in the article on why a proxy shows 403 Forbidden.
The common causes, from most to least frequent
1. Credentials typed or pasted incorrectly. A trailing space, a line break copied from a dashboard, a letter O in place of a zero or a lowercase l in place of an uppercase I are all classic problems. Retype the values by hand once to rule them out.
2. Special characters in the password inside a URL. Many tools take a proxy as a single URL such as http://user:pass@host:port. If the password contains @, :, /, # or %, the URL parser may split it in the wrong place. Percent-encode those characters (for example @ becomes %40) or, better, put the username and password in separate fields or options.
3. Using the wrong credentials. The login for your account dashboard is usually not the same as the proxy username and password. Check the order or proxy details page for the dedicated values.
4. IP authorization does not match. Some plans accept connections only from registered IP addresses. Your home or mobile connection may have changed address since you registered. Look up your current public IP and compare it with the authorized list shown on the plan page.
5. The tool never sends credentials for HTTPS traffic. When you request an HTTPS site through an HTTP proxy, the client first sends a CONNECT request. Some libraries and older tools add the Proxy-Authorization header to normal requests but forget it on CONNECT, which produces a 407 only for HTTPS targets. Updating the library or using its dedicated proxy authentication option usually solves this.
6. Environment variables or system settings override your code. Variables such as HTTP_PROXY, HTTPS_PROXY and ALL_PROXY or an operating system proxy setting can send traffic to a different proxy than the one you configured. Print the variables and check what your tool actually uses.
7. The plan is expired, suspended or over a limit. A proxy account that is no longer active may answer with an authentication failure rather than a helpful message. Open the dashboard and confirm the status. The included allowances differ between plans, so read the Proxy page for what your plan covers instead of assuming.
8. Protocol mismatch. If you send an HTTP proxy request to a SOCKS5 port, authentication cannot succeed. SOCKS5 has its own username and password method defined in RFC 1928 and related documents, and it is not the same mechanism as the HTTP Proxy-Authorization header. Make sure your scheme matches the port.
A step-by-step test
Work through this sequence and stop at the first step that changes the result.
- Confirm the endpoint. Run
curl -v -x http://host:port https://example.com/with no credentials. If you get a 407 with aProxy-Authenticateheader, the host and port are right and the proxy requires authentication. - Add credentials explicitly. Run
curl -v -x http://host:port -U "username:password" https://example.com/. Using-Uavoids URL parsing problems. If this works, your credentials are valid, and the problem is in how your application passes them. - Test the URL form. If you must use
http://username:password@host:port, encode special characters and test again with curl using--proxyand the encoded URL. - Check IP authorization. Visit a page that shows your public IP, compare it with the authorized list, and update the list if it differs. Wait a short moment for the change to apply, then retry once.
- Test the HTTPS path. If plain HTTP targets work but HTTPS targets return 407, suspect the
CONNECThandling in your library. Update it, or look for a documented option for proxy credentials. - Check for overrides. Print
HTTP_PROXY,HTTPS_PROXYandNO_PROXYand review system proxy settings. Remove conflicting values. - Verify the plan. Open the dashboard and confirm that the order is active and that the credentials shown there match what you use.
If the sequence ends and you still receive 407 with correct credentials from an authorized IP, collect your evidence and use the checklist in 10 checks before contacting support.
A worked example
A small team builds a lawful monitoring script that checks public product pages. On the developer's laptop it works. On a cloud server every request returns 407.
They first run curl with explicit credentials from the server: success. So the credentials are valid and the proxy is reachable. The failing script builds the proxy URL from an environment variable, and the password in it contains a #. The URL parser treats everything after # as a fragment, so the password is cut short. They switch the library to separate username and password options and the 407 disappears for HTTP targets.
HTTPS targets still fail on the server, though. The server's address is also different from the laptop's, and the plan uses IP authorization in addition to credentials. They add the server's public IP to the authorized list, retry once, and everything works. Two separate causes produced the same status code, which is why working through the list in order matters more than guessing.
What to watch for
- Do not retry in a tight loop. A 407 will repeat until the cause is fixed. Many identical failed authentications in a short time can look like a credential-guessing attack and may lead to temporary blocks.
- Protect credentials. Do not paste them in screenshots, public repositories or support chats. Store them in environment variables or a secrets manager, and rotate them if they leak.
- Beware of logs. Verbose logs and error messages sometimes print the full proxy URL, including the password. Mask them before sharing.
- Dynamic IPs change. If your plan relies on IP authorization and your connection is dynamic, expect to update the list occasionally, or use credentials where the plan allows it.
- Stay lawful. Authentication errors are not a reason to try other people's credentials or to bypass access controls. Use only credentials issued to you, respect website terms and follow local law.
A short checklist makes the test repeatable. First, copy the host, port, username and password directly from the order page rather than retyping them, since look-alike characters such as the letter O and the digit zero are a frequent source of mistakes. Second, confirm the protocol: some setups expect HTTP proxy settings for both HTTP and HTTPS targets, and a client configured for the wrong scheme can fail before authentication is even attempted. Third, check whether a corporate network, security tool or local VPN sits between you and the proxy, because such a layer can strip or replace the Proxy-Authorization header. Fourth, test from one other network, such as a phone hotspot, to separate account problems from network problems.
Two more habits save time. Percent-encode special characters in a password when you must put it in a URL, for example writing the at sign as %40, and prefer separate username and password fields whenever the library offers them. And keep the first failing response untouched: later retries may add noise, while the first reply often shows the exact Proxy-Authenticate challenge the server expects.
Preparing a support request
If the cause still eludes you, a short, specific message gets the fastest help. Include your order reference without the password, the proxy host and port, the protocol, the exact response including the Proxy-Authenticate header, the time of the failure, your current public IP, and the curl command you tested with (with the password hidden). State whether the same credentials work from a different network. That one detail tells the support team whether to look at IP authorization or at the account itself. If you are still deciding how large a plan you need while you learn the setup, the article on choosing a small first package is a good companion.
Summary
A 407 Proxy Authentication Required means the proxy answered but did not accept your authentication. It is different from a 401, which comes from the website, and from a 403, which is a refusal after authentication. The usual causes are mistyped credentials, special characters breaking a proxy URL, the wrong username and password, an unauthorized IP address, libraries that skip credentials on HTTPS CONNECT, environment variables that override your settings, an inactive plan, or a protocol mismatch. Test with curl, change one thing at a time, keep credentials private and use the proxy lawfully. For plan details and what each package includes, see the Proxy page.
Frequently asked questions
What does HTTP 407 Proxy Authentication Required mean?
It means the proxy server understood your request but requires valid authentication first. Either your tool sent no credentials, sent wrong ones, or your source IP is not on the list the proxy accepts.
What is the difference between 401 and 407?
A 401 comes from the destination website and asks you to log in to that site. A 407 comes from the proxy itself and asks you to authenticate to the proxy. They use different headers and need different credentials.
Why does my password work in the dashboard but fail in my script?
Proxy credentials are often separate from your account login. Also, special characters in a password can break a proxy URL unless they are percent-encoded, and pasted text can carry hidden spaces.
Can a 407 be caused by IP authorization?
Yes. If your plan accepts connections only from registered IP addresses, a changed home or office IP leads to a 407 or a refused connection until you update the authorized list.
Should I keep retrying when I get a 407?
No. Repeating the same request with the same credentials will return the same answer, and many retries in a short time can look like abuse. Fix the credential or authorization problem first, then retry once.
References
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Need a proxy for this?
XPASS Proxy sells residential proxy traffic by the gigabyte, with the price shown before you pay.
See proxy plansKeep reading

Proxy Guides
Proxy Won't Connect: 10 Checks to Run Before Contacting Support
Most failed proxy connections come from a typo, a wrong port or a blocked network path. Use these 10 ordered checks to find the cause and write a better support ticket.
10 min read

Proxy Guides
Proxy Shows 403 Forbidden: What Can Cause It
A 403 means the server understood the request but refused it. Through a proxy, that refusal can come from several places. Here is how to tell them apart.
10 min read

Proxy Guides
Buying Your First Proxy: How Small Should the Package Be?
Your first Proxy purchase should answer a question, not lock in a year of capacity. Learn how to size a small package from a real test and when to grow.
9 min read