Adding a Whitelisted IP
Add whitelisted IPs to Enterprise Dedicated Datacenter Proxies using POST endpoint. Authorize new IPs programmatically with RESTful API integration.
Response
Description
Code example
curl -X POST -u username:password "https://api.oxylabs.io/v1/whitelisted_ips"
--header "Content-Type: application/json" --data '{"address": "127.0.0.1"}'<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://api.oxylabs.io/v1/whitelisted_ips");
$payload = json_encode( array( "address"=> "127.0.0.1" ) );
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $payload);
curl_setopt( $curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'username:password');
$result = curl_exec($curl);
?>import requests
requests.post('https://api.oxylabs.io/v1/whitelisted_ips',
json={"address": "127.0.0.1"},
auth=('username', 'password')){
"error": {
"message": "This is not a valid IP address.",
"code": 422
}
}Sample output
{
"id": 9767,
"address": "127.0.0.1"
}Last updated
Was this helpful?

