Skip to main content

Get Dialers

To obtain the list of uContact dialers, this API needs to be used. For example, if we want to create a dropdown menu from another application to display the dialers and perform a specific action.

You can check the Colección de Postman to see an example and test it with your instance.

All data enclosed in {{ }} are values that will be replaced with the client's own data and/or the corresponding instance.


HTTP Request

Method Resource
POST /Integra/resources/Dialers/get

Request Header

Key Value
Authorization Basic {{Token}}


Code Examples

You can copy the following code examples and replace the "{{variable}}" with the correct data.

HTTP

POST /Integra/resources/Dialers/get HTTP/1.1
Host: {{instance}}.ucontactcloud.com
Authorization: Basic {{Token}}
cURL
curl --location --globoff --request POST 'https://{{instance}}.ucontactcloud.com/Integra/resources/Dialers/get' \
--header 'Authorization: Basic {{Token}}'
JavaScript
const myHeaders = new Headers();
myHeaders.append("Authorization", "Basic {{Token}}");

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://{{instance}}.ucontactcloud.com/Integra/resources/Dialers/get", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
JQuery
var settings = {
  "url": "https://{{instance}}.ucontactcloud.com/Integra/resources/Dialers/get",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Basic {{Token}}"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
C#
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://{{instance}}.ucontactcloud.com/Integra/resources/Dialers/get");
request.Headers.Add("Authorization", "Basic {{Token}}");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://{{instance}}.ucontactcloud.com/Integra/resources/Dialers/get")
  .method("POST", body)
  .addHeader("Authorization", "Basic {{Token}}")
  .build();
Response response = client.newCall(request).execute();
Python
import http.client

conn = http.client.HTTPSConnection("{{instance}}.ucontactcloud.com")
payload = ''
headers = {
  'Authorization': 'Basic {{Token}}'
}
conn.request("POST", "/Integra/resources/Dialers/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))


HTTP Response

Responses in which an error occurred due to the sent data will generally be delivered with an HTTP code 200 and a '0' in the response body; therefore, caution should be exercised when validating the HTTP Code Response.

The successful response will be a JSON-formatted text corresponding to an array of objects, where each object represents a dialer.

Successful response

[
	{
        "campaign": "DEMO007<-",
        "schedule": "mon,tue,wed,thu,fri,sat;08:00-21:00",
        "dialertype": "PowerDialer",
        "status": 1,
        "dialstring": "SIP/CLEVERSIP/9898",
        "context": "PowerDialer",
        "exten": "${EXTEN}",
        "am": 0,
        "sound": "",
        "maxchannels": 2,
        "variables": "FORM=Totality:language=default:initialSilence=1500:greeting=2000:afterGreetingSilence=1000:totalAnalysisTime=2500:minWordLength=100:betweenWordSilence=50:maxNumberOfWords=2:silenceThreshold=256",
        "timeout": 30,
        "callerid": "18885751288",
        "retries": 0,
        "callerpres": 20,
        "tbc": -5,
        "dncr": 1,
        "schedulephones": "0=HMW:1=HMW:2=HMW:3=HMW:4=HMW:5=HMW:6=HMW:7=HMW:8=MWH:9=MWH:10=MWH:11=MWH:12=MWH:13=MWH:14=MWH:15=MWH:16=MWH:17=MWH:18=MWH:19=HMW:20=HMW:21=HMW:22=HMW:23=HMW",
        "autoanswer": 1,
        "tbc_nocontact": 0,
        "earlymedia": 0,
        "recyclecount": 0,
        "recycle": "[]",
        "country": "",
        "rule": "NONE",
        "autoconvertcallerid": 0
    }
]

Error response

0