This is a non-official list of actual errors you can encounter while developing your bot using the Telegram Bot API.
The meaning, explanations, codes and other stuff in these errors may change at any given time, so don't trust too much on this list and use your common sense.
If you want to contribute, ensure to include:
- The actual json output
- Optional textual description
- Whether there is interaction needed from the developer
- What method did create the error
This is the actual list that has been composed so far. Feel free to add more.
JSON | Human Description | Action needed? | Methods raising |
---|---|---|---|
Unauthorized | Bot token is incorrect | Correct your bot token and try again | any |
Bad Request: chat not found | The chat is unknown to the bot. | Double check the provided chat_id |
any |
Bad request: user not found | User_id is incorrect | Correct user_id | any |
Forbidden: user is deactivated | You're trying to perform an action on a user account that has been deactivated or deleted | Double check the user I | sendMessage |
Forbidden: bot was kicked | Bot was kicked | Delete chat_id on your side |
sendMessage |
Forbidden: bot blocked by user | The user have blocked the bot | any | |
Forbidden: bot can't send messages to bots | You tried to send a message to another bot. This is not possible | sendMessage | |
Too many requests | You are hitting the API limit, more information here | sendMessage | |
Bad request: Group migrated to supergroup | Occurs when a group chat has been converted/migrated to a supergroup | Check the provided chat_id and make sure the new Super Group ID is passed |
sendMessage |
Bad request: Invalid file id | The file id you are trying to retrieve doesn't exist | Try to call getFile before downloading | getFile |
Bad request: Message not modified | The current and new message text and reply markups are the same | Actually chanange the text or reply markup of the message to be edited | editMessageText |
Conflict: Terminated by other long poll | You have already set up a webhook and are trying to get the updates via getUpdates | Do not use getUpdates | getUpdates |
Bad request: Wrong parameter action in request | Occurs when the action property value is invalid |
Provide a valid value to the action property as specified in the documentation |
sendChatAction |
Bad Request: message text is empty | The message text is empty or not provided | Provide a valid message text | sendMessage, editMessageText |
Bad Request: message can't be edited | The message text cannot be edited | Check is message belong to chat or is message exist in chat | editMessageText |
Conflict: can't use getUpdates method while webhook is active; use deleteWebhook to delete the webhook first | You are trying to use getUpdates while a webhook is active | Use deleteWebhook to delete the webhook first | getUpdates |