Set IP allowlist
curl --request POST \
--url https://cc.nadcab.com/api/v1/account/setOauthIpTables \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'oauthIptables=127.0.0.1\n127.0.0.2\n127.0.0.3'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({oauthIptables: '127.0.0.1\n127.0.0.2\n127.0.0.3'})
};
fetch('https://cc.nadcab.com/api/v1/account/setOauthIpTables', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cc.nadcab.com/api/v1/account/setOauthIpTables"
payload = { "oauthIptables": "127.0.0.1\n127.0.0.2\n127.0.0.3" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cc.nadcab.com/api/v1/account/setOauthIpTables",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "oauthIptables=127.0.0.1%5Cn127.0.0.2%5Cn127.0.0.3",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"code": 200,
"msg": "success",
"data": true
}API settings
Set IP allowlist
POST
/
account
/
setOauthIpTables
Set IP allowlist
curl --request POST \
--url https://cc.nadcab.com/api/v1/account/setOauthIpTables \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'oauthIptables=127.0.0.1\n127.0.0.2\n127.0.0.3'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({oauthIptables: '127.0.0.1\n127.0.0.2\n127.0.0.3'})
};
fetch('https://cc.nadcab.com/api/v1/account/setOauthIpTables', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cc.nadcab.com/api/v1/account/setOauthIpTables"
payload = { "oauthIptables": "127.0.0.1\n127.0.0.2\n127.0.0.3" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cc.nadcab.com/api/v1/account/setOauthIpTables",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "oauthIptables=127.0.0.1%5Cn127.0.0.2%5Cn127.0.0.3",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"code": 200,
"msg": "success",
"data": true
}Authorizations
Your API key from Console → Settings → Key & Access, sent as Authorization: Bearer ncl_....
Body
application/x-www-form-urlencoded
127.0.0.1\n127.0.0.2\n127.0.0.3 (separate multiple IPs with \n)
Example:
"127.0.0.1\\n127.0.0.2\\n127.0.0.3"