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/:visitorId

Path Variables

KeyExample ValueDescription

roomId*

hhMKhHnnbY79mGs9K

Livechat room ID.

visitorId*

QyBAKC5Wc8tcv6cco

Livechat visitor ID.

Example Call

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'

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
}

Last updated

Rocket.Chat versions receive support for six months after release.