ERROR HANDLING

API Error Codes


Error codes are essential for figuring out what's wrong when a server and a bot talk to each other, and WebSocket APIs are no different. In this overview, we'll explain some of the most common errors you will encounter. This is how the error response is shown ➡️

Messages

This error code is related to Message & Media types.
Error Code
Description
500001
No message type
500003
No message
500004
Message is too long
500007
Attachment not found
500008
Invalid message type
500010
Caption is too long
500012
No reference
500013
No text message
500040
Sender is not a member

Example

json
{ "error": 199999 }

Blacklist

This error code is related to User Blacklist.
Error Code
Description
500089
Invalid blacklist pattern
500090
Blacklist pattern is not matching
188888
Blacklisted user

Whitelist

This error code is related to User Whitelist.
Error Code
Description
500089
Invalid whitelist pattern
500090
Blacklist pattern is not matching
188889
User is not whitelisted

No Privilege

This error code is related to Chat Admins.
Error Code
Description
160017
User has no privilege

Other

These error codes are related to other types of errors.
Error Code
Description
199999
Other errors
199997
No id
100099
Authentication Error
199992
Another instance of the same bot is already running. Only one instance should be running
199990
Operation not permitted

Powered by Notaku