Get the entire message history of a conversation.
HTTP Method | URL | Requires Auth |
---|---|---|
GET | /api/v1/livechat/messages.history/:rid | no |
Key | Example Value | Description |
---|---|---|
rid * | KuACMJ5MpN6SfAFWg | The room ID. |
Key | Example Value | Description |
---|---|---|
token * | iNKE8a6k6cjbqWhWd | The visitor token. |
ls | 2018-09-14T13:31:33.201Z | The timestamp to start loading the messages. |
end | 2018-09-14T14:31:33.201Z | The timestamp limit to stop loading the messages. |
limit | 25 | The number of messages to load. |
{% code overflow="wrap" %}
curl --location 'http://localhost:3000/api/v1/livechat/message/txHoTpZdqc5GaTbZ3?token=54fc5544030bcecda053311cb6b98920bdf' \
{% endcode %}
{
"messages": [{
"_id": "ZKWP8LfGnRHQ3ozWa",
"rid": "KuACMJ5MpN6SfAFWg",
"msg": "editing livechat message..",
"token": "iNKE8a6k6cjbqWhWd",
"alias": "Livechat Visitor",
"ls": "2018-09-14T13:31:33.201Z",
"u": {
"_id": "YgEoq2djbGdjjZnsL",
"username": "guest-4",
"name": "Livechat Visitor"
},
"mentions": [],
"channels": [],
"_updatedAt": "2018-09-14T13:31:33.222Z",
"editedAt": "2018-09-14T13:31:33.219Z",
"editedBy": {
"_id": "YgEoq2djbGdjjZnsL",
"username": "guest-4"
},
"urls": []
}],
"unreadNotLoaded": 0,
"success": true
}