Developers

Proxy developer guide

Everything your scripts need to send traffic through SwitchVPN proxies: one gateway, one login, and a username that selects product, country, city and session.

Gateway hostgw.switchvpn.shop
HTTP and HTTPS port7100
SOCKS5 port7200
Sign-inUsername and password, or up to 10 allowlisted IPv4

Proxy username syntax

Your account has one proxy username and password, shown in Dashboard, Proxies. Add settings to the username with dashes; the password never changes.

Build a username

Usernamesw4k8m2-zone-res-cc-us
zoneres, unl, isp, dcRequired. Picks the product: Residential, Unlimited Residential, Static ISP or Datacenter.
ccus, de, jp ...Residential and Unlimited only. Two-letter country code, 60 countries available.
citynew_yorkOptional, after cc. City name in lowercase with underscores instead of spaces.
sidletters and digitsOptional. Any session name; the same name keeps the same IP.
ttl1 to 60Minutes to keep a sticky IP. Use together with sid.

City values drop accents and use underscores, so São Paulo becomes sao_paulo. Datacenter IPs cover 18 countries, the other products 60.

Proxy connection examples in curl, Python and Node

The examples call a public IP check, which replies with the address the target saw. They update with the username you build above.

HTTP and HTTPS through port 7100

curl -x http://gw.switchvpn.shop:7100 \
  -U "sw4k8m2-zone-res-cc-us:YOUR_PASSWORD" \
  https://api.ipify.org

SOCKS5 through port 7200, hostnames resolved at the gateway

curl --socks5-hostname gw.switchvpn.shop:7200 \
  -U "sw4k8m2-zone-res-cc-us:YOUR_PASSWORD" \
  https://api.ipify.org

Sticky sessions

Residential and Unlimited Residential rotate to a new IP on every request by default. Add sid and ttl to hold one IP for up to 60 minutes.

  • Same username, same IP until the minutes run out
  • A new session name gives a fresh IP at once
  • Run many sessions in parallel, one name each
  • Home lines can drop early, so retry on 502
sw4k8m2-zone-res-cc-gb-city-london-sid-login7-ttl-20

IP allowlist

Software that cannot send proxy credentials can sign in by source address. In Dashboard, Proxies, list up to 10 public IPv4 addresses; requests from them are accepted without a password.

  • Public IPv4 only: private ranges such as 10.x and 192.168.x are refused
  • Duplicates are removed when you save
  • The list is saved to your account the moment you press save
  • Anyone behind a listed IP can use your proxies, so list only machines you control

Proxy gateway error codes

HTTP clients see these status codes from the gateway itself. SOCKS5 clients get the matching SOCKS reply instead, such as an authentication failure or host unreachable.

407Proxy Authentication RequiredUsername or password not accepted, or the request came from an IP that is not on your allowlist. Check the zone spelling and the password from Dashboard, Proxies.
403ForbiddenLogin is fine, but the request is not allowed: no active order for that zone, residential traffic used up, or a destination blocked by the acceptable use policy.
429Too Many RequestsToo many connections at once for your product, for example above 200 on Unlimited Residential. Lower concurrency and retry with backoff.
502Bad GatewayThe exit IP could not complete the request, often because a home line went offline or the target closed the connection. Retry, with a new sid if you use sticky sessions.
503Service UnavailableNo suitable IP was free for that country or city at that moment. Retry shortly or drop the city to widen the pool.
504Gateway TimeoutThe target site answered too slowly. Raise your client timeout or try another exit.

Your account API key

Dashboard, Developer creates a secret key for your account once your first top-up is credited. Keys start with sv_sk_, are sent as a Bearer token in the Authorization header, and belong to one account only.

The full key appears a single time. We keep a hash and its last four characters, so a lost key cannot be shown again: make a new one, and the previous key stops working immediately.

Proxy requests never need this key. The gateway signs you in with your proxy username and password or your allowlist.

Open Developer in the dashboard

Handling the key safely

  • Store it in an environment variable or a secrets manager
  • Never put it in a web page, a mobile app or a public repository
  • Replace it right away if it may have leaked
  • Keep proxy passwords out of source code too

Ready to connect your tools?

Top up with crypto, buy a proxy pack, and your gateway login is waiting in the dashboard a moment later.