代理
轮换IP
GET
/4g/rotate-ip/{key}
查询参数
响应案例:
curl -X GET "https://apid.iproyal.com/v1/reseller/4g/rotate-ip/<your_key>" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"
<?php
$api_token = '<your_access_token>';
$key = '<your_key>';
$url = "https://apid.iproyal.com/v1/reseller/4g/rotate-ip/$key";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: 'application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
import requests
api_token = '<your_access_token>'
key = '<your_key>'
url = f'https://apid.iproyal.com/v1/reseller/4g/rotate-ip/{key}'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())
const https = require('https');
const api_token = '<your_access_token>';
const key = '<your_key>';
const options = {
hostname: 'apid.iproyal.com',
path: `/v1/reseller/4g/rotate-ip/${key}`,
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();
Last updated