RelayStack icon

RelayStack

Interact with Telegram API Gateway

Chat → Get Chat Messages

AI-generated

Summary

Retrieve paginated messages from a specific chat in a RelayStack instance.

Inputs

  • instanceId (required) — UUID of the connected RelayStack instance.
  • chatId (required) — Numeric ID of the chat to fetch messages from.
  • limit — Maximum number of messages to return (max 100). Default 50.
  • offsetId — Message ID to start from; returns messages older than this ID.

Output shape

The API response containing the requested messages, as returned by the RelayStack backend.

Returns message data from the specified chat, paginated per limit and offset parameters.

Examples

Example 1: Fetch the 20 most recent messages from chat 12345 of instance ins-abc.

instanceId=ins-abc, chatId=12345, limit=20

Example 2: Paginate backward from message ID 500 to load older messages.

instanceId=ins-abc, chatId=12345, offsetId=500

Links

Discussion