Get single conversation


Get information about single channel via simple GET request.

GET

/conversations/:id/

Attributes
Type
Description
id
integer
Unique ID of a channel
curl -X GET -H "Authorization: Token <your_64_char_api_key>" "https://app.userengage.com/api/public/conversations/:id/"

Response

{
  "results": {
    "active": true,
    "messages": [
      {
        "user": {
          "key": null,
          "id": 382,
          "email": "agent@gmail.com",
          "name": "Agent Name"
        },
        "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...",
        "chat": 339461,
        "source": "chat",
        "source_context": {},
        "id": 790087,
        "timestamp": "2017-05-24T11:06:40.378842Z"
      }
    ],
    "user": {
      "key": "KQB9EPEd04Sx",
      "id": 11768499,
      "email": "changed16@email.com",
      "name": "Jane Doe"
    },
    "id": 339461,
    "agent": null
  },
  "previous": null,
  "count": 1,
  "next": null
}
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://app.userengage.com/api/public/conversations/:id/",
  "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/:id/");
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/:id/',
  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/:id/');
$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/:id/"

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/:id/", headers=headers)

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

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