# Username parameters

Username parameters are key-value pairs appended to the username of a proxy credential (for example USER-cc-de-city-berlin-sid-a1b2) that tell the gateway which exit to choose and how long to keep it. They let a single hostname and credential serve every country, city, provider and session mode without generating new proxy lists, because the choice travels with each connection.


## Anatomy

| Parameter | Values | Meaning |
| --- | --- | --- |
| -cc- | ISO 3166-1 alpha-2 | Country of the exit |
| -state- | US postal code | US state (with -cc-us) |
| -city- | lowercase ASCII, no spaces | City inside the country |
| -asn- | AS number | Provider or mobile carrier |
| -sid- | a-z 0-9, up to 32 | Session identifier for a sticky session |
| -ttl- | 1m to 24h | Lifetime of the sticky session |


## Rules

- Order does not matter; unknown keys are rejected with a 400 so typos never silently route elsewhere.
- The password never changes with parameters.
- With IP whitelisting, send any username to carry parameters; the password is ignored.
- URL-encode nothing: the allowed characters are all safe in a proxy URL.


## How it works at ProxShift

ProxShift uses exactly six parameters (-cc-, -state-, -city-, -asn-, -sid-, -ttl-) on res.proxshift.com and the applicable subset on mob.proxshift.com; the documentation page lists every value and error.

Source: https://proxshift.com/glossary/username-parameters
