Telegram Bot API · error code

Telegram error 400: Bad Request: CHAT_WRITE_FORBIDDEN

ConfigurationHTTP 400400 Bad Request: identifiers, content and rights

Last verified against Telegram Bot API reference

What Telegram returns
Bad Request: CHAT_WRITE_FORBIDDEN

What error 400 means

An all-caps description in the Bot API is a Telegram server (MTProto) error surfacing through the Bot API layer with its original identifier. CHAT_WRITE_FORBIDDEN means the bot is not allowed to write to this chat at all. It overlaps with have no rights to send a message but tends to appear in channel contexts, in chats the bot was added to without any posting permission, and in some group states where the server rejects the write before Bot API-level checks produce the friendlier wording.

Because it is a raw server code, you may see it from methods other than sendMessage, such as sendPhoto, sendPoll, pinChatMessage or setMessageReaction. The meaning is the same: the write was forbidden by the chat's permission model.

It is not a block by a user and not a rate limit.

What it looks like

{"ok":false,"error_code":400,"description":"Bad Request: CHAT_WRITE_FORBIDDEN"}

Why it happens

  • The bot is a channel member (or subscriber) rather than an administrator with can_post_messages.
  • The bot was added to a group where members are not allowed to send anything.
  • A forum topic or channel comments section the bot cannot write into.
  • Writing into a chat via an ID that refers to a linked discussion group or channel the bot is not an admin of.

How to fix Telegram error 400

  1. 1Check the bot's membership with getChatMember and, for channels, promote it with posting rights.
  2. 2Confirm the chat_id refers to the chat you think it does; linked channels and discussion groups have different IDs.
  3. 3Remove and re-add the bot as an administrator if rights look correct but the error persists.
  4. 4Log this description alongside have no rights to send a message and handle them with the same 'needs admin' path.

How to stop it recurring

For channel bots, make 'administrator with post rights' a setup precondition and verify it before storing the channel ID. Keep one normalized internal error type for 'bot cannot write here' that maps from all three descriptions, so alerting and auto-pausing work regardless of which wording Telegram returns.

When the bot is missing from the channel entirely rather than present without rights, Telegram returns bot is not a member of the channel chat; after an explicit ban it returns bot was kicked. Mapping all of these to one internal 'cannot write here' state, as recommended above, keeps handling identical across the wordings.

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?

An all-caps description in the Bot API is a Telegram server (MTProto) error surfacing through the Bot API layer with its original identifier. CHAT_WRITE_FORBIDDEN means the bot is not allowed to write to this chat at all.

How do I fix Telegram error 400?

1. Check the bot's membership with getChatMember and, for channels, promote it with posting rights. 2. Confirm the chat_id refers to the chat you think it does; linked channels and discussion groups have different IDs. 3. Remove and re-add the bot as an administrator if rights look correct but the error persists. 4. Log this description alongside have no rights to send a message and handle them with the same 'needs admin' path.

Stop debugging Telegram by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.