Get a list of channels
GET https://secure.usedesk.com/uapi/channels
Warning. If you use the server version of Usedesk, you will have a different URL of methods. Check the URL for the API with our team — support@usedesk.com.
The method returns the channels of the company:
* — required fields
|
Parameter |
Value |
|---|---|
|
api_token* |
Channel API token |
|
channel_type |
Filters only channels of the selected type. Possible types:
|
Sample request in PHP
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://secure.usedesk.com/uapi/channels?api_token=4909dd7e930d0cd25c45d1631bbc859af550971d&channel_type=fb",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_CUSTOMREQUEST => "GET"
),
));
$result = curl_exec($curl);
return $result;
Example of a response from the server
[
{
"channel_id": 9192,
"channel_name": "Usedesktest",
"channel_type": "facebook"
}
]