TelePilot2 icon

TelePilot2

Your Personal Telegram CoPilot

Chat → Get Chat History

AI-generated

Summary

Retrieves a paginated list of messages from a specified Telegram chat.

Inputs

  • chat_id (required) — ID of the chat to fetch history from.
  • from_message_id (required) — Identifier of the message to start fetching from. Use 0 to start from the most recent message.
  • limit (required) — Maximum number of messages to retrieve (up to 100).

Output shape

A list of messages, each containing standard Telegram message fields.

Messages are returned in descending order of their ID (newest first). The default and maximum limit is 100 messages per execution.

Examples

Example 1: Fetch the 50 most recent messages from a chat.

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

Example 2: Fetch 10 messages starting from a specific message ID.

Chat ID: 123456789, From Message ID: 100, Limit: 10

Links

Discussion