Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 2.13 KB

File metadata and controls

52 lines (42 loc) · 2.13 KB

Get Livechat Message History

Get the entire message history of a conversation.

HTTP MethodURLRequires Auth
GET/api/v1/livechat/messages.history/:ridno

Path Variables

KeyExample ValueDescription
rid *KuACMJ5MpN6SfAFWgThe room ID.

Query Parameters

KeyExample ValueDescription
token *iNKE8a6k6cjbqWhWdThe visitor token.
ls2018-09-14T13:31:33.201ZThe timestamp to start loading the messages.
end2018-09-14T14:31:33.201ZThe timestamp limit to stop loading the messages.
limit25The number of messages to load.

Example Call

{% code overflow="wrap" %}

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

{% endcode %}

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
}