Whitelisted IP Requests

Control your connection through custom backconnect parameters with Whitelisted IP authentication

To authenticate your proxy connection, you can use a Whitelisted IP instead of a username and password. To do this, you'll need to specify all of the proxy parameters directly in the endpoint.

Learn how to add a Whitelisted IP here.

📘

Whitelisted IP authentication limitations

  • Whitelisted IP authentication only supports HTTPS requests.
  • IPv6 IP addresses are currently unsupported for Whitelisted IP authentication. Please use IPs that are in IPv4 format (xx.xx.xx.xx).

Supported parameters

ParameterExample ValueDescription
countryusCountry code. Please provide it in a two-symbol ISO format. You can check most of the ISO country codes here.
cityberlinCity name. Adding this parameter will let you specify the city of the IP you want to use. Please use this parameter together with the country parameter.
stateus_californiaUS state. Supports the USA location when you pick us as the country parameter. It will allow you to specify the US state of the IP you want to use.
sessionrandomstring123A random string to create a session to keep the same IP for more than one request. The session automatically expires within 10 minutes by default. After that, a new IP will be assigned to this session’s ID. Learn more here.
sessionduration180Used with session. Specifies the sticky session time in minutes – can be set to any number between 1 and 1440 to override the 10 minute sticky session default. Learn more here.
zip100015-digit ZIP code. Adding this parameter will let you specify the ZIP code location you want to target. It is only applicable for targeting the USA location and should be used with the country-us parameter string.
asn20057Target the ASN number of a specific carrier.
continentasContinent code. You can find the continent codes here.

📘

Maintaining sessions with ports

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

country-us-sessionduration-60.gate.smartproxy.com:10001;

country-us-sessionduration-60.gate.smartproxy.com:10002;

country-us-sessionduration-60.gate.smartproxy.com:10003.

The available port range is 10001-49999.

📘

ASN filtering

  • You must choose between city targeting and asn targeting, as they can’t be used simultaneously.
  • The same logic would apply for the continent, state and country parameters.
  • You can look up carrier numbers by searching online, for example here.

Country Targeting

If IPs from a specific country are needed, then modify the endpoint 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 -x "https://country-us.gate.smartproxy.com:7000" "https://ip.smartproxy.com/json"

Rotating IPs from Italy:

curl -x "https://country-it.gate.smartproxy.com:7000" "https://ip.smartproxy.com/json"

City Targeting

Add a city-xxxx parameter to the endpoint 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 -x "https://country-us-city-new_york.gate.smartproxy.com:7000" "https://ip.smartproxy.com/json"

Example of a rotating proxy that returns IPs from Rome:

curl -x "https://country-us-city-new_york.gate.smartproxy.com:7000" "https://ip.smartproxy.com/json"

State Targeting

Adding the state-us_xxxxx to your endpoint will allow for state targeting. Only US states are supported for this at the moment.

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

curl -x "https://country-us-state-us_new_york.gate.smartproxy.com:7000" "ip.smartproxy.com/json"

Rotating IPs from California:

curl -x "https://country-us-state-us_california.gate.smartproxy.com:7000" "ip.smartproxy.com/json"

Continent Targeting

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

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

curl -x "https://continent-eu.gate.smartproxy.com:7000" "ip.smartproxy.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 and country parameters.
  • An example of a proxy withe the AT&T Mobility LLC asn number with a rotating session:
curl -x "https://asn-20057.gate.smartproxy.com:7000" "ip.smartproxy.com/json"

📘

Carrier numbers

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


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 endpoint will allow the IP address to persist for multiple requests.

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

curl -x "https://country-us-session-randomstring123.gate.smartproxy.com:7000" "https://ip.smartproxy.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

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 commands above, you will see that the proxy IP persists even if a different proxy is used in between or at the same time.

The proxies with the session variable randomstring123 will return the same IP address as there is a sticky session.


In cases when it's necessary to change the country/city targeting or rotate the proxy IP sooner, the session parameter value must be changed as well (for example, from session-something to session-somethingelse). Otherwise, the IP address will not rotate.

curl -x "https://country-us-session-abcd.gate.smartproxy.com:7000" "https://ip.smartproxy.com/json"
curl -x "https://country-us-session-randomstring123.gate.smartproxy.com:7000" "https://ip.smartproxy.com/json"

Session Duration

Adding sessionduration-x to the endpoint 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.


A sticky IP from Chicago that will persist for 90 minutes:

curl -x "https://country-us-city-chicago-session-example1-sessionduration-90.gate.smartproxy.com:7000" "ip.smartproxy.com/json"

A sticky IP from Casablanca that will persist for one minute:

curl -x "https://country-ma-city-casablanca-session-example2-sessionduration-1.gate.smartproxy.com:7000" "ip.smartproxy.com/json"

📘

Note

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


Support

Need help or just want to say hello? Our customer support is available 24/7. You can also reach us anytime via email at [email protected].

Feedback

Can't find what you're looking for? Request an article!
Have feedback? Share your thoughts on how we can improve.