Proxy Error 407 Authentication Required: Causes and Fixes

A proxy error 407 authentication required means your request to the RotatingProxy gateway did not include valid credentials. The fix is to ensure your username string is formatted correctly and the password matches the proxy user you created.

Key points
  • The 407 error means your proxy credentials are missing or incorrect.
  • Check the username string format, especially the underscore-separated options.
  • Verify the password matches the proxy user, not your account password.
  • Ensure your client sends the credentials in the correct way for HTTP or SOCKS5.

What does proxy error 407 authentication required mean?

A proxy error 407 authentication required is an HTTP status code sent by our gateway when it cannot validate the credentials you provided. This means your request to gw.rotatingproxy.cc on port 7070 or 7071 was rejected because the username, password, or their format was incorrect. It is the proxy's way of saying "login required" before traffic can proceed.

Check your username and password format

The most common cause of a 407 error is a mistake in the username string or password. Your username is not just a login; it is a composite string that includes your proxy user login and options like network and location, all joined by underscores. Use the password you created for that proxy user in your dashboard.

  • Username format: LOGIN_net.res_cc.us (example). The login is the one you created under "Proxy users". Options are added as key.value pairs.
  • Password: This is the password for the proxy user, which is separate from your main account password. If you reset it, you must use the new one.
  • Common typos: Using spaces instead of underscores, misspelling option keys (like net.residential instead of net.res), or using uppercase country codes (must be lowercase, e.g., cc.us).

Use the dashboard to build a correct connection string

The easiest way to avoid format errors is to use the "Proxy setup" page in your dashboard. This tool lets you select a proxy user, choose a network (like rotating residential or mobile), pick a country, and optionally set a city, US state, or session. It then generates the exact username string for you to copy. This ensures all options are spelled correctly and in the right order.

After generating the string, test it with a simple tool like curl. For example, using the HTTP port 7070:

curl -x http://USERNAME_net.res_cc.us:PASSWORD@gw.rotatingproxy.cc:7070 https://httpbin.org/ip

Substitute USERNAME_net.res_cc.us and PASSWORD with your real login details. A successful response shows an IP address. If you get a 407, double-check what you pasted. For detailed client setups, see our curl integration guide.

Verify your proxy user is active and has balance

A 407 error can also appear if the proxy user you are trying to use is paused, deleted, or restricted to a network you are not specifying. Go to the "Proxy users" section in your dashboard and check the status of the user whose login you are using. Ensure it is "Active" and that the "Networks" column includes the network you are targeting (e.g., residential, mobile).

While a depleted balance typically stops traffic silently, it is good practice to check the "Overview" page to see your remaining funds. For more on billing, read how pay as you go proxy billing works.

Ensure your client sends credentials correctly

Different proxy protocols and libraries require different methods to pass credentials. An error 407 authentication required often means the credentials are not being attached to the request properly.

  • HTTP/HTTPS (Port 7070): Most HTTP clients support embedding credentials in the proxy URL (as in the curl example above). For libraries like Python's requests, you pass them as a dictionary: proxies = {'http': 'http://user:pass@gw.rotatingproxy.cc:7070', 'https': 'http://user:pass@gw.rotatingproxy.cc:7070'}. See Python requests proxy for examples.
  • SOCKS5 (Port 7071): SOCKS5 authentication is handled separately. In Python with requests, you need the socks library and format like: proxies = {'http': 'socks5://user:pass@gw.rotatingproxy.cc:7071', 'https': 'socks5://user:pass@gw.rotatingproxy.cc:7071'}.
  • Headless browsers: Tools like Playwright or Puppeteer have their own methods for proxy authentication. Often, you must provide the credentials in the browser launch arguments or a separate authentication callback, not just in the proxy server field.

Debug with a simple connection test

When you encounter a 407 proxy authentication error, isolate the problem by testing with the most basic client possible. Use curl on the command line or a simple Python script with minimal configuration. This removes variables like complex scraping frameworks or browser settings. If the basic test works, the issue is in your application's proxy configuration. If it fails, the issue is in the credentials or network.

Also, check for invisible characters when copying credentials from your dashboard or a password manager. Paste the username into a plain text editor to see if there are extra spaces or line breaks. Remember, the session ID (sid.abc123) and TTL (ttl.30) are part of the username string if you are using sticky sessions.

Related errors and next steps

Sometimes, after fixing the 407 error, you might encounter other issues like a proxy error 502 bad gateway or timeouts. These point to different problems, such as network connectivity or target site issues. If your credentials are correct but you still cannot connect, ensure your firewall allows outbound TCP connections to gw.rotatingproxy.cc on ports 7070 and 7071.

For large-scale projects like web scraping or price monitoring, managing credentials across many threads is crucial. Consider using the API to programmatically manage proxy users and generate endpoint strings. If you have verified all the above and still face a 407 error, contact support through the "Support" page in your dashboard with the exact username string you are using (you can obscure your password).

Questions

Can I get a 407 error if my password has special characters?

Yes, if your password contains characters that are not URL-safe (like `&`, `?`, `%`, `#`), they must be percent-encoded when placed in a proxy URL. In a URL, a password like `pass#word` should be encoded as `pass%23word`. It is often simpler to create a proxy user with a password using only letters, digits, and basic symbols.

I'm using the correct username from the dashboard, why 407?

Double-check that you are using the password for that specific proxy user, not your main account password. Also, ensure you are targeting a network that the proxy user is permitted to use. If the user is only allowed "residential" networks, using `_net.mob` in the username will cause a 407.

Does the order of options in the username matter?

No, the order of the `key.value` options after the login does not matter. `LOGIN_net.res_cc.us` is the same as `LOGIN_cc.us_net.res`. The system parses each option independently.

Can a 407 error be caused by the target website?

No, error 407 authentication required comes directly from the RotatingProxy gateway before your request reaches the target website. If the target site rejects your request, you would see a different error, like a 403 from the site itself.

I'm using a session ID (sid), could that cause a 407?

The session ID itself does not cause a 407. However, if the `sid.` option is malformed (e.g., contains invalid characters, is too short/long) or if the `ttl.` value is out of range (1-120), the entire username string may be rejected. Ensure your `sid` is 6 to 16 lowercase letters or digits.

Are there any logs in my dashboard for 407 errors?

The dashboard's "Usage" page shows successful traffic consumption per day and network, but it does not log individual authentication failures due to privacy and volume. You need to check your own application logs or test credentials directly.

Start with one top-up, use any network

Create an account in a minute, add $40 or more, and the same balance pays for residential, mobile, datacenter and ISP traffic.