Fuselage
Load Livechat messages history
Retrieve livechat messages history (all messages in a conversation)
URL
Requires Auth
HTTP Method
/api/v1/livechat/messages.history/:rid
no
GET

Payload

Argument
Example
Required
Description
rid
KuACMJ5MpN6SfAFWg
Required
The room _id.

Query Parameters

Argument
Example
Required
Description
token
iNKE8a6k6cjbqWhWd
Required
The visitor token.
ls
Optional
The timestamp to start loading.
end
Optional
The timestamp limit to load.
limit
Optional
The number of messages to load.

Example Call

1
curl http://localhost:3000/api/v1/livechat/messages.history/KuACMJ5MpN6SfAFWg?token=iNKE8a6k6cjbqWhWd
Copied!

Example Result

1
{
2
"messages": [{
3
"_id": "ZKWP8LfGnRHQ3ozWa",
4
"rid": "KuACMJ5MpN6SfAFWg",
5
"msg": "editing livechat message..",
6
"token": "iNKE8a6k6cjbqWhWd",
7
"alias": "Livechat Visitor",
8
"ls": "2018-09-14T13:31:33.201Z",
9
"u": {
10
"_id": "YgEoq2djbGdjjZnsL",
11
"username": "guest-4",
12
"name": "Livechat Visitor"
13
},
14
"mentions": [],
15
"channels": [],
16
"_updatedAt": "2018-09-14T13:31:33.222Z",
17
"editedAt": "2018-09-14T13:31:33.219Z",
18
"editedBy": {
19
"_id": "YgEoq2djbGdjjZnsL",
20
"username": "guest-4"
21
},
22
"urls": []
23
}],
24
"unreadNotLoaded": 0,
25
"success": true
26
}
Copied!
Export as PDF
Copy link
Edit on GitHub