Telegram error 400: Bad Request: message can't be deleted
Last verified against Telegram Bot API reference
Bad Request: message can't be deletedWhat error 400 means
The message exists, but the bot is not allowed to delete it under the rules Telegram documents for deleteMessage. A second, longer form, Bad Request: message can't be deleted for everyone, appears when the message is too old to be removed from both sides of a private chat.
The documented limits are explicit: a message can only be deleted if it was sent less than 48 hours ago; service messages about supergroup, channel or forum-topic creation cannot be deleted; bots can delete their own outgoing messages in private chats, groups and supergroups, and incoming messages in private chats; anything else requires admin rights (can_delete_messages in supergroups and channels, or plain admin status in a basic group).
So the error is not about the ID being wrong. It is Telegram refusing a valid request on policy grounds.
What it looks like
{"ok":false,"error_code":400,"description":"Bad Request: message can't be deleted"}Why it happens
- The message is older than 48 hours.
- The bot is trying to delete another user's message in a group without being an administrator with delete rights.
- The target is a service message that Telegram never allows to be deleted.
- In a channel, the bot lacks
can_post_messages/can_delete_messages.
How to fix Telegram error 400
- 1Check the message date in your stored update; if it is more than 48 hours old, stop trying.
- 2Call
getChatMemberfor the bot's own ID in that chat and inspectcan_delete_messages. - 3Promote the bot with the delete right, then retry; there is no way around the 48-hour rule.
- 4For cleanup jobs, schedule deletion well inside the 48-hour window (for example at 47 hours).
How to stop it recurring
Design moderation and cleanup flows around the 48-hour limit: if a message must be removable later, pin a replacement or edit it to empty rather than relying on deletion. Request can_delete_messages during onboarding for group bots and verify it with getChatMember before offering delete features to users.
The 48-hour rule and its documented exceptions (service messages, dice in private chats) are listed with sources under editing and deleting limits. When the ID itself is stale rather than the policy blocking you, the API answers with message to delete not found; a delete wrapper should treat that one as success and this one as a permanent refusal worth logging.
Official reference: Telegram Bot API reference. See all Telegram error codes or the Telegram limits and quotas.
Related codes
Error 400 - quick answers
What does Telegram error 400 mean?
The message exists, but the bot is not allowed to delete it under the rules Telegram documents for deleteMessage . A second, longer form, Bad Request: message can't be deleted for everyone , appears when the message is too old to be removed from both sides of a private chat.
How do I fix Telegram error 400?
1. Check the message date in your stored update; if it is more than 48 hours old, stop trying. 2. Call getChatMember for the bot's own ID in that chat and inspect can_delete_messages . 3. Promote the bot with the delete right, then retry; there is no way around the 48-hour rule. 4. For cleanup jobs, schedule deletion well inside the 48-hour window (for example at 47 hours).
Should I retry after error 400?
No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.
Stop debugging Telegram by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.