Telegram errors
PEER_ID_INVALID, USERNAME_NOT_OCCUPIED and other not-found errors
Telegram cannot find, or cannot accept, the user, group or channel you pointed to.
Based only on Telegram's official documentation, checked on November 25, 2026.
The errors
- PEER_ID_INVALID400
“The provided peer id is invalid.”
Source: Error database (errors.json) - USERNAME_NOT_OCCUPIED400
“The provided username is not occupied.”
Source: contacts.resolveUsername - USERNAME_INVALID400
“The provided username is not valid.”
Source: contacts.resolveUsername - INPUT_USER_DEACTIVATED400
“The specified user was deleted.”
Source: messages.sendMessage - CHANNEL_INVALID400
“The provided channel is invalid.”
Source: messages.sendMessage - CHAT_ID_INVALID400
“The provided chat id is invalid.”
Source: messages.sendMessage - USER_ID_INVALID400
“The provided user ID is invalid.”
Source: channels.inviteToChannel
What it means
Code 400 (BAD_REQUEST): "The query contains errors." Telegram asks apps to tell the user that "the data must be corrected before the query is repeated".
Source: Error handlingUSERNAME_NOT_OCCUPIED: no account, group or channel uses this username. USERNAME_INVALID: the username itself is not valid.
Source: contacts.resolveUsernameINPUT_USER_DEACTIVATED: the person you are writing to deleted their account.
Source: messages.sendMessageWhat to do
- 1
Check the username or link: a typo returns USERNAME_INVALID, an unused name returns USERNAME_NOT_OCCUPIED.
Source: contacts.resolveUsername - 2
PEER_ID_INVALID, CHANNEL_INVALID, CHAT_ID_INVALID or USER_ID_INVALID: correct the reference before repeating the request.
Source: Error handling - 3
INPUT_USER_DEACTIVATED: the account no longer exists, so nothing can be sent to it.
Source: messages.sendMessage
Official sources
- Error handlingcore.telegram.org/api/errors
- Error database (errors.json)core.telegram.org/api/errors.json
- contacts.resolveUsernamecore.telegram.org/method/contacts.resolveUsername
- messages.sendMessagecore.telegram.org/method/messages.sendMessage
- channels.inviteToChannelcore.telegram.org/method/channels.inviteToChannel
Related errors
Spend less time on errors
TeleBoost shows each account's status and why a send failed, in plain words, across all your Telegram accounts.