Single backconnect entry node
Guide by Sjaak Alperstain
Smartproxy offers proxy access through a single backconnect endpoint:
Residential – gate.smartproxy.com:7000
In this case, you need to pass all parameters alongside username and password.
Here is a list of all available parameters with a description and use:
Country
– country code. Please provide it in a two symbol ISO format. To get a random country, simply exclude this parameter from the username string.City
– city name. Adding this parameter to the authorization header will let you specify the city of the IP you want to use to process the request. Please use this parameter together with the country information.State
– US state. Used only when you pickus
as the country. Format:us_state_name
(e.g.us_california
)
Use either state or city targeting.Session
– a random string to create a session in order to keep the same proxy for more than one request. The session automatically expires after 10 minutes (or 60 seconds of inactivity) by default. After that a new IP will be assigned to this session’s ID.Sessionduration
– used withSession
. Specifies the sticky session time – one, 10, or 30 minutes. A session lasts for 10 minutes if this parameter is not indicated.
For now, this applies only to residential endpoints. The feature will be coming out for datacenter endpoints soon!
Using backconnect entry node in applications
The backconnect entry node can be used in various applications as well. In such a case, you will need to pass every parameter for your session alongside the username in the username field like this:
user-**username**-country-**country_code**-city-**city_name**-session-**randomstring**
In the password
field, you only need to enter the password of the proxy user.
Use the Session ID only if you want a sticky session. Otherwise, just ignore that part to receive a rotating proxy.
Examples using cURL requests
//Example of rotating random proxy
curl -U <username>:<password> -x gate.smartproxy.com:7000 http://ip.smartproxy.com/json
//Example of a rotating Italy proxy
curl -U user-<username>-country-it:<password> -x gate.smartproxy.com:7000 http://ip.smartproxy.com/json
//Example of a sticky Portugese proxy using session ID
//randomstring123 - session ID defined by string of your choice
curl -U user-<username>-country-pt-session-randomstring123:<password> -x gate.smartproxy.com:7000 http://ip.smartproxy.com/json
//Example of a sticky US - New York City proxy using session ID
//randomstring123 - session ID defined by string of your choice
curl -U user-<username>-country-us-city-new_york-session-randomstring123:<password> -x gate.smartproxy.com:7000 http://ip.smartproxy.com/json
// Example of a US state targeting - California and New York (State)
// Use underscores when a state name consists of two words. E.g: "us_new_york" "us_rhode_island"
curl -U user-<username>-country-us-state-us_california:<password> -x gate.smartproxy.com:7000 http://ip.smartproxy.com/json
curl -U user-<username>-country-us-state-us_new_york:<password> -x gate.smartproxy.com:7000 http://ip.smartproxy.com/json
Updated 3 months ago