messages.getHistory
Gets back the conversation history with one interlocutor / within a chat
Example
TL schema
Parameters
Name | Type | Description |
peer | Target peer | |
offset_id | Only return messages starting from the specified message ID | |
offset_date | Only return messages sent before the specified date | |
add_offset | Number of list elements to be skipped, negative values are also accepted. | |
limit | Number of results to return | |
max_id | If a positive value was transferred, the method will return only messages with IDs less than max_id | |
min_id | If a positive value was transferred, the method will return only messages with IDs more than min_id | |
hash |
Result
Possible errors
Code | Type | Description |
401 | AUTH_KEY_PERM_EMPTY | The temporary auth key must be binded to the permanent auth key to use these methods. |
400 | CHANNEL_INVALID | The provided channel is invalid |
400 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup |
400 | CHAT_ID_INVALID | The provided chat id is invalid |
400 | CONNECTION_DEVICE_MODEL_EMPTY | Device model empty |
400 | MSG_ID_INVALID | Invalid message ID provided |
400 | PEER_ID_INVALID | The provided peer id is invalid |
Can bots use this methd ?
yes
Related pages
How to fetch results from large lists of objects.
Last updated