How to call from Nebry UC via HTTP API requests

  1. Install ‘Nebry UC’ app from the store.
  2. Login using your credentials.
  3. Go to the ‘Settings’ page on the app and click on 'Enable the ability to start calls via API or HTTP requests’.


  4. Restart the application.
  5. Different code snippets for different languages are available below.


Curl

curl --location 'http://localhost:8080/call' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
    "number": "+35627790779"
}'


C#

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost:8080/call");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n    \"number\": \"+35627790779\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());


Javascript

const axios = require('axios');
let data = JSON.stringify({
  "number": "+35627790779"
});
 
let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'http://localhost:8080/call',
  headers: {
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  data : data
};
 
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});


Python

import http.client
import json
 
conn = http.client.HTTPSConnection("localhost", 8080)
payload = json.dumps({
  "number": "+35627790779"
})
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}
conn.request("POST", "/call", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article