getChatLastMessages
About 1 min
getChatLastMessages
Description: Get a list of chat messages.
The command is used to get a certain number of messages from the chat, starting from the message with the given index.
Request example:
{
"method": "getChatLastMessages",
"requestId" : "1",
"chatId": "b3b6e79f00677a63b545791fafca80d1119e56c3",
"beginNumber": 0,
"count": 10
}Response example:
{
"method": "getChatLastMessages",
"requestId" : "1",
"messages": [
{
"text": "hello",
"time": 1661428897,
"peerId": "user@some.server",
"direction": 0
},
{
"text": "hi",
"time": 1661428876,
"peerId": "user@some.server",
"direction": 0
}
],
"result": true
}Parameter description:
chatIdβ Unique chat identifierbeginNumberβ Number starting from which messages are sent.countβ Message countmessagesβ the list of messagestextβ Message text.timeβ the timestamp indicating when the message was createdpeerId- a unique identifier of the user (TrueConf ID) of the sender or receiverdirectionβ the type of message. The following types are possible:0β Incoming1β Outgoing
requestId- a unique request identifier. You can find more details about it here.
See also: