User:pass Requests

Residential Proxy Advanced Parameter Usage via User:Pass Authentication

When using backconnect, make sure always to use the following endpoint:

  • Proxy server: gate.decodo.com
  • Proxy port: 7000

The cURL code will be shown in the examples below. You may try them out on your machine.


Username:Password

📘

Username And Password Parameter

To use a proxy username and password, please be aware that your username line will always start with user- followed by your proxy username.

An example of a rotating proxy using a proxy username and password to return you an IP address from a random location:

curl -U "user-username:password" -x "gate.decodo.com:7000" "https://ip.decodo.com/json"

Replace username and password with your credentials and run the command in your Terminal or Command Prompt.

You will see the IP address that has been assigned to you for this particular request, as well as the information on that IP address, including its location, in the output.


Country Targeting

If IPs from a specific country are needed, then modify the username to include the country-xx parameter. Use two-letter Alpha-2 codes. There is a full list of them here.

Example of a rotating proxy that returns IPs from the US:

curl -U "user-username-country-us:password" -x "gate.decodo.com:7000" "ip.decodo.com/json"

Rotating IPs from Italy:

curl -U "user-username-country-it:password" -x "gate.decodo.com:7000" "ip.decodo.com/json"

City Targeting

Add a city-xxxx parameter to the username to specify a city within a country.

It's used in conjunction with the country parameter and is not standalone.

If the city name consists of multiple words, then use underscores.

Example of a rotating proxy that returns IPs from New York City:

curl -U "user-username-country-us-city-new_york:password" -x "gate.decodo.com:7000" "ip.decodo.com/json"

Example of a rotating proxy that returns IPs from Rome:

curl -U "user-username-country-it-city-rome:password" -x "gate.decodo.com:7000" "ip.decodo.com/json"

State Targeting

Adding the state-us_xxxxx to your username will allow for state targeting. Only US states are currently supported.

An example of a rotating proxy that returns IPs from the state of New York:

curl -U "user-username-country-us-state-us_new_york:password" -x "gate.decodo.com:7000" "ip.decodo.com/json"

Rotating IPs from California:

curl -U "user-username-country-us-state-us_california:password" -x "gate.decodo.com:7000" "ip.decodo.com/json"

Continent Targeting

Adding the continent parameter to your username will allow you to target IPs from a specific continent.

An example of a rotating proxy that returns IPs from Europe:

curl -U "user-username-continent-eu:password" -x "gate.decodo.com:7000" "https://ip.decodo.com/json"
📘

Continent Codes

  • Asia – as
  • Africa – af
  • Europe – eu
  • North America – na
  • Oceania – oc
  • South America – sa

ASN Targeting

Adding the asn parameter will allow you to target IPs from a specific carrier.

  • You must choose between city targeting and asn targeting, as they can’t be used simultaneously.
    • The same logic would apply to the continent, state and country parameters.
  • An example of a proxy with the AT&T Mobility LLC asn number with a rotating session:
curl -U "user-username-asn-20057:password" -x "gate.decodo.com:7000" "https://ip.decodo.com/json"
📘

Carrier Numbers

You can look up carrier numbers by searching online, for example here .


ZIP Targeting

Adding the zip parameter will allow you to target IPs within a specific ZIP code area.

  • ZIP-level targeting is only possible with the USA country level, and it must be specified in order to use the zip parameter.
  • A maximum of 5 symbols is allowed with the zip parameter.
  • An example of a rotating proxy with a zip code located in New York City:
curl -U "user-username-country-us-zip-10001:password" -x "gate.decodo.com:7000" "https://ip.decodo.com/json"

Sticky Session

The examples above have been performed using a rotating session, so you'll get a new IP address with each request. Adding the session variable to the username will allow the IP address to persist for multiple requests.

An example of a Sticky session that returns IP addresses from the US:

curl -U "user-username-country-us-session-randomstring123:password" -x "gate.decodo.com:7000" "ip.decodo.com/json"

Since this proxy is Sticky, the same IP address will be returned if you run the command again, as there is still an active session with that IP address.

The default session duration is 10 minutes. The IP address will automatically rotate after that.

There must be a way to differentiate between each session that is assigned to the user since it's possible to have multiple active sticky sessions at once.

📘

Session Values

The value – randomstring123 is used in the example above. Any alphanumeric text/string could be used depending on your preference. All of these would be viable:

session-random123, session-1, session-abcdef, session-2, etc.

Different session parameter values are used to differentiate between active sessions and behave just like the different sticky proxy ports with our country endpoints.

For example, if you run the command above, with the session variable randomstring123, you will see that the same proxy IP persists even if you adjust other parameters, such as the country, city, etc.

That means if you require changing the location or rotating the proxy IP sooner, the session parameter must be changed as well. Otherwise, the IP address will not rotate.

📘

Maintaining Sessions With Ports

Alternatively, you can use ports instead of the session parameter. E.g.:

The available port range is 10001-49999.


Session Duration

Adding sessionduration-x to the username will allow the session to persist for up to 24 hours.

📘

Session Length

Any integer between 1 and 1440 is accepted.

For example:
sessionduration-1 sessionduration-10 sessionduration-600

🚧

Premature Rotation

The longer the session you have, the more chances there are that the IP will rotate before your specified time due to the residential device at the end going offline.

An example of the proxy with a sticky IP from Chicago that will persist for up to 90 minutes:

curl -U "user-username-country-us-city-chicago-session-example1-sessionduration-90:password" -x "gate.decodo.com:7000" "ip.decodo.com/json"

An example of the proxy with a sticky IP from Casablanca that will persist for up to 1 minute:

curl -U "user-username-country-ma-city-casablanca-session-example2-sessionduration-1:password" -x "gate.decodo.com:7000" "ip.decodo.com/json"
📘

Note

We cannot guarantee IP availability when using backconnect, especially if smaller countries or cities are targeted.


Support

Still can't find an answer? Want to say hi? We take pride in our 24/7 customer support. Alternatively, you can reach us via our support email at [email protected].

Feedback

Something's missing? Request an article!
Got feedback? Let us know how we're doing and what can be improved.