Telegram 400: Bad Request: not enough rights to send text messages to the chat — how to fix it
Bad Request: not enough rights to send text messages to the chat means the bot is in the group, but its permissions there do not allow this kind of message: the group's default permissions turn sending off for members, or the bot itself was restricted. Make the bot an administrator, or turn the permission back on; check with getChatMember for the bot's own id. In a channel the bot needs to be an administrator that can post.
By Livops team, the people who build and run LivopsUpdated
The error, as the Telegram Bot API returns it with error code 400[2][3]:
Bad Request: not enough rights to send text messages to the chat
Each library wraps it in its own words:
| Library | What you see |
|---|---|
| aiogram 3 | TelegramBadRequest: Telegram server says - Bad Request: not enough rights to send text messages to the chat[7][8] |
| python-telegram-bot | telegram.error.BadRequest: Not enough rights to send text messages to the chat[9][10] |
| grammY | GrammyError: Call to 'sendMessage' failed! (400: Bad Request: not enough rights to send text messages to the chat)[11] |
| Telegraf | TelegramError: 400: Bad Request: not enough rights to send text messages to the chat[12] |
python-telegram-bot drops the Bad Request: prefix and capitalizes the rest[9]. This page explains what the error means, lists the variants for photos, files and the rest, the causes from the most common, how to see the bot’s rights with getChatMember, and what to check when the bot runs on Livops.
What does the error mean?
The bot is in the chat — otherwise you would get a 403 or chat not found — but its permissions there do not cover the message it tried to send. Before sending, the server compares the message’s type with the bot’s effective permissions in that chat, and refuses with not enough rights to send <type> to the chat[3].
In groups and supergroups, those permissions come from two places. ChatPermissions describes what a non-administrator may do in a chat, and the group’s defaults are in getChat’s permissions field[1]. A member that was restricted individually has its own can_send_* fields, and a date when the restriction ends[1]. A bot that is a plain or restricted member is bound by the defaults; an administrator is not[5].
The variants
The error names the type that was refused. Each maps to a field of ChatPermissions[1][3]:
| Error ends with | Typical method | Permission |
|---|---|---|
text messages to the chat |
sendMessage |
can_send_messages |
contacts, locations, venues, invoice messages |
sendContact, sendLocation, sendVenue, sendInvoice |
can_send_messages |
photos to the chat |
sendPhoto |
can_send_photos |
videos to the chat |
sendVideo |
can_send_videos |
documents to the chat |
sendDocument |
can_send_documents |
music to the chat |
sendAudio |
can_send_audios |
voice notes to the chat |
sendVoice |
can_send_voice_notes |
video notes to the chat |
sendVideoNote |
can_send_video_notes |
polls to the chat |
sendPoll |
can_send_polls |
stickers, animations |
sendSticker, sendAnimation |
can_send_other_messages |
Forwarding and copying a message are checked the same way, against the type of the message being forwarded[3].
Neighbours that look similar
Bad Request: chat not found— the bot does not know the chat at all: a wrong id, or a chat it was never in. See chat not found.Forbidden: bot was kicked from the group chat,Forbidden: bot is not a member of the supergroup chatand the same for channels — a 403: the bot is out of the chat[2]. In a private chat, the 403 isbot was blocked by the user[2]. See bot was blocked by the user.Bad Request: need administrator rights in the channel chat— the channel version of this error: in a channel, only an administrator with the right to post may send[4].Too Many Requests: retry after N— slow mode or flood control, not permissions; see Telegram 429.
Causes, most common first
1. The group lets members read, not write
Admins of announcement-style groups often turn off sending for everyone but administrators. A bot added as an ordinary member falls under that default[5]: it stays in the chat, and every sendMessage fails. getChat shows it as permissions.can_send_messages: false[1].
2. The bot itself was restricted
An administrator restricted the bot in a supergroup. getChatMember then returns status: "restricted" with can_send_messages and the other fields set to false, and until_date telling when the restriction is lifted; 0 means forever[1].
3. Text is allowed, the media type is not
The group allows text but not photos, documents or stickers, and the bot sends a photo. The message changes to not enough rights to send photos to the chat, ... documents ... and so on[3]. Each type has its own field[1].
4. A channel, where only administrators post
A channel has no member permissions to switch on. The bot must be an administrator with can_post_messages, the right to post messages, which exists for channels only[1]. Without it, the error is need administrator rights in the channel chat[4].
5. Not a cause: slow mode
slow_mode_delay is the minimum delay between consecutive messages sent by each unprivileged user in a supergroup[1]. Sending too soon is a wait, not a missing right: the server waits it out, and answers Too Many Requests: retry after N when the wait is too long[6]. An administrator with can_manage_chat ignores slow mode[1].
How to see what the bot is allowed to do
First the bot’s own id, then its membership in the chat, then the chat’s defaults[1]:
curl -s "https://api.telegram.org/bot$BOT_TOKEN/getMe"
curl -s "https://api.telegram.org/bot$BOT_TOKEN/getChatMember?chat_id=$CHAT_ID&user_id=$BOT_ID"
curl -s "https://api.telegram.org/bot$BOT_TOKEN/getChat?chat_id=$CHAT_ID"
Read result.status from getChatMember[1]:
| status | What it means for sending |
|---|---|
creator, administrator |
Not limited by the group’s defaults; in a channel, needs can_post_messages |
member |
Follows the group’s default permissions from getChat |
restricted |
Its own can_send_* fields apply; supergroups only |
left, kicked |
Not in the chat: a 403, not this error |
getChatMember is only guaranteed to work for other users when the bot is an administrator[1]; asking about the bot itself is the case this check needs. The same logic in aiogram 3, for text messages:
from aiogram import Bot
async def can_send_text(bot: Bot, chat_id: int) -> bool:
me = await bot.get_me()
chat = await bot.get_chat(chat_id)
member = await bot.get_chat_member(chat_id, me.id)
if member.status == "creator":
return True
if chat.type == "channel":
return member.status == "administrator" and bool(member.can_post_messages)
if member.status == "administrator":
return True
defaults = bool(chat.permissions and chat.permissions.can_send_messages)
if member.status == "restricted":
return member.can_send_messages and defaults
if member.status == "member":
return defaults
return False # "left" or "kicked"
To hear about changes instead of asking, handle my_chat_member: Telegram sends it whenever the bot’s own status in a chat changes[1].
How to fix it
Make the bot an administrator. In the group’s or channel’s settings, add the bot as an administrator. In a group or supergroup that alone lifts the default permissions[5]; in a channel, keep the right to post messages switched on[1][4].
Or turn the permission back on. If the bot should stay an ordinary member, an administrator enables sending messages (or the media type you need) in the group’s permissions. Through the API this is setChatPermissions, which needs an administrator with can_restrict_members[1].
Or lift the restriction. For a bot restricted in a supergroup, restrictChatMember with all permissions set to True lifts it[1]; in the app, an administrator removes the restriction from the bot’s member entry.
Then handle it in code. A bot in many groups will meet this error again. Catch it per chat, log the chat id, and stop sending there until its status changes, rather than retrying:
from aiogram.exceptions import TelegramBadRequest
try:
await bot.send_message(chat_id, text)
except TelegramBadRequest as e:
if "not enough rights" not in e.message:
raise
await db.mark_chat_muted(chat_id) # un-mark it on the next my_chat_member update
On Livops
The rights are set inside Telegram, in each chat; no host can change them. What helps on Livops is seeing which chat refused and keeping that state:
- Logs. Log the
chat_id, the method and the error text; the project’s Logs page andlivops logs <service> -f(CLI) show them. - The chat list in PostgreSQL. Add PostgreSQL under Databases, and
DATABASE_URLis written into every service in the environment. Keep a row per chat with its last known status frommy_chat_member, and skip the chats where the bot may not write. - Token and fixed targets as variables. Put
BOT_TOKENand, for a fixed target such as an admin group or a channel,CHAT_IDunder Variables. Mark the token as a secret, and its value is never shown again. New values take effect on the next deploy; restart the service to apply them now.
A bot costs 19 credits a month (19,000 so’m); see Pricing.
Questions
Why can my bot send messages in one group but not in another?
Permissions are per chat. Each group has its own default permissions for members, and a bot that is a plain member follows them. If a group turns off sending messages for members, or restricts the bot, the bot cannot write there even though it works elsewhere.
Does making the bot an administrator fix it?
In a group or supergroup, yes: default member permissions describe what non-administrators may do, and an administrator is not limited by them. In a channel the bot must be an administrator with the right to post messages.
How do I check what my bot is allowed to do in a chat?
Call getMe to get the bot's id, then getChatMember with the chat id and that id. The status says whether the bot is the creator, an administrator, a member, restricted, left or kicked, and a restricted member shows which can_send fields are false. getChat shows the group's default permissions.
Is this the same as bot was blocked by the user or chat not found?
No. Chat not found means the bot does not know the chat at all. A 403 such as bot was blocked by the user or bot was kicked from the group chat means the bot may not write there at all. Not enough rights means the bot is in the chat but this kind of message is not allowed for it.
Can text be allowed but photos not?
Yes. Permissions are separate for text, photos, videos, documents, audio, voice notes, video notes, polls and other messages, and the error names the type: not enough rights to send photos to the chat, and so on.
Is slow mode the cause?
Not of this error. Slow mode sets a minimum delay between messages for each unprivileged member, and a bot that sends too soon is asked to wait, which ends as a 429 Too Many Requests when the wait is too long. Administrators who can manage the chat ignore slow mode.
Sources
- Telegram Bot API — ChatPermissions, ChatMember, ChatFullInfo, getMe, getChat, getChatMember, restrictChatMember, setChatPermissions, Update (core.telegram.org). Checked .
- Telegram Bot API server source — telegram-bot-api/Client.cpp (raw.githubusercontent.com). Checked .
- TDLib source — td/telegram/MessageContent.cpp (raw.githubusercontent.com). Checked .
- TDLib source — td/telegram/DialogManager.cpp (raw.githubusercontent.com). Checked .
- TDLib source — td/telegram/DialogParticipant.cpp (raw.githubusercontent.com). Checked .
- TDLib source — td/telegram/net/NetQueryDelayer.cpp (raw.githubusercontent.com). Checked .
- aiogram source — aiogram/exceptions.py (raw.githubusercontent.com). Checked .
- aiogram source — aiogram/client/session/base.py (raw.githubusercontent.com). Checked .
- python-telegram-bot source — telegram/error.py (raw.githubusercontent.com). Checked .
- python-telegram-bot source — telegram/request/_baserequest.py (raw.githubusercontent.com). Checked .
- grammY source — src/core/error.ts (raw.githubusercontent.com). Checked .
- Telegraf source — src/core/network/error.ts (raw.githubusercontent.com). Checked .
Put your project online today
Connect GitHub or drop a folder. No card is asked for.
Deploy your botRelated
- Telegram 400: Bad Request: chat not found — how to fix itThe bot asked Telegram for a chat it does not know. Either the chat_id is wrong (a typo, a channel id without its -100 prefix, a user's @username, an id cut to 32 bits), or it is right but this bot has never been in that chat: the user never pressed Start, the bot was never added to the group or channel, or the token belongs to a different bot.
- Telegram 403: Forbidden: bot was blocked by the user — how to handle itThe user blocked the bot, and Telegram refuses every message the bot sends them. Nothing is broken and a retry will not help: catch the 403, mark that user as inactive in your database, skip them in broadcasts, and mark them active again when they write to the bot.
- Telegram 429: Too Many Requests, flood control: retry after N — how to fix itTelegram flood control (429 Too Many Requests) is telling your bot to slow down: wait the number of seconds in retry_after, then send the same request again. It comes from sending too fast — more than about one message a second to one chat, 20 a minute to a group, or about 30 a second in a broadcast. Wait and retry in code, and send broadcasts from one queue at a steady pace.
- Telegram 400: Bad Request: wrong file identifier/HTTP URL specified — how to fix itBad Request: wrong file identifier/HTTP URL specified means Telegram could not use the file you passed as a photo, document or other media. Usually the file_id belongs to a different bot (a file_id works only for the bot that got it), a file_unique_id was sent instead, the id was cut, or Telegram could not download your URL. Upload the file again with this bot and save the new file_id, or upload it instead of sending a link.
- Telegram bot hosting in 2026: the options comparedA Telegram bot needs a process that never stops, or a public HTTPS address for a webhook. On Livops it runs from a GitHub push for 19 credits a month (19,000 so'm). Here is how a VPS, Railway, Render, Fly.io and Vercel compare.
- aiogram bot hosting: how to deploy an aiogram 3 botAn aiogram 3 bot needs one process that never stops, the token in an environment variable, state kept outside memory and a clean exit on SIGTERM. On Livops you push a repository with bot.py and requirements.txt, and it runs for 19 credits a month (19,000 so'm), polling or webhook.
- python-telegram-bot hosting: deploying a v22 botA python-telegram-bot bot runs as one Application: run_polling() for polling, run_webhook() with the webhooks extra for a webhook. Both stop cleanly on SIGTERM. On Livops it runs from a push with bot.py and requirements.txt for 19 credits a month (19,000 so'm).
- grammY bot deploy: polling, webhooks and hostingDeploy a grammY bot as one always-on Node.js process: bot.start() for polling, or webhookCallback() behind an HTTP server, with bot.stop() on SIGTERM. On Livops a repository with grammy in package.json runs as a bot from every push, for 19 credits a month (19,000 so'm).
- Telegraf bot hosting: deploying a Telegraf 4 bot on Node.jsA Telegraf bot is one Node.js process: bot.launch() for polling, or bot.webhookCallback() behind an HTTP server for a webhook, with bot.stop() on SIGTERM. On Livops a repository with telegraf in package.json is run as a bot from every push, for 19 credits a month (19,000 so'm).
- Bad Request: CHAT_SEND_WEBPAGE_FORBIDDEN — Telegram bot error and how to fix itBad Request: CHAT_SEND_WEBPAGE_FORBIDDEN means Telegram refused a message because it would put a link preview into a chat where your bot is not allowed to add web page previews. Turn the preview off with link_preview_options and is_disabled, send the text yourself instead of forwarding it, or make the bot an administrator of the group.
- Telegram 403: Forbidden: bot is not a member of the channel chat — how to fix itTelegram knows the channel, but your bot is not in it, so every send, edit or delete there fails with a 403. Usually the bot was never added (a public channel is found by its @username even so), it left with leaveChat, it was removed and then unbanned, or the token belongs to a different bot. Add the bot to the channel as an administrator that can post messages. The same error exists for supergroups and groups.