Telegram Bot API · error code

Telegram error 400: Bad Request: can't remove chat owner

Permanent - do not retryHTTP 400400 Bad Request: identifiers, content and rights

Last verified against Telegram Bot API reference

What Telegram returns
Bad Request: can't remove chat owner

What error 400 means

A moderation or promotion call targeted the chat's owner (the creator). In TDLib, any change that would take the owner out of the owner role is rejected with this sentence: banning them, restricting them, or demoting them through promoteChatMember. No combination of bot rights allows it.

The owner is the account that created the group or channel, or received ownership by transfer, and appears with status creator in getChatMember and getChatAdministrators. Bot API administrators can manage other members within their rights, but the owner sits above that hierarchy.

Bots usually hit this by accident: an anti-spam rule matched a message from the owner, a "ban the replied user" command was used on an owner's post, or a bulk clean-up iterated over every member including the creator. The request is otherwise valid; it just picked an untouchable target.

What it looks like

{"ok":false,"error_code":400,"description":"Bad Request: can't remove chat owner"}

Why it happens

  • An automated rule tried to ban or mute the owner after flagging their message.
  • A reply-based moderation command was used on a message from the owner.
  • A bulk operation looped over all members without excluding the creator.
  • promoteChatMember with all rights false was aimed at the owner.

How to fix Telegram error 400

  1. 1Before moderating, call getChatMember and skip targets whose status is creator.
  2. 2Cache the admin list from getChatAdministrators and exclude it from automated actions.
  3. 3Return a friendly message to the moderator instead of the raw API error.

How to stop it recurring

Exempt the creator and all administrators from automated moderation by default. Refresh the cached admin list on chat_member updates so ownership transfers and new admins are picked up. Log the target's status alongside each action to make rule mistakes easy to spot.

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?

A moderation or promotion call targeted the chat's owner (the creator). In TDLib, any change that would take the owner out of the owner role is rejected with this sentence: banning them, restricting them, or demoting them through promoteChatMember . No combination of bot rights allows it.

How do I fix Telegram error 400?

1. Before moderating, call getChatMember and skip targets whose status is creator . 2. Cache the admin list from getChatAdministrators and exclude it from automated actions. 3. Return a friendly message to the moderator instead of the raw API error.

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.