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 ➡️
Authentication
This error code is related to Authentication
Error Code | Description |
100001 | No Authentication |
100099 | Authentication Error |
Permissions
This error code is related to Chat Admins.
Error Code | Description |
160017 | API does not have the right permission to perform the function. |
100011 | API is not an admin in the chat. |
Chat
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 (API) is not a member in the chat. |
Example
json{ "error": 199999 }
Whitelist
This error code is related to User Whitelist.
Error Code | Description |
500089 | Invalid whitelist pattern |
500090 | Whitelist pattern is not matching |
188889 | User is not whitelisted |
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 |
MENU
This error code is related to Menu.
Error Code | Description |
530000 | At least one menu must be provided in the request. |
530001 | Missing required menu parameter ( menu_ref or menu_id ). |
520002 | Missing required row parameter ( row_id ) |
530003 | Missing required cell parameter ( callback or cell_id ), or invalid parameter (form , type ). |
530004 | Missing required cell’s option parameter or cell’s value paramter (id or value ). |
Other
These error codes are related to other types of errors.
Error Code | Description |
199999 | Other errors,Syntax errors and/or Missing required parameters. The WebSocket has closed; the API needs to re-authenticate. |
199997 | No ID. The WebSocket has closed; the API needs to re-authenticate. |
199992 | Another instance of the same API is already running. Only one instance should be running. |
199990 | Operation is not permitted. |