VK Community icon

VK Community

Interact with VK (VKontakte) API

Message → Get History

AI-generated

Summary

Retrieve a message history for a specific conversation identified by its Peer ID.

Inputs

  • Peer ID (required) — The unique identifier of the conversation to retrieve messages from (can be a user ID, chat ID, or community ID).
  • Count — The maximum number of messages to return, with a default of 20 and a maximum allowed value of 200.
  • Offset — The pagination offset used to skip a number of messages before starting to return results (default is 0).

Output shape

An object containing the retrieved message history, including the messages and relevant metadata from the conversation.

The returned data structure follows VK API's messages.getHistory response format. Pagination is supported via 'count' and 'offset' parameters. Errors are returned as workflow execution errors unless the node is set to continue on fail, in which case error messages are included in the output.

Examples

Example 1: Fetch the last 50 messages from a chat with ID 123456789.

Set Peer ID to 123456789, Count to 50, and leave Offset at 0.

Links

Discussion