Getting 407? Here’s why it happens and the exact fix.
You are seeing 407 because the proxy gateway rejected your credentials. The fix: verify your username:password pair or IP allowlist entry in the KnoxProxy dashboard.
Log in to dashboard.knoxproxy.com, navigate to API Keys, and copy your current username and password.
Run: curl -x http://USER:PASS@gw.knoxproxy.com:7000 https://httpbin.org/ip to verify credentials work outside your application.
If using IP allowlist, verify your server IP matches the dashboard. If your server IP changed (dynamic hosting), add the new IP or switch to user:pass auth.
Verify your account is active and has available balance. A zero-balance account returns 407 on all requests.
import requests
import os
# Credentials from environment variables (set from dashboard values)
user = os.environ["KNOX_USER"]
password = os.environ["KNOX_PASS"]
proxy = f"http://{user}:{password}@gw.knoxproxy.com:7000"
r = requests.get("https://httpbin.org/ip",
proxies={"https": proxy})
print(r.status_code) # 200 OK
print(r.json()) # {"origin": "residential-ip"}Test your setup with our proxy checker, then contact support if 407 still won’t clear.
A 407 Proxy Authentication Required response comes from the proxy server itself, not the target website. The proxy gateway is saying it does not recognize your credentials. This is a client-side configuration issue -- your proxy username, password, or IP allowlist is wrong.
Use the exact credentials from your dashboard. Watch for trailing spaces, wrong case, or URL-encoded special characters.
Add your current public IP to the allowlist in the KnoxProxy dashboard. If your IP is dynamic, switch to user:pass authentication.
Resolve any billing issues and generate a new API key if the old one was revoked.
If your credentials are correct and account is active but 407 persists, check if your ISP or firewall is intercepting the proxy connection. Try from a different network. Contact KnoxProxy support with your account email and the exact proxy endpoint you are connecting to.
A 407 always comes from the proxy gateway itself, never from the target website. It means the proxy server did not recognize your credentials before your request could even reach the destination. Check your username, password, IP allowlist entry, and account balance in the dashboard.
Common causes: your account balance hit zero, your API key was rotated or revoked, or your server public IP changed while using IP-allowlist authentication. Log in to the KnoxProxy dashboard and check billing status, key validity, and your current allowlist entries against your server's actual IP.
Yes. Run curl -x http://USER:PASS@gw.knoxproxy.com:7000 https://httpbin.org/ip from your terminal before wiring credentials into your application code. If the command returns your proxy exit IP in the JSON response, your username and password are valid and the gateway is reachable. A 407 here means bad credentials, not a target-side block.
KnoxProxy comes pre-configured to avoid the most common errors. Get started and fix 407 for good.