Skip to main content

Authentication

WeProxies uses username/password authentication for all proxy connections. This guide explains the authentication system and username format options.

Basic Authentication

Every request must include your credentials:

Username: your-proxy-username
Password: your-proxy-password

Finding Your Credentials

  1. Go to Dashboard → Proxies
  2. Click on your active subscription
  3. Your credentials are displayed in the Connection Details section

Username Format

WeProxies uses a flexible username format that allows you to configure proxy behavior directly in the username:

USERNAME[-option-value][-option-value]...

Available Options

OptionValuesDescription
country2-letter ISO codeTarget a specific country
sessionAny stringCreate a sticky session
stateState codeTarget US state (when country=US)
cityCity nameTarget specific city

Examples

# Basic - rotating residential IP
wp_abc123xyz:password

# Country targeting - US IP
wp_abc123xyz-country-US:password

# Sticky session - same IP for 10 minutes
wp_abc123xyz-country-US-session-user123:password

# US state targeting
wp_abc123xyz-country-US-state-CA:password

# City targeting
wp_abc123xyz-country-US-city-LosAngeles:password

# Combined options
wp_abc123xyz-country-US-state-NY-city-NewYork-session-abc123:password

Authentication Methods

URL-Based Authentication

Include credentials directly in the proxy URL:

# HTTP/HTTPS
http://USERNAME:PASSWORD@proxy.weproxies.com:1080

Header-Based Authentication

For HTTP/HTTPS proxies, you can use the Proxy-Authorization header:

curl -x "proxy.weproxies.com:1080" \
-H "Proxy-Authorization: Basic $(echo -n 'USERNAME:PASSWORD' | base64)" \
https://api.ipify.org

Environment Variables

Set proxy credentials via environment variables:

export HTTP_PROXY="http://USERNAME:PASSWORD@proxy.weproxies.com:1080"
export HTTPS_PROXY="http://USERNAME:PASSWORD@proxy.weproxies.com:1080"

# Now all requests use the proxy
curl https://api.ipify.org

Security Best Practices

Keep Credentials Secure

Never share your proxy credentials or commit them to version control.

  1. Use environment variables - Don't hardcode credentials in your code
  2. Rotate passwords - Generate new credentials periodically
  3. Monitor usage - Check the dashboard for unusual activity
  4. Use IP whitelisting - If available, restrict access to specific IPs

Example: Using Environment Variables

import os
import requests

username = os.environ.get('WEPROXIES_USERNAME')
password = os.environ.get('WEPROXIES_PASSWORD')

proxy = {
"http": f"http://{username}:{password}@proxy.weproxies.com:1080",
"https": f"http://{username}:{password}@proxy.weproxies.com:1080"
}

response = requests.get("https://example.com", proxies=proxy)

Error Codes

ErrorDescriptionSolution
407 Proxy Authentication RequiredInvalid credentialsCheck username/password
403 ForbiddenAccount suspended or no active subscriptionCheck account status
429 Too Many RequestsRate limitedReduce request frequency

Next Steps