API: set_ips_auth_for_group
Main:
- my_balance
- add_service
- update_service
- get_available_locations
- get_service_info
- suspend_service
- unsuspend_service
- terminate_service
- get_account_services
- prolong_service
- del_ips_from_service
- add_typecancel
- terminate_typecancel
- applycredit
- get_ips_access_list
- update_ips_access_list
- change_service_pass
- add_hosts_to_block
- del_hosts_from_block
- get_hosts_blocked_info
Work with groups:
set_ips_auth_for_group
Discription:
Configure access to the proxy group with authorization at the IP address.
This request completely updates the list of IP addresses from which access with IP authorization will be available. in Other words, this request does not add new IP addresses, it overwrites the current ones.
Access by login password from other addresses will also be available.
Parameter | Type | Description | Required |
---|---|---|---|
action | string | set_ips_auth_for_group | required |
hash | string | Your API hash | required |
userid | int | Your customer ID | required |
group_name | string | Name of the group (proxy login). | required |
accessips | string | A comma-separated list of IP addresses for accessing the proxy group without a password. You can specify networks in the range from /23 to /32. If you pass an empty value, all access IP addresses will be deleted. | required |
Example Request (CURL)
$postfields = array( "userid"=>$userid, "hash"=>$hash, "action"=>"set_ips_auth_for_group", "group_name"=>"proxylogin1", "accessips"=>"192.168.0.0/23,192.168.2.2", ); $result = connect_api_proxy007com($postfields); function connect_api_proxy007com($postfields) { $url = "https://proxy007.com/proxy/api/index.php"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 900); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); return $data; }
Answer:
{"code":"2001","status":"successful","group":"proxylogin1","accessips":"192.168.0.0\/23,192.168.2.2"}