Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
45 lines (37 loc) · 1.72 KB

File metadata and controls

45 lines (37 loc) · 1.72 KB

Search Visitor Chat

Get the Livechat information of a visitor. This endpoint returns only those chats that are served and closed.

HTTP MethodURLRequires Auth
GET/api/v1/livechat/visitors.searchChats/room/:roomId/visitor/:visitorIdyes

Path Variables

KeyExample ValueDescription
roomId*hhMKhHnnbY79mGs9KLivechat room ID.
visitorId*QyBAKC5Wc8tcv6ccoLivechat visitor ID.

Example Call

{% code overflow="wrap" %}

curl --location --request GET 'http://localhost:3000/api/v1/livechat/visitors.searchChats/room/:roomId/visitor/:visitorId\
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name'

{% endcode %}

Example Response

{
    "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
}