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 }
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 |
Other
These error codes are related to other types of errors.
Error Code | Description |
199999 | Other errors, and/or Syntax errors. 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. |