Whitelist IPs

Ori Goren-Bar 阳锐
Ori Goren-Bar 阳锐
  • Updated
API endpoint: POST /api/add_wip
Authorization: TOKEN - Token should be generated using Generate token API
POST body
  • ip=""
curl "" -H "Authorization: TOKEN" -H "Content-Type: application/json" -d "{\"ip\":\"\"}"


#!/usr/bin/env node
	method: 'POST',
	url: '',
	json: {'ip':''},
	headers: {'Authorization': 'TOKEN'},
}).then(function(data){ console.log(data); },
	function(err){ console.error(err); });


package example;

import org.apache.http.HttpHost;
import org.apache.http.client.fluent.*;

public class Example {
  public static void main(String[] args) throws Exception {
String body = "{\"ip\":\"\"}"; String res = Executor.newInstance() .addHeader("Authorization", "TOKEN")

.bodyString(body, ContentType.APPLICATION_JSON))

System.out.println(res) }



using System;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;

public class Program {
  public static async Task Main() {
    var client = new HttpClient();
    var requestMessage = new HttpRequestMessage {
      Method = HttpMethod.Post,
RequestUri = new Uri(""), Headers = { {"Authorization", "TOKEN"} },
Content = new StringContent(JsonConvert.SerializeObject(new {
ip = ""
}), Encoding.UTF8, "application/json")) }; var response = await client.SendAsync(requestMessage); var responseString = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseString); } }


#!/usr/bin/env python
print('If you get error "ImportError: No module named requests", please install it:\n$ sudo pip install requests');
import requests

data = {'ip':''} headers = {'Authorization': 'TOKEN'} r = requests.post('', data=json.dumps(data), headers=headers) print(r.content)
Share this

Was this article helpful?

0 out of 0 found this helpful