# 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

void getChatLastMessages(string sId, int iBeginNumber, int iCount)

Parameters

Name Description
sId Unique chat identifier
iBeginNumber Number starting from which messages are sent
iCount Message count

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
}

Response Parameters

Name Description
messages The list of messages
text Message text
time The timestamp indicating when the message was created
peerId Unique identifier (TrueConf ID) of a user who sent or received a file
direction The type of message. The following types are possible:
• 0 - Incoming
• 1 - Outgoing
requestId A unique request identifier
result A flag indicating whether the request was successful

See also

Last Updated: 09/12/2025