Get all channels


List all channels with information containing sender name & email, messages and timestamps.

GET

/channels/

Parameters
Type
Description
status
boolean
Show only active channels

Optionally, you can set status parameter to the request URL to narrow the results. This will show only opened channels.

Request URL would look like this:

https://app.userengage.com/api/public/conversations/?status=true
curl -X GET -H "Authorization: Token <your_64_char_api_key>" "https://app.userengage.com/api/public/conversations/"

Response

{
    "count": 41,
    "next": "https://app.userengage.com/api/public/conversations/?page=2",
    "previous": null,
    "results": [
        {
            "id": 748553,
            "user": {
                "id": 23123848,
                "email": null,
                "name": "Ivory Caribou",
                "key": "EVvyMuAMtxAw"
            },
            "active": false,
            "agent": null,
            "messages": 1
        },
        {
            "id": 748550,
            "user": {
                "id": 23122805,
                "email": null,
                "name": "Red Pear",
                "key": "VCJ0tmNg5wuw"
            },
            "active": false,
            "agent": null,
            "messages": 1
        },
        {
            "id": 748548,
            "user": {
                "id": 23122759,
                "email": null,
                "name": "Yellow Finger",
                "key": "4Mc9crknttH3"
            },
            "active": false,
            "agent": null,
            "messages": 1
        },
        {
            "id": 748547,
            "user": {
                "id": 23122753,
                "email": null,
                "name": "Gray Leaf",
                "key": "WKgmSuskQVwZ"
            },
            "active": false,
            "agent": null,
            "messages": 1
        }
         .  .  .
    ]
}
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://app.userengage.com/api/public/conversations/",
  "method": "GET",
  "headers": {
    "authorization": "Token <your_64_char_api_key>"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.userengage.com/api/public/conversations/");
xhr.setRequestHeader("authorization", "Token <your_64_char_api_key>");

xhr.send(data);
var request = require("request");

var options = { method: 'GET',
  url: 'https://app.userengage.com/api/public/conversations/',
  headers: { authorization: 'Token <your_64_char_api_key>' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
<?php

$request = new HttpRequest();
$request->setUrl('https://app.userengage.com/api/public/conversations/');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'authorization' => 'Token <your_64_char_api_key>'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
import requests

url = "https://app.userengage.com/api/public/conversations/"

headers = {'authorization': 'Token <your_64_char_api_key>'}

response = requests.request("GET", url, headers=headers)

print(response.text)
import http.client

conn = http.client.HTTPSConnection("app.userengage.com")

headers = { 'authorization': "Token <your_64_char_api_key>" }

conn.request("GET", "/api/public/conversations/", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))