Get Livechat Message History

Get the entire message history of a conversation.

HTTP MethodURLRequires Auth

GET

/api/v1/livechat/messages.history/:rid

no

Path Variables

KeyExample ValueDescription

rid *

KuACMJ5MpN6SfAFWg

The room ID.

Query Parameters

KeyExample ValueDescription

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.

Example Call

curl --location 'http://localhost:3000/api/v1/livechat/message/txHoTpZdqc5GaTbZ3?token=54fc5544030bcecda053311cb6b98920bdf' \

Example Response

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

Last updated

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