Telegram error 400: Bad Request: wrong parameter action in request
Last verified against Telegram Bot API reference
Bad Request: wrong parameter action in requestWhat error 400 means
sendChatAction was called with an action value the server does not recognize, or with none at all. The reference lists the allowed values: typing, upload_photo, record_video, upload_video, record_voice, upload_voice, upload_document, choose_sticker, find_location, record_video_note and upload_video_note.
The server matches the value exactly. In the Bot API server source the comparison is case-sensitive, so Typing or TYPING fails even though parse_mode is case-insensitive. A few older names are still accepted for compatibility (the source maps record_audio and upload_audio to the voice actions and pick_up_location to find_location), but new code should use the documented names.
The chat and token are valid; the server rejected only this one parameter. Remember that a chat action is cosmetic and lasts five seconds or less, so many bots simply log this failure and continue rather than blocking the reply.
What it looks like
{"ok":false,"error_code":400,"description":"Bad Request: wrong parameter action in request"}Why it happens
- Capitalized values such as
Typingor an enum's display name. - Invented values like
uploading,record_audio_noteorsending. - The
actionparameter missing because of a typo in its name. - A library enum serialized as its numeric value rather than its string.
How to fix Telegram error 400
- 1Send one of the documented lowercase strings exactly.
- 2Check the request body to confirm the field is named
action. - 3Map your internal enum to the API strings explicitly.
- 4Do not let a failed chat action abort the real reply; log it and continue.
- 5For long tasks, resend the action about every 5 seconds: Telegram shows a chat action for at most 5 seconds, or until your bot sends the next message.
How to stop it recurring
Wrap sendChatAction in a helper that accepts only a fixed set of constants and swallows errors after logging, since the action is advisory. Choose the action that matches what the user will receive (upload_photo before a photo, typing before text) and send it only for operations that take noticeable time.
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?
sendChatAction was called with an action value the server does not recognize, or with none at all. The reference lists the allowed values: typing , upload_photo , record_video , upload_video , record_voice , upload_voice , upload_document , choose_sticker , find_location , record_video_note and upload_video_note . The server matches the value exactly.
How do I fix Telegram error 400?
1. Send one of the documented lowercase strings exactly. 2. Check the request body to confirm the field is named action . 3. Map your internal enum to the API strings explicitly. 4. Do not let a failed chat action abort the real reply; log it and continue. 5. For long tasks, resend the action about every 5 seconds: Telegram shows a chat action for at most 5 seconds, or until your bot sends the next message.
Stop debugging Telegram by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.