Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Chat → Get Chat History

AI-generated

Summary

Retrieve chat message history from a specified Telegram chat starting from a given message ID up to a maximum number of messages.

Inputs

  • Chat ID (required) — The identifier of the chat from which to fetch the message history.
  • From Message ID (required) — Identifier of the message starting from which history must be fetched; use 0 to get messages from the latest.
  • Limit (required) — Maximum number of messages to return, up to 100 at once.

Output shape

a single object representing the chat history messages.

The returned data is the result of invoking Telegram's 'getChatHistory' method and contains the messages fetched based on the provided parameters.

Examples

Example 1: Fetch the last 50 messages starting from the most recent in chat with ID 123456789.

Chat ID: 123456789, From Message ID: 0, Limit: 50

Links

Discussion