diff --git a/data/corefork.telegram.org/api/errors.html b/data/corefork.telegram.org/api/errors.html
index a7f8aeec7d..86cc14b2a0 100644
--- a/data/corefork.telegram.org/api/errors.html
+++ b/data/corefork.telegram.org/api/errors.html
@@ -45,6 +45,51 @@
Numerical value similar to HTTP status. Contains information on the type of error that occurred: for example, a data input error, privacy error, or server error. This is a required parameter.
Error Type
A string literal in the form of /[A-Z_0-9]+/
, which summarizes the problem. For example, AUTH_KEY_UNREGISTERED
. This is an optional parameter.
+Error Database
+A full machine-readable JSON list of RPC errors that can be returned by all methods in the API can be found here », what follows is a description of its fields:
+
+errors
- All error messages and codes for each method (object).
+- Keys: Error codes as strings (numeric strings)
+- Values: All error messages for each method (object)
+- Keys: Error messages (string)
+- Values: An array of methods which may emit this error (array of strings)
+
+
+
+
+descriptions
- Descriptions for every error mentioned in errors
(and a few other errors not related to a specific method)
+- Keys: Error messages
+- Values: Error descriptions
+
+
+user_only
- A list of methods that can only be used by users, not bots.
+
+Error messages and error descriptions may contain printf
placeholders in key positions, for now only %d
is used to map durations contained in error messages to error descriptions.
+Example:
+{
+ "errors": {
+ "420": {
+ "2FA_CONFIRM_WAIT_%d": [
+ "account.deleteAccount"
+ ],
+ "SLOWMODE_WAIT_%d": [
+ "messages.forwardMessages",
+ "messages.sendInlineBotResult",
+ "messages.sendMedia",
+ "messages.sendMessage",
+ "messages.sendMultiMedia"
+ ]
+ }
+ },
+ "descriptions": {
+ "2FA_CONFIRM_WAIT_%d": "Since this account is active and protected by a 2FA password, we will delete it in 1 week for security purposes. You can cancel this process at any time, you'll be able to reset your account in %d seconds.",
+ "SLOWMODE_WAIT_%d": "Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat.",
+ "FLOOD_WAIT_%d": "Please wait %d seconds before repeating the action."
+ },
+ "user_only": {
+ "account.deleteAccount"
+ }
+}
Error Constructors
There should be a way to handle errors that are returned in rpc_error constructors.
diff --git a/data/corefork.telegram.org/method/account.updatePasswordSettings b/data/corefork.telegram.org/method/account.updatePasswordSettings
index 6cfa5d8a4e..6892a150b9 100644
--- a/data/corefork.telegram.org/method/account.updatePasswordSettings
+++ b/data/corefork.telegram.org/method/account.updatePasswordSettings
@@ -93,7 +93,7 @@
400 |
EMAIL_UNCONFIRMED_%d |
-The provided email isn't confirmed, X is the length of the verification code that was just sent to the email: use account.verifyEmail to enter the received verification code and enable the recovery email. |
+The provided email isn't confirmed, %d is the length of the verification code that was just sent to the email: use account.verifyEmail to enter the received verification code and enable the recovery email. |
400 |
diff --git a/data/corefork.telegram.org/method/account.updateUsername b/data/corefork.telegram.org/method/account.updateUsername
index 94c247cbef..8fa2c04c5e 100644
--- a/data/corefork.telegram.org/method/account.updateUsername
+++ b/data/corefork.telegram.org/method/account.updateUsername
@@ -86,11 +86,6 @@
-401 |
-AUTH_KEY_PERM_EMPTY |
-The temporary auth key must be binded to the permanent auth key to use these methods. |
-
-
400 |
USERNAME_INVALID |
The provided username is not valid. |
diff --git a/data/corefork.telegram.org/method/auth.sendCode b/data/corefork.telegram.org/method/auth.sendCode
index bc76df7213..2476dac9ec 100644
--- a/data/corefork.telegram.org/method/auth.sendCode
+++ b/data/corefork.telegram.org/method/auth.sendCode
@@ -110,9 +110,9 @@
This API id was published somewhere, you can't use it now. |
-401 |
-AUTH_KEY_PERM_EMPTY |
-The temporary auth key must be binded to the permanent auth key to use these methods. |
+500 |
+AUTH_RESTART |
+Restart the authorization process. |
400 |
diff --git a/data/corefork.telegram.org/method/auth.signIn b/data/corefork.telegram.org/method/auth.signIn
index af3a9c31af..facff0196f 100644
--- a/data/corefork.telegram.org/method/auth.signIn
+++ b/data/corefork.telegram.org/method/auth.signIn
@@ -120,6 +120,11 @@
PHONE_NUMBER_UNOCCUPIED |
The phone number is not yet being used. |
+
+500 |
+SIGN_IN_FAILED |
+Failure while signing in. |
+
Query example
diff --git a/data/corefork.telegram.org/method/channels.editBanned b/data/corefork.telegram.org/method/channels.editBanned
index 9f3b883050..8658dbf412 100644
--- a/data/corefork.telegram.org/method/channels.editBanned
+++ b/data/corefork.telegram.org/method/channels.editBanned
@@ -102,11 +102,6 @@
400 |
-CHANNEL_ADD_INVALID |
-Internal error. |
-
-
-400 |
CHANNEL_INVALID |
The provided channel is invalid. |
diff --git a/data/corefork.telegram.org/method/channels.viewSponsoredMessage b/data/corefork.telegram.org/method/channels.viewSponsoredMessage
index bde027f342..43c171fa18 100644
--- a/data/corefork.telegram.org/method/channels.viewSponsoredMessage
+++ b/data/corefork.telegram.org/method/channels.viewSponsoredMessage
@@ -95,11 +95,6 @@
CHANNEL_INVALID |
The provided channel is invalid. |
-
-400 |
-UNKNOWN_ERROR |
-Internal error. |
-
Errors
diff --git a/data/corefork.telegram.org/method/contacts.resolveUsername b/data/corefork.telegram.org/method/contacts.resolveUsername
index 4962cc9ce5..8cdd9f311d 100644
--- a/data/corefork.telegram.org/method/contacts.resolveUsername
+++ b/data/corefork.telegram.org/method/contacts.resolveUsername
@@ -85,11 +85,6 @@
-401 |
-AUTH_KEY_PERM_EMPTY |
-The temporary auth key must be binded to the permanent auth key to use these methods. |
-
-
400 |
CONNECTION_LAYER_INVALID |
Layer invalid. |
diff --git a/data/corefork.telegram.org/method/help.getCdnConfig b/data/corefork.telegram.org/method/help.getCdnConfig
index 7bd0cb092b..23f7d27c34 100644
--- a/data/corefork.telegram.org/method/help.getCdnConfig
+++ b/data/corefork.telegram.org/method/help.getCdnConfig
@@ -59,23 +59,6 @@
This constructor does not require any parameters.
Result
CdnConfig
-Possible errors
-
-
-
-Code |
-Type |
-Description |
-
-
-
-
-401 |
-AUTH_KEY_PERM_EMPTY |
-The temporary auth key must be binded to the permanent auth key to use these methods. |
-
-
-
Bots can use this method
Related pages
diff --git a/data/corefork.telegram.org/method/help.getConfig b/data/corefork.telegram.org/method/help.getConfig
index bea74b0fa1..e391d012ff 100644
--- a/data/corefork.telegram.org/method/help.getConfig
+++ b/data/corefork.telegram.org/method/help.getConfig
@@ -91,11 +91,6 @@
400 |
-INPUT_LAYER_INVALID |
-The provided layer is invalid. |
-
-
-400 |
MSG_ID_INVALID |
Invalid message ID provided. |
diff --git a/data/corefork.telegram.org/method/invokeWithLayer.html b/data/corefork.telegram.org/method/invokeWithLayer.html
index ace6be7301..801055bed6 100644
--- a/data/corefork.telegram.org/method/invokeWithLayer.html
+++ b/data/corefork.telegram.org/method/invokeWithLayer.html
@@ -110,11 +110,6 @@
400 |
-INPUT_LAYER_INVALID |
-The provided layer is invalid. |
-
-
-400 |
INVITE_HASH_EXPIRED |
The invite link has expired. |
diff --git a/data/corefork.telegram.org/method/messages.createChat b/data/corefork.telegram.org/method/messages.createChat
index 900ccf0cf8..1b5ef7f8b6 100644
--- a/data/corefork.telegram.org/method/messages.createChat
+++ b/data/corefork.telegram.org/method/messages.createChat
@@ -96,6 +96,11 @@
+500 |
+CHAT_ID_GENERATE_FAILED |
+Failure while generating the chat ID. |
+
+
400 |
CHAT_INVALID |
Invalid chat. |
diff --git a/data/corefork.telegram.org/method/messages.forwardMessages b/data/corefork.telegram.org/method/messages.forwardMessages
index 3cc5de151b..38a0c3fe2e 100644
--- a/data/corefork.telegram.org/method/messages.forwardMessages
+++ b/data/corefork.telegram.org/method/messages.forwardMessages
@@ -256,6 +256,11 @@
|
+500 |
+RANDOM_ID_DUPLICATE |
+You provided a random ID that was already used. |
+
+
400 |
RANDOM_ID_INVALID |
A provided random ID is invalid. |
diff --git a/data/corefork.telegram.org/method/messages.getHistory b/data/corefork.telegram.org/method/messages.getHistory
index bdf413e405..0ca63ecbb4 100644
--- a/data/corefork.telegram.org/method/messages.getHistory
+++ b/data/corefork.telegram.org/method/messages.getHistory
@@ -123,11 +123,6 @@
-401 |
-AUTH_KEY_PERM_EMPTY |
-The temporary auth key must be binded to the permanent auth key to use these methods. |
-
-
400 |
CHANNEL_INVALID |
The provided channel is invalid. |
diff --git a/data/corefork.telegram.org/method/messages.sendInlineBotResult b/data/corefork.telegram.org/method/messages.sendInlineBotResult
index c61ad9ee2b..cdf8fcb850 100644
--- a/data/corefork.telegram.org/method/messages.sendInlineBotResult
+++ b/data/corefork.telegram.org/method/messages.sendInlineBotResult
@@ -226,6 +226,11 @@
The query ID is empty. |
+500 |
+RANDOM_ID_DUPLICATE |
+You provided a random ID that was already used. |
+
+
400 |
RESULT_ID_EMPTY |
Result ID empty. |
diff --git a/data/corefork.telegram.org/method/messages.sendMedia b/data/corefork.telegram.org/method/messages.sendMedia
index 79981f76e1..be87747d93 100644
--- a/data/corefork.telegram.org/method/messages.sendMedia
+++ b/data/corefork.telegram.org/method/messages.sendMedia
@@ -268,7 +268,7 @@
400 |
FILE_REFERENCE_EXPIRED |
-File reference expired, it must be refetched as described in https://core.telegram.org/api/file_reference. |
+File reference expired, it must be refetched as described in the documentation. |
400 |
@@ -381,6 +381,11 @@
Quizes can't have the multiple_choice flag set! |
+500 |
+RANDOM_ID_DUPLICATE |
+You provided a random ID that was already used. |
+
+
400 |
REPLY_MARKUP_BUY_EMPTY |
Reply markup for buy button empty. |
diff --git a/data/corefork.telegram.org/method/messages.sendMessage b/data/corefork.telegram.org/method/messages.sendMessage
index 5ec048a199..2d30d405eb 100644
--- a/data/corefork.telegram.org/method/messages.sendMessage
+++ b/data/corefork.telegram.org/method/messages.sendMessage
@@ -156,11 +156,6 @@
-401 |
-AUTH_KEY_PERM_EMPTY |
-The temporary auth key must be binded to the permanent auth key to use these methods. |
-
-
400 |
BOT_DOMAIN_INVALID |
Bot domain invalid. |
@@ -271,6 +266,11 @@
Invalid poll option provided. |
+500 |
+RANDOM_ID_DUPLICATE |
+You provided a random ID that was already used. |
+
+
400 |
REPLY_MARKUP_INVALID |
The provided reply markup is invalid. |
diff --git a/data/corefork.telegram.org/method/messages.sendMultiMedia b/data/corefork.telegram.org/method/messages.sendMultiMedia
index 892902fba7..edd80e3276 100644
--- a/data/corefork.telegram.org/method/messages.sendMultiMedia
+++ b/data/corefork.telegram.org/method/messages.sendMultiMedia
@@ -176,6 +176,11 @@
The provided peer id is invalid. |
+500 |
+RANDOM_ID_DUPLICATE |
+You provided a random ID that was already used. |
+
+
400 |
RANDOM_ID_EMPTY |
Random ID empty. |
diff --git a/data/corefork.telegram.org/method/messages.startBot b/data/corefork.telegram.org/method/messages.startBot
index a143599d35..ac801e4f07 100644
--- a/data/corefork.telegram.org/method/messages.startBot
+++ b/data/corefork.telegram.org/method/messages.startBot
@@ -131,6 +131,11 @@
The provided peer id is invalid. |
+500 |
+RANDOM_ID_DUPLICATE |
+You provided a random ID that was already used. |
+
+
400 |
START_PARAM_EMPTY |
The start parameter is empty. |
diff --git a/data/corefork.telegram.org/method/phone.acceptCall b/data/corefork.telegram.org/method/phone.acceptCall
index 0bae401dda..85b4718e83 100644
--- a/data/corefork.telegram.org/method/phone.acceptCall
+++ b/data/corefork.telegram.org/method/phone.acceptCall
@@ -105,6 +105,11 @@
The call was already declined. |
+500 |
+CALL_OCCUPY_FAILED |
+The call failed because the user is already making another call. |
+
+
400 |
CALL_PEER_INVALID |
The provided call peer object is invalid. |
diff --git a/data/corefork.telegram.org/method/phone.requestCall b/data/corefork.telegram.org/method/phone.requestCall
index 0a2e72f6ce..39499ed55e 100644
--- a/data/corefork.telegram.org/method/phone.requestCall
+++ b/data/corefork.telegram.org/method/phone.requestCall
@@ -120,6 +120,11 @@
The specified user was deleted. |
+500 |
+PARTICIPANT_CALL_FAILED |
+Failure while making call. |
+
+
400 |
PARTICIPANT_VERSION_OUTDATED |
The other participant does not use an up to date telegram client with support for calls. |
diff --git a/data/corefork.telegram.org/method/stickers.createStickerSet b/data/corefork.telegram.org/method/stickers.createStickerSet
index 9df8d89d6c..885d64ab64 100644
--- a/data/corefork.telegram.org/method/stickers.createStickerSet
+++ b/data/corefork.telegram.org/method/stickers.createStickerSet
@@ -157,11 +157,6 @@
400 |
-SHORTNAME_OCCUPY_FAILED |
-An internal error occurred. |
-
-
-400 |
STICKERS_EMPTY |
No sticker provided. |
diff --git a/data/corefork.telegram.org/method/updates.getChannelDifference b/data/corefork.telegram.org/method/updates.getChannelDifference
index 0ec1bb633e..af9da623a5 100644
--- a/data/corefork.telegram.org/method/updates.getChannelDifference
+++ b/data/corefork.telegram.org/method/updates.getChannelDifference
@@ -152,6 +152,11 @@
Persistent timestamp invalid. |
+500 |
+PERSISTENT_TIMESTAMP_OUTDATED |
+Channel internal replication issues, try again later (treat this like an RPC_CALL_FAIL). |
+
+
400 |
PINNED_DIALOGS_TOO_MUCH |
Too many pinned dialogs. |
diff --git a/data/corefork.telegram.org/method/updates.getDifference b/data/corefork.telegram.org/method/updates.getDifference
index 3a7a1fd633..193a715531 100644
--- a/data/corefork.telegram.org/method/updates.getDifference
+++ b/data/corefork.telegram.org/method/updates.getDifference
@@ -108,11 +108,6 @@
-401 |
-AUTH_KEY_PERM_EMPTY |
-The temporary auth key must be binded to the permanent auth key to use these methods. |
-
-
400 |
CDN_METHOD_INVALID |
You can't call this method in a CDN DC. |
diff --git a/data/corefork.telegram.org/method/upload.getFile b/data/corefork.telegram.org/method/upload.getFile
index 2893b9f00c..43399c5f71 100644
--- a/data/corefork.telegram.org/method/upload.getFile
+++ b/data/corefork.telegram.org/method/upload.getFile
@@ -111,11 +111,6 @@
-401 |
-AUTH_KEY_PERM_EMPTY |
-The temporary auth key must be binded to the permanent auth key to use these methods. |
-
-
400 |
CHANNEL_INVALID |
The provided channel is invalid. |
@@ -143,7 +138,7 @@
400 |
FILE_REFERENCE_EXPIRED |
-File reference expired, it must be refetched as described in https://core.telegram.org/api/file_reference. |
+File reference expired, it must be refetched as described in the documentation. |
400 |
diff --git a/data/corefork.telegram.org/method/users.getUsers b/data/corefork.telegram.org/method/users.getUsers
index 1cc9ab690c..4dc5bc8f28 100644
--- a/data/corefork.telegram.org/method/users.getUsers
+++ b/data/corefork.telegram.org/method/users.getUsers
@@ -84,11 +84,6 @@
-401 |
-AUTH_KEY_PERM_EMPTY |
-The temporary auth key must be binded to the permanent auth key to use these methods. |
-
-
400 |
CHANNEL_INVALID |
The provided channel is invalid. |
@@ -100,11 +95,6 @@
400 |
-INPUT_LAYER_INVALID |
-The provided layer is invalid. |
-
-
-400 |
MSG_ID_INVALID |
Invalid message ID provided. |