Headers
To send headers to your target along with your request, use the X-SU-Custom-*
prefix in front of the header name.
Sending headers
Headers that Site Unblocker supports can be split into:
- Conventional headers:
X-SU-Custom-Content-Type: application/json
X-SU-Custom-User-Agent: Mozilla/5.0 (Linux; Android 13; SM-S901B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36
- All other standard HTTP headers.
- Target-specific headers:
X-SU-Custom-Walmart-Identifier: 1234
X-SU-Custom-Foo: Bar
Both types of headers need to have a X-SU-Custom-
prefix in order to be forwarded to the target website. Headers without the prefix will be intercepted by Site Unblocker itself.
Prefix
Headers without the
X-SU-Custom-
prefix may currently work but will be decommissioned in the future and are not guaranteed to be forwarded to the target website.If your Site Unblocker requests are currently sending
Content-Type
,User-Agent
or other conventional HTTP headers, you need to update the header keys to include theX-SU-Custom-
prefix, as shown in the examples above.
curl -k -v -x unblock.smartproxy.com:60000 \
-U "USERNAME:PASSWORD" "https://ip.smartproxy.com/" \
-H "X-SU-Custom-User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.79 Safari/537.36"
-H "X-SU-Custom-Foo: Bar" \
import requests
proxies = {
'http': 'http://USERNAME:PASSWORD@unblock.smartproxy.com:60000',
'https': 'http://USERNAME:PASSWORD@unblock.smartproxy.com:60000'
}
headers= {
'X-SU-Custom-My-Header': 'Custom header content here',
'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.79 Safari/537.36'
}
response = requests.request(
'GET',
'https://ip.smartproxy.com/',
verify=False,
proxies=proxies,
headers=headers
)
print(response.text)
import fetch from 'node-fetch';
import createHttpsProxyAgent from 'https-proxy-agent'
const username = 'YOUR_USERNAME';
const password = 'YOUR_PASSWORD';
const agent = createHttpsProxyAgent(
`http://${username}:${password}@unblock.smartproxy.com:60000`
);
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;
const headers = {
'X-SU-Custom-My-Header': 'Custom header content here',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.79 Safari/537.36'
}
const response = await fetch('https://ip.smartproxy.com/', {
method: 'get',
headers: headers,
agent: agent
});
console.log(await response.text());
Cookies
The Cookie
header does not require any prefix and can be passed directly:
curl -k -v -x unblock.smartproxy.com:60000 \
-U "USERNAME:PASSWORD" "https://ip.smartproxy.com/" \
-H "Cookie: WOW=4206969; NICE=8008135"
import requests
proxies = {
'http': 'http://USERNAME:PASSWORD@unblock.smartproxy.com:60000',
'https': 'http://USERNAME:PASSWORD@unblock.smartproxy.com:60000'
}
headers= {
'Cookie': 'WOW=4206969; NICE=8008135',
'X-Smartproxy-Force-User-Cookies: 1',
}
response = requests.request(
'GET',
'https://ip.smartproxy.com/',
verify=False,
proxies=proxies,
headers=headers
)
print(response.text)
import fetch from 'node-fetch';
import createHttpsProxyAgent from 'https-proxy-agent'
const username = 'YOUR_USERNAME';
const password = 'YOUR_PASSWORD';
const agent = createHttpsProxyAgent(
`http://${username}:${password}@unblock.smartproxy.com:60000`
);
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;
const headers = {
'Cookie': 'WOW=4206969; NICE=8008135',
'X-Smartproxy-Force-User-Cookies: 1',
}
const response = await fetch('https://ip.smartproxy.com/', {
method: 'get',
headers: headers,
agent: agent
});
console.log(await response.text());
Forcing headers
Site Unblocker uses predefined header and cookies combinations to achieve the most efficient success rates for targeted websites. This means that, sometimes, we may need to drop customer provided headers in order to improve success rates.
This behaviour, however, can be overridden by forcing headers or cookies.
When forcing headers or cookies, the request will always be charged from your subscription, even if the request fails.
Header | Valid values | Description |
---|---|---|
X-Smartproxy-Force-User-Headers | 1 | Force headers prefixed with X-SU-Custom- to be forwarded to the target. |
X-Smartproxy-Force-User-Cookies | 1 | Force Cookie to be forwarded to the target |
Updated about 20 hours ago