Telegram Bot API · error code

Telegram error 400: Bad Request: unsupported parse_mode

ConfigurationHTTP 400400 Bad Request: identifiers, content and rights

Last verified against Telegram Bot API reference

What Telegram returns
Bad Request: unsupported parse_mode

What error 400 means

The parse_mode value is not one the Bot API recognizes. The formatting options section of the reference defines three modes: MarkdownV2, HTML, and the legacy Markdown, retained for backward compatibility. The server lowercases the value before comparing, so html and HTML both work, but any other spelling fails with this description before your text is examined.

Typical bad values are Markdown2, markdown_v2, MD, HTML5 or text, and library constants that resolve to an unexpected string. An empty value sends plain text, and the server source also accepts the word none; anything else, including a serialized null or undefined, lands here.

This is different from can't parse entities, which means the mode was accepted but the text contains markup that does not parse. Here the server stops at the mode name itself.

What it looks like

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

Why it happens

  • A misspelled mode such as Markdown2, markdown_v2 or MDV2.
  • A missing config value serialized as the literal string null or undefined.
  • A configuration value copied from another platform's formatting setting.
  • A library-wide default parse mode set once (for example in bot defaults) with a typo, so every send call fails, not just one.

How to fix Telegram error 400

  1. 1Use exactly MarkdownV2, HTML or Markdown.
  2. 2Omit parse_mode entirely for plain text instead of sending a placeholder value.
  3. 3Prefer your library's constants (for example ParseMode.HTML) over string literals.
  4. 4Log the outgoing parse_mode alongside the error to catch configuration drift.
  5. 5If you build formatting in code, skip parse_mode altogether and send an entities array (MessageEntity objects) with the plain text; the Bot API accepts entities instead of a parse mode and no escaping is needed.

How to stop it recurring

Validate parse_mode against the three documented values at startup and refuse to boot with anything else. Pick one mode across the codebase, ideally HTML or MarkdownV2 rather than legacy Markdown, and use the text formatter to check escaping for the mode you chose.

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?

The parse_mode value is not one the Bot API recognizes. The formatting options section of the reference defines three modes: MarkdownV2 , HTML , and the legacy Markdown , retained for backward compatibility. The server lowercases the value before comparing, so html and HTML both work, but any other spelling fails with this description before your text is examined.

How do I fix Telegram error 400?

1. Use exactly MarkdownV2 , HTML or Markdown . 2. Omit parse_mode entirely for plain text instead of sending a placeholder value. 3. Prefer your library's constants (for example ParseMode.HTML ) over string literals. 4. Log the outgoing parse_mode alongside the error to catch configuration drift. 5. If you build formatting in code, skip parse_mode altogether and send an entities array (MessageEntity objects) with the plain text; the Bot API accepts entities instead of a…

Stop debugging Telegram by hand

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