Telegram Bot icon

Telegram Bot

Interact with the Telegram Bot API – send messages, manage chats, handle payments, and more

Actions101

Update → Get Updates

AI-generated

Summary

Retrieve updates for the Telegram bot using optional parameters to control the update offset, limit, long polling timeout, and the types of updates allowed.

Inputs

  • Offset — Identifier of the first update to be returned to specify the starting point for fetching updates.
  • Limit — Maximum number of updates to return, between 1 and 100.
  • Timeout — Timeout in seconds for long polling; holds the request open on the server to wait for new updates.
  • Allowed Updates (JSON) — JSON array specifying the types of updates to receive (e.g., messages, edited messages) to filter the updates.

Output shape

a list of update objects, each representing an individual update received by the bot

The response returns an array of update objects; if no updates are available, returns an empty array. Supports pagination via the offset parameter to receive subsequent updates. Errors are returned as exceptions.

Examples

Example 1: Fetch the latest 50 updates starting from update ID 1000.

Set Offset to 1000 and Limit to 50 with default Timeout and Allowed Updates.

Links

Discussion