The short answer: right ID, bot in the chat, thread ID for topics
To post to a Telegram group, add the bot to the group, use the group's negative chat ID (supergroups and channels start with -100), and pass message_thread_id to post in a forum topic. "Bad Request: chat not found" nearly always means a wrong ID or a bot that is not a member.
Last verified: October 2026 against the Telegram Bot API reference, Telegram's bot API dialog ID specification, the bot features page and the Bots FAQ. Error strings are the literal descriptions the API returns.
The working call is short:
curl -X POST "https://api.telegram.org/bot<TOKEN>/sendMessage" \
-d "chat_id=-1001234567890" \
-d "text=Deploy finished"
Almost every failure comes from one of three things: the chat_id is wrong or has been changed, the bot is not in the chat or has no right to post, or the message is aimed at a forum topic without a message_thread_id. This table maps what you see to which of the three it is.
| What you get back | Which problem | Go to |
|---|---|---|
Bad Request: chat not found | The ID does not resolve to a chat your bot can see | Find the right ID |
Bad Request: group chat was upgraded to a supergroup chat | You are using a basic group's old ID | Supergroup migration |
Forbidden: bot was kicked from the group chat | The bot is not in the group any more | Add the bot |
Bad Request: have no rights to send a message | The bot is in the chat but cannot post | Permissions |
Forbidden: bot is not a member of the channel chat | Channel, bot not an administrator | Permissions |
| Message sent, but it lands in the wrong topic | No message_thread_id | Forum topics |
Need the ID now? The Telegram chat ID finder lists every chat a bot token can see, with each chat's type and exact ID.
Step 1: get the bot into the group
A bot cannot send to a group it is not in. Telegram does not let a bot join a group by itself: a member with the right to add members has to add it, from the group's member list or from the bot's profile ("Add to Group").
If the bot does not show up as an option, check its BotFather settings. The features page describes /setjoingroups as the command to "toggle whether your bot can be added to groups or not". If someone turned it off, nobody can add the bot until you turn it back on.
Channels work differently. A channel is a broadcast chat where only administrators post, so the bot has to be added as an administrator with permission to post messages. A bot that joined a channel as a subscriber through an invite link cannot post there, and the API answers Forbidden: bot is not a member of the channel chat.
Being removed is just as final. If an admin removes the bot, every send to that chat fails with Forbidden: bot was kicked from the group chat (or supergroup chat, or channel chat) until someone adds it back. Your code cannot fix that. Catch the 403, mark the chat as inactive and stop retrying.
Sending is not the same as receiving
Privacy mode often gets the blame here, wrongly. The features page explains that "By default, all bots added to groups run in Privacy Mode and only see relevant messages and commands". That limits what the bot receives. It does not stop the bot from sending. A bot in privacy mode can post to the group as normal. If your bot posts fine but never reacts to ordinary messages in the group, that is a separate problem, covered in our Telegram bot not responding guide.
Step 2: find the group's chat ID
Bots get no list of chats. A bot learns a chat's ID only from an update that comes from that chat, or by asking about a public chat by its username. That is why a new bot gets Bad Request: chat not found for a group it has never heard from. There are three reliable ways to get the ID.
Option A: read it from getUpdates
- Add the bot to the group.
- Send a message the bot will receive. With privacy mode on, an ordinary message is not delivered, so send a command such as
/start@YourBotor mention the bot. - Open
https://api.telegram.org/bot<TOKEN>/getUpdatesand readresult[].message.chat.id. It also showschat.typeandchat.title, so you can confirm you are looking at the right group.
If getUpdates returns Conflict: can't use getUpdates method while webhook is active, the token has a webhook set. Read the chat ID from what arrives at your webhook instead, or use a separate test bot. Do not delete a production webhook just to find an ID. Our webhook vs long polling guide explains why the two modes cannot run together.
Option B: use a public username
The reference defines chat_id in sendMessage as "Unique identifier for the target chat or username of the target bot, supergroup or channel in the format @username". If the supergroup or channel is public, chat_id=@yourgroup works directly. To store the numeric ID, which keeps working if the username changes, call getChat once with chat_id=@yourgroup and save result.id. Private groups have no username, so this option only works for public chats.
Option C: use the chat ID finder
The chat ID finder does Option A for you in the browser. Paste a token and it lists the private chats, groups, supergroups and channels the bot has updates from, with each ID ready to copy.
Why group IDs are negative, and what -100 means
Telegram's Bot API encodes the chat type in the sign and range of the ID. The rules are in the bot API dialog ID specification:
| Chat type | How the Bot API ID is formed | Looks like |
|---|---|---|
| User (private chat) | Same as the user ID. "MTProto user IDs are equal to bot API user dialog IDs" | 123456789 (positive) |
| Basic group | The internal ID made negative | -987654321 |
| Supergroup or channel | -(1000000000000 + channel_id) | -1001234567890 |
Adding 1,000,000,000,000 and negating is what produces the familiar -100 at the start of supergroup and channel IDs. In practice:
- Keep the minus sign.
1001234567890and-1001234567890are different chats, and a form, CSV export or spreadsheet that drops the sign gives youchat not found. - Do not add or remove -100 by hand. If you copied an ID from a client app or an MTProto library, it may be in the internal form without the prefix. Use the ID exactly as the Bot API gives it in
chat.id. - Store it as a 64-bit integer or a string. The Chat object notes that the ID "has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe". A 32-bit
INTcolumn truncates supergroup IDs. A JavaScriptNumberis fine, because a double holds 52 bits exactly.
The type field tells you which kind of chat you have. The reference lists its values as "private", "group", "supergroup" or "channel". Log it beside every ID you save. It tells you whether a stored ID can still be a basic group, which matters for the next section.
When the group becomes a supergroup, the ID changes
Basic groups can be upgraded to supergroups, for example when an admin turns on a feature that only supergroups have, such as topics. The upgrade creates a new chat with a new -100 ID, and the old ID stops working. If your code keeps sending to the old ID, Telegram answers:
{"ok":false,"error_code":400,"description":"Bad Request: group chat was upgraded to a supergroup chat","parameters":{"migrate_to_chat_id":-1001234567890}}
The new ID is in the error. The reference defines ResponseParameters.migrate_to_chat_id as "The group has been migrated to a supergroup with the specified identifier." A robust sender handles it once and updates its records:
async function send(chatId, text) {
const r = await api("sendMessage", { chat_id: chatId, text });
if (!r.ok && r.parameters?.migrate_to_chat_id) {
await db.updateChatId(chatId, r.parameters.migrate_to_chat_id);
return api("sendMessage", { chat_id: r.parameters.migrate_to_chat_id, text });
}
return r;
}
You can also catch it before it fails. The group's history gets a service message whose migrate_to_chat_id field means "The group has been migrated to a supergroup with the specified identifier", and the new supergroup's first message carries migrate_from_chat_id. If your update handler ignores service messages, you miss both, which is the usual reason this error keeps coming back. The supergroup upgrade reference page has the full list of causes.
Sending to a forum topic: message_thread_id
A supergroup with topics turned on is a forum. The Chat object marks it with is_forum. Messages in a forum belong to topics, and a sendMessage without a topic does not go where you meant it to.
To post into a topic, pass message_thread_id, defined as "Unique identifier for the target message thread (topic) of a forum":
curl -X POST "https://api.telegram.org/bot<TOKEN>/sendMessage" \
-d "chat_id=-1001234567890" \
-d "message_thread_id=42" \
-d "text=Build 1.4.2 is live"
Where to get the thread ID:
- From incoming messages. Each Message carries
message_thread_id("Unique identifier of a message thread or forum topic to which the message belongs") andis_topic_message, which is true when the message was sent to a topic. To reply in the same topic, copy the thread ID from the update you are answering. - From the topic you create.
createForumTopicreturns a ForumTopic object whosemessage_thread_idis the topic's ID. In a supergroup the bot must be an administrator with thecan_manage_topicsright to create topics.
Thread IDs are only unique inside one chat. Store them as a pair, (chat_id, message_thread_id), never on their own. When the target topic is closed or the bot's rights do not cover it, Telegram refuses the send with one of the rights errors in the next section.
Topics now also exist outside groups. The current reference describes message_thread_id on incoming messages as applying to "supergroups and private chats only", and the features page notes that private-chat topics "need to be enabled for the bot via" @BotFather. For group posting, though, the rule is the same: forum supergroup, plus message_thread_id.
Permission errors: the bot is in the chat but cannot post
Once the ID is right, the remaining failures come from what the bot is allowed to do. Each of these descriptions is literal, and each one points at a different setting.
| Description | What it means | Fix |
|---|---|---|
Bad Request: have no rights to send a message | The bot is a member, but admins restricted it, the group's default permissions block members from sending, or it is not a posting admin in a channel. | Promote the bot to admin, or relax the group's default permissions for members. |
Bad Request: not enough rights to send text messages to the chat | Members are allowed in the chat but not allowed to send this type of content. Variants name photos, documents, polls and so on. | Allow that content type for members, or make the bot an admin. |
Bad Request: CHAT_WRITE_FORBIDDEN | A server-level refusal to write to the chat at all, common in channels where the bot is not a posting admin. | Add the bot as a channel administrator with posting rights. |
Forbidden: bot is not a member of the channel chat | Channel ID is right, but the bot is not one of its administrators. | Add it under the channel's Administrators, not as a subscriber. |
Forbidden: bot can't initiate conversation with a user | You sent to a user ID, not a group, and that user never started the bot. | Check you used the group's negative ID. Bots cannot message users first. |
Bad Request: chat_id is empty | The parameter was missing or blank, often an unset environment variable in a scheduled job. | Log the value you send and check the variable is set in that environment. |
To check the bot's own status in a chat without guessing, call getChatMember with the chat ID and the bot's own user ID (from getMe). The returned status (creator, administrator, member, restricted, left or kicked) tells you which row of this table applies. The reference only guarantees the method for other users when the bot is an administrator, but asking about the bot itself is the common use.
"chat not found": the checklist that settles it
Bad Request: chat not found is the most common group-sending error, and its cause is almost always the ID itself. Work through these in order:
- Is it the ID from
chat.id, exactly as the Bot API gave it? No missing minus sign, no-100added or removed by hand, no spaces. - Is it the same bot? Chat IDs are global, but visibility is per bot. An ID your staging bot can use returns
chat not foundfor your production bot if the production bot was never added to that group. - Is the bot still in the group? Removal usually produces a
kicked403. Check the member list anyway. - Was it a basic group that has since been upgraded? If the stored ID has no
-100prefix and the group now has topics, it has migrated. Look formigrate_to_chat_id. - Did the ID go through a 32-bit field? A truncated supergroup ID is still a valid-looking number, but it points at no chat.
- Are you using a username for a private group?
@nameonly works for public supergroups and channels.
Libraries and home-automation integrations that wrap the Bot API usually surface the same description text in their logs, so the same checklist applies there too. The chat not found reference page has more detail on each cause, and the Telegram Bot API error codes guide covers the full set.
Sending a lot to one group: the 20-per-minute limit
Groups have their own sending limit. The Bots FAQ states that "In a group, bots are not be able to send more than 20 messages per minute." A bot that posts a burst of alerts, such as one per failed CI job, reaches that limit quickly and gets:
{"ok":false,"error_code":429,"description":"Too Many Requests: retry after 17","parameters":{"retry_after":17}}
Wait for parameters.retry_after seconds before you send to that chat again, and if you batch messages, send one combined message instead of twenty. The FAQ also gives about 30 messages per second as the free limit for broadcasting across many chats. Full details and the retry pattern are on the 429 reference page and the Telegram limits page.
One more rule surprises people who chain bots together: Telegram "decided that bots will not be able to see messages from other bots regardless of mode". If one bot posts to a group to trigger a second bot, the second bot never sees it. Connect the two through an API or a queue, not through the group.
Posting to Telegram without writing the sender
If what you need is a bot that answers people in a group or in private chats, rather than a script that pushes alerts, you can skip most of this. With Conferbot you create the bot in @BotFather, paste the token, design the conversation in the no-code chatbot builder and publish. The flow, AI replies and handover to a person are handled in the builder, so you do not maintain the chat ID bookkeeping above yourself.
Conferbot is one builder for every major chat platform, so the same flow can run on WhatsApp, Slack, Discord and a website widget. The Free plan is $0, needs no credit card and includes 600 conversations a month for two bots. See the Telegram chatbot page for setup.
Was this article helpful?
Build and deploy in 10 minutes. No coding needed.
Telegram Bot Can't Send Messages to a Group? Chat IDs, the -100 Prefix and Topics FAQ
Everything you need to know about chatbots for telegram bot can't send messages to a group? chat ids, the -100 prefix and topics.
About the Author
The Conferbot team writes about building, deploying, and improving AI chatbots.
View all articlesRelated Articles
From the reference shelf
Fact-checked reference pages and free tools for the platform this article covers.