Get the Livechat information of a visitor. This endpoint returns only those chats that are served and closed.
The authToken of the authenticated user.
The userId of the authenticated user.
The room ID.
The visitor ID.
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.
Sort the events in the ascending (1) or descending (-1) order. By default, the result is sorted in descending order. The most recent chats are returned first. Enter the value as: sort[ts]=1 or sort[ts]=-1. Here ts refers to timestamp.
Enter the text to search for within the chat.
Filter the results to display only closed chats. The value can be "true" or "false".
Filter the results to display only chats that are joined by agents. The value can be "true" or "false".
Filter the results by the source of the chat. The value can be: widget, sms, api, email, app, other.
{
"history": [
{
"_id": "hhMKhHnnbY79mGs9K",
"msgs": 2,
"fname": "Maria",
"ts": "2021-07-22T17:17:04.216Z",
"v": {
"_id": "QyBAKC5Wc8tcv6cco",
"username": "guest-537",
"token": "8s7e9ony6ctl27e1qf8kue",
"status": "online",
"lastMessageTs": "2021-07-22T17:17:04.937Z"
}
}
],
"count": 1,
"offset": 0,
"total": 1,
"success": true
}Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}