Telegram Bot icon

Telegram Bot

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

Actions101

Message → Delete Messages

AI-generated

Summary

Delete multiple messages in a specified chat by providing the chat identifier and an array of message IDs.

Inputs

  • Chat ID (required) — Unique identifier for the target chat or username (@channelusername).
  • Message IDs (JSON) (required) — JSON array of message IDs to delete, e.g. [1, 2, 3].

Output shape

a list of results indicating deletion success or error for each message ID requested.

Returns the Telegram API response result for each deleted message if successful. If an error occurs, an error message is included. The 'message_ids' input must be parsed from JSON to an array.

Examples

Example 1: Delete several messages in a chat named '@examplechannel' with message IDs 10, 11, and 12

Set 'Chat ID' to '@examplechannel' and 'Message IDs (JSON)' to '[10, 11, 12]'.

Links

Discussion