Actions34
- Chat Actions
- Contact Actions
- File Actions
- Group Actions
- Login Actions
- Message Actions
- User Actions
Message → Delete Messages
AI-generatedOverview
This node operation deletes one or more messages from a specified Telegram chat. It supports deleting messages either for the user only or for all users in the chat, based on the 'revoke' option. This is useful for managing chat content by removing unwanted or sensitive messages programmatically.
Use Case Examples
- Deleting a single message by specifying its ID and chat ID.
- Deleting multiple messages at once by providing a comma-separated list of message IDs.
- Choosing to delete messages for all users in the chat or just for the current user.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier of the chat from which messages will be deleted. |
| Message IDs | Comma-separated list of message identifiers to be deleted from the chat. |
| Delete for All Users? | Boolean flag indicating whether the messages should be deleted for all users (true) or only for the current user (false). |
Output
JSON
success- Indicates whether the delete operation was successful.messages- Details about the deleted messages or the result of the delete operation.
Dependencies
- Requires an API key credential for Telegram API access.
Troubleshooting
- Ensure the Telegram client session is logged in before attempting to delete messages; otherwise, the node will throw an error indicating the client is not initialized.
- If the message IDs or chat ID are invalid or not accessible, the node may fail to delete messages and throw an error.
- If the 'revoke' option is set to true, the user must have permission to delete messages for all users; otherwise, the operation may fail.
Links
- Telegram API DeleteMessages Method - Official Telegram API documentation for deleting messages.