Telegram Bot '403 Forbidden: bot was blocked by the user'? The 4-Step Way to Handle It

By · Published 2026-11-19 · Last verified 2026-11-19

What does "403 Forbidden: bot was blocked by the user" mean on a Telegram bot?

It means that user blocked your bot, so Telegram refuses to deliver anything to their private chat until they unblock it. In the official Telegram Bot API server source code, Telegram's internal USER_IS_BLOCKED error is turned into HTTP error code 403 with the description "bot was blocked by the user", which libraries usually print as 403 Forbidden: bot was blocked by the user. Your token, chat ID and code are fine; retrying won't help. This guide gives a 4-step method to handle it, the related 403 errors that look similar, and how to detect blocks before a send fails. Checked against Telegram's Bot API documentation and the telegram-bot-api source on 2026-11-19.

Grid of the 4-step method for a Telegram bot blocked by the user: stop on the first 403, flag the chat, listen for my_chat_member updates and resume on the next message, because bots can't start conversations
The stop, flag, listen, resume method.

Why can't a bot just message the user again?

Because Telegram only lets bots talk to people who chose to talk to them. Telegram's introduction to bots says bots can't start conversations with users: a user must either add them to a group or send them a message first. Blocking withdraws that choice. There is no Bot API method to ask for permission again, and a bot can't unblock itself. The only way back is the user unblocking the bot and sending it something, for example /start.

SituationCan the bot send?What changes it
User started the botYes-
User blocked the botNo, 403User unblocks and messages it
User never started the botNoUser opens the bot and presses Start
Account deletedNo, 403 "user is deactivated"Nothing; remove the chat

The 4-step "stop, flag, listen, resume" method

This is how we handle blocked users in our own Telegram bots, including the Auto X scheduler:

  1. Stop on the first 403. Catch the error in your send function and don't retry it. Unlike a 429, there is no retry_after to wait for.
  2. Flag the chat, don't delete it. Store blocked=true and the date on the user record, and skip flagged chats in every broadcast, reminder and queue.
  3. Listen for my_chat_member. Telegram sends this update when the bot is blocked or unblocked in a private chat, so you can flag users before your next send fails.
  4. Resume on the next message. When an unblock update or any new message arrives from a flagged user, clear the flag and continue.
Two columns comparing the reversible 403 bot was blocked by the user with permanent or different 403 errors: user is deactivated, bot was kicked from the group, and bot is not a member of the channel
Which 403 error you have.

How do you detect a block before sending?

Subscribe to the my_chat_member update. The Bot API's Update object says this update arrives when "the bot's chat member status was updated in a chat", and that "for private chats, this update is received only when the bot is blocked or unblocked by the user." Because in a private chat it only fires on a block or an unblock, you can read it simply: if the new status is no longer member, the user blocked the bot; if it changed back to member, they unblocked it. Log the raw status values your bot receives the first time, so your code matches what Telegram actually sends.

// Pseudocode for a webhook handler
if (update.my_chat_member && update.my_chat_member.chat.type === 'private') {
  const status = update.my_chat_member.new_chat_member.status;
  if (status === 'member') await users.clearBlocked(update.my_chat_member.chat.id);
  else await users.flagBlocked(update.my_chat_member.chat.id);
}

If you set allowed_updates in setWebhook or getUpdates, include "my_chat_member", or the update never reaches you. When updates stop arriving at all, the cause is usually the webhook itself; see our guide to a Telegram webhook that isn't working.

Which other 403 errors look similar?

Several 403s share the "Forbidden" prefix, and each needs a slightly different record. The telegram-bot-api source returns these descriptions:

DescriptionMeaningWhat to store
bot was blocked by the userUser blocked the botFlag; can be reversed by the user
Forbidden: user is deactivatedThe Telegram account is goneMark inactive permanently
Forbidden: bot was kicked from the group chatRemoved from a groupFlag the group, not the users
Forbidden: bot is not a member of the channel chatBot isn't in that channelCheck the channel admin list

Keep the reason, not just an "inactive" flag. A blocked user may come back; a deactivated account won't. Telegram's Bot API documentation also warns that the integer error_code is subject to change, so match on the description text as well as the code.

Four boxes explaining my_chat_member in private chats: it fires only on block or unblock, a status other than member means blocked, member means unblocked, and it must be listed in allowed_updates
How my_chat_member signals a block.

Why do blocked users hurt a scheduler or broadcast bot?

Because every failed send still spends your rate budget. Telegram's Bots FAQ says bots should avoid more than one message per second in a single chat and can't broadcast more than about 30 messages per second for bulk notifications without paid broadcasts, and that going over leads to 429 errors. A queue that keeps retrying blocked chats spends part of that limit on messages that can never arrive; our guide to Telegram rate limits and retry_after covers the 429 side.

Treat 403 as a permanent failure in your retry logic. A message that failed with 403 belongs in a "won't deliver" state, not a retry queue; the pattern in our failed-publish retry and dead-letter guide applies here. Mobile push has the same problem with stale device tokens, and GSPTeck's guide to FCM token hygiene handles it the same way: remove recipients that can't receive.

How can a bot get blocked less often?

Send fewer, more useful messages and let people control them. Common causes are unrequested broadcasts, reminders nobody asked for, and no visible way to turn notifications off. Give users a setting or command to pause messages, keep confirmations short, and only message people about things they started.

Measure it, too. Count 403 "blocked" errors per message type for a week; if one reminder or broadcast produces most of them, that message is the one to cut or make opt-in. If you want to schedule posts to X from Telegram without building your own bot, the Auto X Telegram bot does that; it is our own product, and the Auto X homepage lists its plans. A different Bot API limit is a message that exceeds 4096 characters; see how to split a sendMessage that is too long.

Vertical Pinterest graphic with five steps for handling a Telegram bot blocked by the user
Pinterest pin: Telegram bot blocked (403).

FAQ

Can a bot tell if a user deleted the chat without blocking?

Not from the documented updates. Telegram sends my_chat_member in private chats only when the bot is blocked or unblocked, so a deleted chat with no block produces no update.

Should I delete a user's data when they block the bot?

That's a product and privacy decision. Flagging keeps their settings if they come back; deleting suits bots that promise not to keep data. Follow your privacy policy either way.

Does the 403 count against my bot or get it banned?

Telegram doesn't document a penalty for receiving 403 errors. The practical cost is the rate budget you waste by retrying chats that can't receive messages.

How do I know a user unblocked the bot?

You receive a my_chat_member update whose new status is member, or a new message from that user. Clear the flag when either arrives.

Sources