diff --git a/README.md b/README.md index 7bb379bd7..83dd91257 100644 --- a/README.md +++ b/README.md @@ -148,19 +148,24 @@ You can find examples for nearly every MadelineProto function in ### Storing sessions -VERY IMPORTANT: An istance of MadelineProto MUST be serialized every time an update is fetched, and on shutdown. To serialize MadelineProto to a file, you must use the `\danog\MadelineProto\Serialization` class: +VERY IMPORTANT: An istance of MadelineProto MUST be serialized every time an update is fetched, and on shutdown. To serialize MadelineProto to a file, do the following: +When loading an already logged in session: ``` $MadelineProto = new \danog\MadelineProto\API('session.madeline'); -// Do stuff -\danog\MadelineProto\Serialization::serialize('session.madeline', $MadelineProto); -// or -$MadelineProto->serialize('session.madeline'); +$MadelineProto->serialize(); ``` -This way, if the scripts shutsdown normally (without ctrl+c or fatal errors/exceptions), the session will also be serialized automatically. +When loading a new session: +``` +$MadelineProto = new \danog\MadelineProto\API($settings); +$MadelineProto->session = 'session.madeline'; +$MadelineProto->serialize(); +``` -It is still recommended to serialize the session at every update. +If the scripts shutsdown normally (without ctrl+c or fatal errors/exceptions), the session will be serialized automatically. + +It is **strongly** recommended to serialize the session with `$MadelineProto->serialize()` after every `$MadelineProto->get_updates()`. ## Methods diff --git a/docs/API_docs/methods/account_changePhone.md b/docs/API_docs/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/docs/API_docs/methods/account_changePhone.md +++ b/docs/API_docs/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_checkUsername.md b/docs/API_docs/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/docs/API_docs/methods/account_checkUsername.md +++ b/docs/API_docs/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/docs/API_docs/methods/account_confirmPhone.md b/docs/API_docs/methods/account_confirmPhone.md index c2526b2ad..0d2dc5c64 100644 --- a/docs/API_docs/methods/account_confirmPhone.md +++ b/docs/API_docs/methods/account_confirmPhone.md @@ -19,6 +19,14 @@ description: account.confirmPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_HASH_INVALID|Code hash invalid| +|PHONE_CODE_EMPTY|phone_code is missing| + + ### Example: diff --git a/docs/API_docs/methods/account_getNotifySettings.md b/docs/API_docs/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/docs/API_docs/methods/account_getNotifySettings.md +++ b/docs/API_docs/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_getPasswordSettings.md b/docs/API_docs/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/docs/API_docs/methods/account_getPasswordSettings.md +++ b/docs/API_docs/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_getPrivacy.md b/docs/API_docs/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/docs/API_docs/methods/account_getPrivacy.md +++ b/docs/API_docs/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_getTmpPassword.md b/docs/API_docs/methods/account_getTmpPassword.md index c368baf7e..83ab09b16 100644 --- a/docs/API_docs/methods/account_getTmpPassword.md +++ b/docs/API_docs/methods/account_getTmpPassword.md @@ -19,6 +19,14 @@ description: account.getTmpPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| +|TMP_PASSWORD_DISABLED|The temporary password is disabled| + + ### Example: diff --git a/docs/API_docs/methods/account_registerDevice.md b/docs/API_docs/methods/account_registerDevice.md index 6865551ee..3cc7f98d4 100644 --- a/docs/API_docs/methods/account_registerDevice.md +++ b/docs/API_docs/methods/account_registerDevice.md @@ -19,6 +19,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_reportPeer.md b/docs/API_docs/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/docs/API_docs/methods/account_reportPeer.md +++ b/docs/API_docs/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_resetAuthorization.md b/docs/API_docs/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/docs/API_docs/methods/account_resetAuthorization.md +++ b/docs/API_docs/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_sendChangePhoneCode.md b/docs/API_docs/methods/account_sendChangePhoneCode.md index a1f49156d..4be218f24 100644 --- a/docs/API_docs/methods/account_sendChangePhoneCode.md +++ b/docs/API_docs/methods/account_sendChangePhoneCode.md @@ -20,6 +20,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_sendConfirmPhoneCode.md b/docs/API_docs/methods/account_sendConfirmPhoneCode.md index 5ad44987b..009fcb09b 100644 --- a/docs/API_docs/methods/account_sendConfirmPhoneCode.md +++ b/docs/API_docs/methods/account_sendConfirmPhoneCode.md @@ -20,6 +20,13 @@ description: account.sendConfirmPhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_setAccountTTL.md b/docs/API_docs/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/docs/API_docs/methods/account_setAccountTTL.md +++ b/docs/API_docs/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_setPrivacy.md b/docs/API_docs/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/docs/API_docs/methods/account_setPrivacy.md +++ b/docs/API_docs/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_unregisterDevice.md b/docs/API_docs/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/docs/API_docs/methods/account_unregisterDevice.md +++ b/docs/API_docs/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_updateNotifySettings.md b/docs/API_docs/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/docs/API_docs/methods/account_updateNotifySettings.md +++ b/docs/API_docs/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_updatePasswordSettings.md b/docs/API_docs/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/docs/API_docs/methods/account_updatePasswordSettings.md +++ b/docs/API_docs/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_updateProfile.md b/docs/API_docs/methods/account_updateProfile.md index 531bbb028..a50eaea58 100644 --- a/docs/API_docs/methods/account_updateProfile.md +++ b/docs/API_docs/methods/account_updateProfile.md @@ -20,6 +20,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/docs/API_docs/methods/account_updateStatus.md b/docs/API_docs/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/docs/API_docs/methods/account_updateStatus.md +++ b/docs/API_docs/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/docs/API_docs/methods/account_updateUsername.md b/docs/API_docs/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/docs/API_docs/methods/account_updateUsername.md +++ b/docs/API_docs/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/docs/API_docs/methods/auth_bindTempAuthKey.md b/docs/API_docs/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/docs/API_docs/methods/auth_bindTempAuthKey.md +++ b/docs/API_docs/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/docs/API_docs/methods/auth_cancelCode.md b/docs/API_docs/methods/auth_cancelCode.md index cc93fff5b..dc390329f 100644 --- a/docs/API_docs/methods/auth_cancelCode.md +++ b/docs/API_docs/methods/auth_cancelCode.md @@ -19,6 +19,13 @@ description: auth.cancelCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/docs/API_docs/methods/auth_checkPassword.md b/docs/API_docs/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/docs/API_docs/methods/auth_checkPassword.md +++ b/docs/API_docs/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/docs/API_docs/methods/auth_checkPhone.md b/docs/API_docs/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/docs/API_docs/methods/auth_checkPhone.md +++ b/docs/API_docs/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/docs/API_docs/methods/auth_exportAuthorization.md b/docs/API_docs/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/docs/API_docs/methods/auth_exportAuthorization.md +++ b/docs/API_docs/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/auth_importAuthorization.md b/docs/API_docs/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/docs/API_docs/methods/auth_importAuthorization.md +++ b/docs/API_docs/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/auth_recoverPassword.md b/docs/API_docs/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/docs/API_docs/methods/auth_recoverPassword.md +++ b/docs/API_docs/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/docs/API_docs/methods/auth_requestPasswordRecovery.md b/docs/API_docs/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/docs/API_docs/methods/auth_requestPasswordRecovery.md +++ b/docs/API_docs/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/docs/API_docs/methods/auth_resendCode.md b/docs/API_docs/methods/auth_resendCode.md index 92f7aa308..14d08ddd1 100644 --- a/docs/API_docs/methods/auth_resendCode.md +++ b/docs/API_docs/methods/auth_resendCode.md @@ -19,6 +19,13 @@ description: auth.resendCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/docs/API_docs/methods/auth_resetAuthorizations.md b/docs/API_docs/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/docs/API_docs/methods/auth_resetAuthorizations.md +++ b/docs/API_docs/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/docs/API_docs/methods/auth_sendInvites.md b/docs/API_docs/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/docs/API_docs/methods/auth_sendInvites.md +++ b/docs/API_docs/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/docs/API_docs/methods/bots_answerWebhookJSONQuery.md b/docs/API_docs/methods/bots_answerWebhookJSONQuery.md index 59c134d45..ae1efce3b 100644 --- a/docs/API_docs/methods/bots_answerWebhookJSONQuery.md +++ b/docs/API_docs/methods/bots_answerWebhookJSONQuery.md @@ -19,6 +19,14 @@ description: bots.answerWebhookJSONQuery parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/docs/API_docs/methods/bots_sendCustomRequest.md b/docs/API_docs/methods/bots_sendCustomRequest.md index 57a49e6e3..927f18c5a 100644 --- a/docs/API_docs/methods/bots_sendCustomRequest.md +++ b/docs/API_docs/methods/bots_sendCustomRequest.md @@ -19,6 +19,13 @@ description: bots.sendCustomRequest parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/docs/API_docs/methods/channels_checkUsername.md b/docs/API_docs/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/docs/API_docs/methods/channels_checkUsername.md +++ b/docs/API_docs/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/docs/API_docs/methods/channels_createChannel.md b/docs/API_docs/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/docs/API_docs/methods/channels_createChannel.md +++ b/docs/API_docs/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/docs/API_docs/methods/channels_deleteChannel.md b/docs/API_docs/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/docs/API_docs/methods/channels_deleteChannel.md +++ b/docs/API_docs/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/docs/API_docs/methods/channels_deleteMessages.md b/docs/API_docs/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/docs/API_docs/methods/channels_deleteMessages.md +++ b/docs/API_docs/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/docs/API_docs/methods/channels_deleteUserHistory.md b/docs/API_docs/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/docs/API_docs/methods/channels_deleteUserHistory.md +++ b/docs/API_docs/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/docs/API_docs/methods/channels_editAbout.md b/docs/API_docs/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/docs/API_docs/methods/channels_editAbout.md +++ b/docs/API_docs/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/docs/API_docs/methods/channels_editAdmin.md b/docs/API_docs/methods/channels_editAdmin.md index 242496ab1..e68ba7eaf 100644 --- a/docs/API_docs/methods/channels_editAdmin.md +++ b/docs/API_docs/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/docs/API_docs/methods/channels_editBanned.md b/docs/API_docs/methods/channels_editBanned.md index 7d3fc1d08..7fb904b9a 100644 --- a/docs/API_docs/methods/channels_editBanned.md +++ b/docs/API_docs/methods/channels_editBanned.md @@ -20,6 +20,17 @@ description: channels.editBanned parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ADMIN_INVALID|You're not an admin| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/channels_editPhoto.md b/docs/API_docs/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/docs/API_docs/methods/channels_editPhoto.md +++ b/docs/API_docs/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/docs/API_docs/methods/channels_editTitle.md b/docs/API_docs/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/docs/API_docs/methods/channels_editTitle.md +++ b/docs/API_docs/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/docs/API_docs/methods/channels_exportInvite.md b/docs/API_docs/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/docs/API_docs/methods/channels_exportInvite.md +++ b/docs/API_docs/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/docs/API_docs/methods/channels_exportMessageLink.md b/docs/API_docs/methods/channels_exportMessageLink.md index 9e7135ab8..9831c9c03 100644 --- a/docs/API_docs/methods/channels_exportMessageLink.md +++ b/docs/API_docs/methods/channels_exportMessageLink.md @@ -19,6 +19,13 @@ description: channels.exportMessageLink parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/docs/API_docs/methods/channels_getAdminLog.md b/docs/API_docs/methods/channels_getAdminLog.md index 4775c872a..5283563d4 100644 --- a/docs/API_docs/methods/channels_getAdminLog.md +++ b/docs/API_docs/methods/channels_getAdminLog.md @@ -24,6 +24,15 @@ description: channels.getAdminLog parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/docs/API_docs/methods/channels_getChannels.md b/docs/API_docs/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/docs/API_docs/methods/channels_getChannels.md +++ b/docs/API_docs/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/docs/API_docs/methods/channels_getMessages.md b/docs/API_docs/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/docs/API_docs/methods/channels_getMessages.md +++ b/docs/API_docs/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/docs/API_docs/methods/channels_getParticipant.md b/docs/API_docs/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/docs/API_docs/methods/channels_getParticipant.md +++ b/docs/API_docs/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/docs/API_docs/methods/channels_inviteToChannel.md b/docs/API_docs/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/docs/API_docs/methods/channels_inviteToChannel.md +++ b/docs/API_docs/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/docs/API_docs/methods/channels_joinChannel.md b/docs/API_docs/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/docs/API_docs/methods/channels_joinChannel.md +++ b/docs/API_docs/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/docs/API_docs/methods/channels_leaveChannel.md b/docs/API_docs/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/docs/API_docs/methods/channels_leaveChannel.md +++ b/docs/API_docs/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/docs/API_docs/methods/channels_readHistory.md b/docs/API_docs/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/docs/API_docs/methods/channels_readHistory.md +++ b/docs/API_docs/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/docs/API_docs/methods/channels_readMessageContents.md b/docs/API_docs/methods/channels_readMessageContents.md index ac9986161..902775934 100644 --- a/docs/API_docs/methods/channels_readMessageContents.md +++ b/docs/API_docs/methods/channels_readMessageContents.md @@ -19,6 +19,14 @@ description: channels.readMessageContents parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/docs/API_docs/methods/channels_reportSpam.md b/docs/API_docs/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/docs/API_docs/methods/channels_reportSpam.md +++ b/docs/API_docs/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/docs/API_docs/methods/channels_setStickers.md b/docs/API_docs/methods/channels_setStickers.md index ddc4d566e..6712ada06 100644 --- a/docs/API_docs/methods/channels_setStickers.md +++ b/docs/API_docs/methods/channels_setStickers.md @@ -19,6 +19,14 @@ description: channels.setStickers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PARTICIPANTS_TOO_FEW|Not enough participants| + + ### Example: diff --git a/docs/API_docs/methods/channels_toggleInvites.md b/docs/API_docs/methods/channels_toggleInvites.md index 0733d419f..c2715b323 100644 --- a/docs/API_docs/methods/channels_toggleInvites.md +++ b/docs/API_docs/methods/channels_toggleInvites.md @@ -19,6 +19,15 @@ description: channels.toggleInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/docs/API_docs/methods/channels_toggleSignatures.md b/docs/API_docs/methods/channels_toggleSignatures.md index 3056eaee8..a214b8493 100644 --- a/docs/API_docs/methods/channels_toggleSignatures.md +++ b/docs/API_docs/methods/channels_toggleSignatures.md @@ -19,6 +19,13 @@ description: channels.toggleSignatures parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/docs/API_docs/methods/channels_updatePinnedMessage.md b/docs/API_docs/methods/channels_updatePinnedMessage.md index d2314d851..7376df10a 100644 --- a/docs/API_docs/methods/channels_updatePinnedMessage.md +++ b/docs/API_docs/methods/channels_updatePinnedMessage.md @@ -20,6 +20,15 @@ description: channels.updatePinnedMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/docs/API_docs/methods/channels_updateUsername.md b/docs/API_docs/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/docs/API_docs/methods/channels_updateUsername.md +++ b/docs/API_docs/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/docs/API_docs/methods/contacts_block.md b/docs/API_docs/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/docs/API_docs/methods/contacts_block.md +++ b/docs/API_docs/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/contacts_deleteContact.md b/docs/API_docs/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/docs/API_docs/methods/contacts_deleteContact.md +++ b/docs/API_docs/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/contacts_deleteContacts.md b/docs/API_docs/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/docs/API_docs/methods/contacts_deleteContacts.md +++ b/docs/API_docs/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/docs/API_docs/methods/contacts_getTopPeers.md b/docs/API_docs/methods/contacts_getTopPeers.md index a1c85ce0e..cbd64cc04 100644 --- a/docs/API_docs/methods/contacts_getTopPeers.md +++ b/docs/API_docs/methods/contacts_getTopPeers.md @@ -26,6 +26,13 @@ description: contacts.getTopPeers parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TYPES_EMPTY|The types field is empty| + + ### Example: diff --git a/docs/API_docs/methods/contacts_importCard.md b/docs/API_docs/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/docs/API_docs/methods/contacts_importCard.md +++ b/docs/API_docs/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/docs/API_docs/methods/contacts_resetTopPeerRating.md b/docs/API_docs/methods/contacts_resetTopPeerRating.md index 2f7841892..738494b2e 100644 --- a/docs/API_docs/methods/contacts_resetTopPeerRating.md +++ b/docs/API_docs/methods/contacts_resetTopPeerRating.md @@ -19,6 +19,13 @@ description: contacts.resetTopPeerRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/contacts_search.md b/docs/API_docs/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/docs/API_docs/methods/contacts_search.md +++ b/docs/API_docs/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/docs/API_docs/methods/contacts_unblock.md b/docs/API_docs/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/docs/API_docs/methods/contacts_unblock.md +++ b/docs/API_docs/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/help_getCdnConfig.md b/docs/API_docs/methods/help_getCdnConfig.md index 82b9421e5..da446958d 100644 --- a/docs/API_docs/methods/help_getCdnConfig.md +++ b/docs/API_docs/methods/help_getCdnConfig.md @@ -13,6 +13,13 @@ description: help.getCdnConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/docs/API_docs/methods/help_getConfig.md b/docs/API_docs/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/docs/API_docs/methods/help_getConfig.md +++ b/docs/API_docs/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/docs/API_docs/methods/initConnection.md b/docs/API_docs/methods/initConnection.md index c34dd3d01..b66ab859e 100644 --- a/docs/API_docs/methods/initConnection.md +++ b/docs/API_docs/methods/initConnection.md @@ -25,6 +25,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/docs/API_docs/methods/invokeWithLayer.md b/docs/API_docs/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/docs/API_docs/methods/invokeWithLayer.md +++ b/docs/API_docs/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/docs/API_docs/methods/langpack_getDifference.md b/docs/API_docs/methods/langpack_getDifference.md index 422a3b558..2e77cc3b3 100644 --- a/docs/API_docs/methods/langpack_getDifference.md +++ b/docs/API_docs/methods/langpack_getDifference.md @@ -18,6 +18,13 @@ description: langpack.getDifference parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/docs/API_docs/methods/langpack_getLangPack.md b/docs/API_docs/methods/langpack_getLangPack.md index de1e01ed6..5d4d0b810 100644 --- a/docs/API_docs/methods/langpack_getLangPack.md +++ b/docs/API_docs/methods/langpack_getLangPack.md @@ -18,6 +18,13 @@ description: langpack.getLangPack parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/docs/API_docs/methods/langpack_getLanguages.md b/docs/API_docs/methods/langpack_getLanguages.md index 4fccd7075..abaa0de32 100644 --- a/docs/API_docs/methods/langpack_getLanguages.md +++ b/docs/API_docs/methods/langpack_getLanguages.md @@ -13,6 +13,13 @@ description: langpack.getLanguages parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/docs/API_docs/methods/langpack_getStrings.md b/docs/API_docs/methods/langpack_getStrings.md index fd1e05341..9bb740dcd 100644 --- a/docs/API_docs/methods/langpack_getStrings.md +++ b/docs/API_docs/methods/langpack_getStrings.md @@ -19,6 +19,13 @@ description: langpack.getStrings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_addChatUser.md b/docs/API_docs/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/docs/API_docs/methods/messages_addChatUser.md +++ b/docs/API_docs/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/docs/API_docs/methods/messages_checkChatInvite.md b/docs/API_docs/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/docs/API_docs/methods/messages_checkChatInvite.md +++ b/docs/API_docs/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_createChat.md b/docs/API_docs/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/docs/API_docs/methods/messages_createChat.md +++ b/docs/API_docs/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/docs/API_docs/methods/messages_deleteChatUser.md b/docs/API_docs/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/docs/API_docs/methods/messages_deleteChatUser.md +++ b/docs/API_docs/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/docs/API_docs/methods/messages_deleteHistory.md b/docs/API_docs/methods/messages_deleteHistory.md index fb9b77639..ce6ba6e70 100644 --- a/docs/API_docs/methods/messages_deleteHistory.md +++ b/docs/API_docs/methods/messages_deleteHistory.md @@ -20,6 +20,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_deleteMessages.md b/docs/API_docs/methods/messages_deleteMessages.md index 2949f64a4..2b88a73fc 100644 --- a/docs/API_docs/methods/messages_deleteMessages.md +++ b/docs/API_docs/methods/messages_deleteMessages.md @@ -19,6 +19,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/docs/API_docs/methods/messages_editChatAdmin.md b/docs/API_docs/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/docs/API_docs/methods/messages_editChatAdmin.md +++ b/docs/API_docs/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_editChatPhoto.md b/docs/API_docs/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/docs/API_docs/methods/messages_editChatPhoto.md +++ b/docs/API_docs/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_editChatTitle.md b/docs/API_docs/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/docs/API_docs/methods/messages_editChatTitle.md +++ b/docs/API_docs/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_editInlineBotMessage.md b/docs/API_docs/methods/messages_editInlineBotMessage.md index 083d4a61b..621c81a37 100644 --- a/docs/API_docs/methods/messages_editInlineBotMessage.md +++ b/docs/API_docs/methods/messages_editInlineBotMessage.md @@ -23,6 +23,14 @@ description: messages.editInlineBotMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| + + ### Example: diff --git a/docs/API_docs/methods/messages_editMessage.md b/docs/API_docs/methods/messages_editMessage.md index 2c3c57fa4..63b7e6902 100644 --- a/docs/API_docs/methods/messages_editMessage.md +++ b/docs/API_docs/methods/messages_editMessage.md @@ -26,6 +26,22 @@ description: messages.editMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/docs/API_docs/methods/messages_exportChatInvite.md b/docs/API_docs/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/docs/API_docs/methods/messages_exportChatInvite.md +++ b/docs/API_docs/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_faveSticker.md b/docs/API_docs/methods/messages_faveSticker.md index 161324a35..4ac9d019a 100644 --- a/docs/API_docs/methods/messages_faveSticker.md +++ b/docs/API_docs/methods/messages_faveSticker.md @@ -19,6 +19,13 @@ description: messages.faveSticker parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKER_ID_INVALID|The provided sticker ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_forwardMessage.md b/docs/API_docs/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/docs/API_docs/methods/messages_forwardMessage.md +++ b/docs/API_docs/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/docs/API_docs/methods/messages_forwardMessages.md b/docs/API_docs/methods/messages_forwardMessages.md index 8b91a2086..0f6492002 100644 --- a/docs/API_docs/methods/messages_forwardMessages.md +++ b/docs/API_docs/methods/messages_forwardMessages.md @@ -23,6 +23,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/docs/API_docs/methods/messages_getBotCallbackAnswer.md b/docs/API_docs/methods/messages_getBotCallbackAnswer.md index 9d9470d05..433144c3d 100644 --- a/docs/API_docs/methods/messages_getBotCallbackAnswer.md +++ b/docs/API_docs/methods/messages_getBotCallbackAnswer.md @@ -21,6 +21,16 @@ description: messages.getBotCallbackAnswer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/docs/API_docs/methods/messages_getChats.md b/docs/API_docs/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/docs/API_docs/methods/messages_getChats.md +++ b/docs/API_docs/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_getCommonChats.md b/docs/API_docs/methods/messages_getCommonChats.md index 985a52dff..0c601ca98 100644 --- a/docs/API_docs/methods/messages_getCommonChats.md +++ b/docs/API_docs/methods/messages_getCommonChats.md @@ -20,6 +20,13 @@ description: messages.getCommonChats parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_getDhConfig.md b/docs/API_docs/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/docs/API_docs/methods/messages_getDhConfig.md +++ b/docs/API_docs/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_getDialogs.md b/docs/API_docs/methods/messages_getDialogs.md index e38aa9965..131b75b7a 100644 --- a/docs/API_docs/methods/messages_getDialogs.md +++ b/docs/API_docs/methods/messages_getDialogs.md @@ -22,6 +22,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/docs/API_docs/methods/messages_getDocumentByHash.md b/docs/API_docs/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/docs/API_docs/methods/messages_getDocumentByHash.md +++ b/docs/API_docs/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_getGameHighScores.md b/docs/API_docs/methods/messages_getGameHighScores.md index d558df8a6..935bb95a7 100644 --- a/docs/API_docs/methods/messages_getGameHighScores.md +++ b/docs/API_docs/methods/messages_getGameHighScores.md @@ -20,6 +20,14 @@ description: messages.getGameHighScores parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/docs/API_docs/methods/messages_getHistory.md b/docs/API_docs/methods/messages_getHistory.md index 273eb6a91..a48a465eb 100644 --- a/docs/API_docs/methods/messages_getHistory.md +++ b/docs/API_docs/methods/messages_getHistory.md @@ -24,6 +24,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/docs/API_docs/methods/messages_getInlineBotResults.md b/docs/API_docs/methods/messages_getInlineBotResults.md index f5da1c5a0..61366580b 100644 --- a/docs/API_docs/methods/messages_getInlineBotResults.md +++ b/docs/API_docs/methods/messages_getInlineBotResults.md @@ -22,6 +22,16 @@ description: messages.getInlineBotResults parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INLINE_DISABLED|This bot can't be used in inline mode| +|BOT_INVALID|This is not a valid bot| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/docs/API_docs/methods/messages_getInlineGameHighScores.md b/docs/API_docs/methods/messages_getInlineGameHighScores.md index 24b512ca2..7cc04d0de 100644 --- a/docs/API_docs/methods/messages_getInlineGameHighScores.md +++ b/docs/API_docs/methods/messages_getInlineGameHighScores.md @@ -19,6 +19,14 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/docs/API_docs/methods/messages_getMessageEditData.md b/docs/API_docs/methods/messages_getMessageEditData.md index ee07fd74e..a8b135c67 100644 --- a/docs/API_docs/methods/messages_getMessageEditData.md +++ b/docs/API_docs/methods/messages_getMessageEditData.md @@ -19,6 +19,14 @@ description: messages.getMessageEditData parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/docs/API_docs/methods/messages_getMessagesViews.md b/docs/API_docs/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/docs/API_docs/methods/messages_getMessagesViews.md +++ b/docs/API_docs/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_getPeerDialogs.md b/docs/API_docs/methods/messages_getPeerDialogs.md index e388e309c..3da60038f 100644 --- a/docs/API_docs/methods/messages_getPeerDialogs.md +++ b/docs/API_docs/methods/messages_getPeerDialogs.md @@ -18,6 +18,14 @@ description: messages.getPeerDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_getPeerSettings.md b/docs/API_docs/methods/messages_getPeerSettings.md index 26776c43b..d3e3cfc39 100644 --- a/docs/API_docs/methods/messages_getPeerSettings.md +++ b/docs/API_docs/methods/messages_getPeerSettings.md @@ -18,6 +18,14 @@ description: messages.getPeerSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_getStickerSet.md b/docs/API_docs/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/docs/API_docs/methods/messages_getStickerSet.md +++ b/docs/API_docs/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_getUnreadMentions.md b/docs/API_docs/methods/messages_getUnreadMentions.md index fadbca813..54e8cabf4 100644 --- a/docs/API_docs/methods/messages_getUnreadMentions.md +++ b/docs/API_docs/methods/messages_getUnreadMentions.md @@ -23,6 +23,13 @@ description: messages.getUnreadMentions parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_getWebPage.md b/docs/API_docs/methods/messages_getWebPage.md index 81591daf5..35f6e5456 100644 --- a/docs/API_docs/methods/messages_getWebPage.md +++ b/docs/API_docs/methods/messages_getWebPage.md @@ -19,6 +19,13 @@ description: messages.getWebPage parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|WC_CONVERT_URL_INVALID|WC convert URL invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_hideReportSpam.md b/docs/API_docs/methods/messages_hideReportSpam.md index 20bc6f186..2dfe4dd7a 100644 --- a/docs/API_docs/methods/messages_hideReportSpam.md +++ b/docs/API_docs/methods/messages_hideReportSpam.md @@ -18,6 +18,13 @@ description: messages.hideReportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_importChatInvite.md b/docs/API_docs/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/docs/API_docs/methods/messages_importChatInvite.md +++ b/docs/API_docs/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/docs/API_docs/methods/messages_installStickerSet.md b/docs/API_docs/methods/messages_installStickerSet.md index 6073eb13b..3dde52a75 100644 --- a/docs/API_docs/methods/messages_installStickerSet.md +++ b/docs/API_docs/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_migrateChat.md b/docs/API_docs/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/docs/API_docs/methods/messages_migrateChat.md +++ b/docs/API_docs/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/docs/API_docs/methods/messages_readEncryptedHistory.md b/docs/API_docs/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/docs/API_docs/methods/messages_readEncryptedHistory.md +++ b/docs/API_docs/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/docs/API_docs/methods/messages_readHistory.md b/docs/API_docs/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/docs/API_docs/methods/messages_readHistory.md +++ b/docs/API_docs/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_receivedQueue.md b/docs/API_docs/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/docs/API_docs/methods/messages_receivedQueue.md +++ b/docs/API_docs/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/docs/API_docs/methods/messages_reorderPinnedDialogs.md b/docs/API_docs/methods/messages_reorderPinnedDialogs.md index 2660b3633..30102fd7a 100644 --- a/docs/API_docs/methods/messages_reorderPinnedDialogs.md +++ b/docs/API_docs/methods/messages_reorderPinnedDialogs.md @@ -19,6 +19,13 @@ description: messages.reorderPinnedDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_reportEncryptedSpam.md b/docs/API_docs/methods/messages_reportEncryptedSpam.md index 5764b8486..30ef34732 100644 --- a/docs/API_docs/methods/messages_reportEncryptedSpam.md +++ b/docs/API_docs/methods/messages_reportEncryptedSpam.md @@ -18,6 +18,13 @@ description: messages.reportEncryptedSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_reportSpam.md b/docs/API_docs/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/docs/API_docs/methods/messages_reportSpam.md +++ b/docs/API_docs/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_saveDraft.md b/docs/API_docs/methods/messages_saveDraft.md index ef5e65c57..42308b46f 100644 --- a/docs/API_docs/methods/messages_saveDraft.md +++ b/docs/API_docs/methods/messages_saveDraft.md @@ -23,6 +23,13 @@ description: messages.saveDraft parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_saveGif.md b/docs/API_docs/methods/messages_saveGif.md index 2d41d5338..31e486320 100644 --- a/docs/API_docs/methods/messages_saveGif.md +++ b/docs/API_docs/methods/messages_saveGif.md @@ -19,6 +19,13 @@ description: messages.saveGif parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|GIF_ID_INVALID|The provided GIF ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_saveRecentSticker.md b/docs/API_docs/methods/messages_saveRecentSticker.md index cb4f98b35..8d45be5ef 100644 --- a/docs/API_docs/methods/messages_saveRecentSticker.md +++ b/docs/API_docs/methods/messages_saveRecentSticker.md @@ -20,6 +20,13 @@ description: messages.saveRecentSticker parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKER_ID_INVALID|The provided sticker ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_search.md b/docs/API_docs/methods/messages_search.md index 0d9521934..ca82742c0 100644 --- a/docs/API_docs/methods/messages_search.md +++ b/docs/API_docs/methods/messages_search.md @@ -28,6 +28,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_searchGifs.md b/docs/API_docs/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/docs/API_docs/methods/messages_searchGifs.md +++ b/docs/API_docs/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/docs/API_docs/methods/messages_searchGlobal.md b/docs/API_docs/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/docs/API_docs/methods/messages_searchGlobal.md +++ b/docs/API_docs/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/docs/API_docs/methods/messages_sendEncrypted.md b/docs/API_docs/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/docs/API_docs/methods/messages_sendEncrypted.md +++ b/docs/API_docs/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/docs/API_docs/methods/messages_sendEncryptedFile.md b/docs/API_docs/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/docs/API_docs/methods/messages_sendEncryptedFile.md +++ b/docs/API_docs/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/docs/API_docs/methods/messages_sendEncryptedService.md b/docs/API_docs/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/docs/API_docs/methods/messages_sendEncryptedService.md +++ b/docs/API_docs/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/docs/API_docs/methods/messages_sendInlineBotResult.md b/docs/API_docs/methods/messages_sendInlineBotResult.md index 6ab41f500..6aeeb67d5 100644 --- a/docs/API_docs/methods/messages_sendInlineBotResult.md +++ b/docs/API_docs/methods/messages_sendInlineBotResult.md @@ -24,6 +24,16 @@ description: messages.sendInlineBotResult parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INLINE_RESULT_EXPIRED|The inline query expired| +|PEER_ID_INVALID|The provided peer id is invalid| +|QUERY_ID_EMPTY|The query ID is empty| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/docs/API_docs/methods/messages_sendMedia.md b/docs/API_docs/methods/messages_sendMedia.md index 68e2c41be..8c22e1c9f 100644 --- a/docs/API_docs/methods/messages_sendMedia.md +++ b/docs/API_docs/methods/messages_sendMedia.md @@ -24,6 +24,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/docs/API_docs/methods/messages_sendMessage.md b/docs/API_docs/methods/messages_sendMessage.md index cabccdb33..60b50412f 100644 --- a/docs/API_docs/methods/messages_sendMessage.md +++ b/docs/API_docs/methods/messages_sendMessage.md @@ -27,6 +27,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/docs/API_docs/methods/messages_sendScreenshotNotification.md b/docs/API_docs/methods/messages_sendScreenshotNotification.md index 7c8957389..a725a12bb 100644 --- a/docs/API_docs/methods/messages_sendScreenshotNotification.md +++ b/docs/API_docs/methods/messages_sendScreenshotNotification.md @@ -19,6 +19,13 @@ description: messages.sendScreenshotNotification parameters, return type and exa ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_setBotCallbackAnswer.md b/docs/API_docs/methods/messages_setBotCallbackAnswer.md index ef9b8f7a8..2c51854ff 100644 --- a/docs/API_docs/methods/messages_setBotCallbackAnswer.md +++ b/docs/API_docs/methods/messages_setBotCallbackAnswer.md @@ -22,6 +22,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_setBotPrecheckoutResults.md b/docs/API_docs/methods/messages_setBotPrecheckoutResults.md index 92bdcb9e4..25ed5ed5e 100644 --- a/docs/API_docs/methods/messages_setBotPrecheckoutResults.md +++ b/docs/API_docs/methods/messages_setBotPrecheckoutResults.md @@ -20,6 +20,13 @@ description: messages.setBotPrecheckoutResults parameters, return type and examp ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ERROR_TEXT_EMPTY|The provided error message is empty| + + ### Example: diff --git a/docs/API_docs/methods/messages_setBotShippingResults.md b/docs/API_docs/methods/messages_setBotShippingResults.md index e2c7cd45b..49ac28967 100644 --- a/docs/API_docs/methods/messages_setBotShippingResults.md +++ b/docs/API_docs/methods/messages_setBotShippingResults.md @@ -20,6 +20,13 @@ description: messages.setBotShippingResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_setEncryptedTyping.md b/docs/API_docs/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/docs/API_docs/methods/messages_setEncryptedTyping.md +++ b/docs/API_docs/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_setGameScore.md b/docs/API_docs/methods/messages_setGameScore.md index f16a7539c..3137f7c91 100644 --- a/docs/API_docs/methods/messages_setGameScore.md +++ b/docs/API_docs/methods/messages_setGameScore.md @@ -23,6 +23,14 @@ description: messages.setGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/docs/API_docs/methods/messages_setInlineBotResults.md b/docs/API_docs/methods/messages_setInlineBotResults.md index cf74e5e4b..8b5625f34 100644 --- a/docs/API_docs/methods/messages_setInlineBotResults.md +++ b/docs/API_docs/methods/messages_setInlineBotResults.md @@ -24,6 +24,23 @@ description: messages.setInlineBotResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ARTICLE_TITLE_EMPTY|The title of the article is empty| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|MESSAGE_EMPTY|The provided message is empty| +|QUERY_ID_INVALID|The query ID is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|RESULT_TYPE_INVALID|Result type invalid| +|SEND_MESSAGE_TYPE_INVALID|The message type is invalid| +|START_PARAM_INVALID|Start parameter invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/docs/API_docs/methods/messages_setInlineGameScore.md b/docs/API_docs/methods/messages_setInlineGameScore.md index c922f937b..36752f351 100644 --- a/docs/API_docs/methods/messages_setInlineGameScore.md +++ b/docs/API_docs/methods/messages_setInlineGameScore.md @@ -22,6 +22,14 @@ description: messages.setInlineGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/docs/API_docs/methods/messages_setTyping.md b/docs/API_docs/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/docs/API_docs/methods/messages_setTyping.md +++ b/docs/API_docs/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/docs/API_docs/methods/messages_startBot.md b/docs/API_docs/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/docs/API_docs/methods/messages_startBot.md +++ b/docs/API_docs/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_toggleChatAdmins.md b/docs/API_docs/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/docs/API_docs/methods/messages_toggleChatAdmins.md +++ b/docs/API_docs/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/docs/API_docs/methods/messages_toggleDialogPin.md b/docs/API_docs/methods/messages_toggleDialogPin.md index f4506918c..f35f2f401 100644 --- a/docs/API_docs/methods/messages_toggleDialogPin.md +++ b/docs/API_docs/methods/messages_toggleDialogPin.md @@ -19,6 +19,13 @@ description: messages.toggleDialogPin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_uninstallStickerSet.md b/docs/API_docs/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/docs/API_docs/methods/messages_uninstallStickerSet.md +++ b/docs/API_docs/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/docs/API_docs/methods/messages_uploadMedia.md b/docs/API_docs/methods/messages_uploadMedia.md index 64fd8372b..03f07c26e 100644 --- a/docs/API_docs/methods/messages_uploadMedia.md +++ b/docs/API_docs/methods/messages_uploadMedia.md @@ -19,6 +19,15 @@ description: messages.uploadMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|MEDIA_INVALID|Media invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/payments_getPaymentForm.md b/docs/API_docs/methods/payments_getPaymentForm.md index fa82f22d6..15f6e26b9 100644 --- a/docs/API_docs/methods/payments_getPaymentForm.md +++ b/docs/API_docs/methods/payments_getPaymentForm.md @@ -18,6 +18,13 @@ description: payments.getPaymentForm parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/payments_getPaymentReceipt.md b/docs/API_docs/methods/payments_getPaymentReceipt.md index d6b5f5d62..51433563a 100644 --- a/docs/API_docs/methods/payments_getPaymentReceipt.md +++ b/docs/API_docs/methods/payments_getPaymentReceipt.md @@ -18,6 +18,13 @@ description: payments.getPaymentReceipt parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/payments_sendPaymentForm.md b/docs/API_docs/methods/payments_sendPaymentForm.md index 831516a32..a63a39805 100644 --- a/docs/API_docs/methods/payments_sendPaymentForm.md +++ b/docs/API_docs/methods/payments_sendPaymentForm.md @@ -21,6 +21,13 @@ description: payments.sendPaymentForm parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/payments_validateRequestedInfo.md b/docs/API_docs/methods/payments_validateRequestedInfo.md index 4102a4739..d839a2dfd 100644 --- a/docs/API_docs/methods/payments_validateRequestedInfo.md +++ b/docs/API_docs/methods/payments_validateRequestedInfo.md @@ -20,6 +20,13 @@ description: payments.validateRequestedInfo parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/docs/API_docs/methods/phone_receivedCall.md b/docs/API_docs/methods/phone_receivedCall.md index b06a90adc..9d59b1eae 100644 --- a/docs/API_docs/methods/phone_receivedCall.md +++ b/docs/API_docs/methods/phone_receivedCall.md @@ -18,6 +18,14 @@ description: phone.receivedCall parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_ALREADY_DECLINED|The call was already declined| +|CALL_PEER_INVALID|The provided call peer object is invalid| + + ### Example: diff --git a/docs/API_docs/methods/phone_saveCallDebug.md b/docs/API_docs/methods/phone_saveCallDebug.md index 589dc522e..4dee5c971 100644 --- a/docs/API_docs/methods/phone_saveCallDebug.md +++ b/docs/API_docs/methods/phone_saveCallDebug.md @@ -19,6 +19,14 @@ description: phone.saveCallDebug parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_PEER_INVALID|The provided call peer object is invalid| +|DATA_JSON_INVALID|The provided JSON data is invalid| + + ### Example: diff --git a/docs/API_docs/methods/phone_setCallRating.md b/docs/API_docs/methods/phone_setCallRating.md index a2b2e27cd..fea236d10 100644 --- a/docs/API_docs/methods/phone_setCallRating.md +++ b/docs/API_docs/methods/phone_setCallRating.md @@ -20,6 +20,13 @@ description: phone.setCallRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_PEER_INVALID|The provided call peer object is invalid| + + ### Example: diff --git a/docs/API_docs/methods/photos_getUserPhotos.md b/docs/API_docs/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/docs/API_docs/methods/photos_getUserPhotos.md +++ b/docs/API_docs/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/photos_uploadProfilePhoto.md b/docs/API_docs/methods/photos_uploadProfilePhoto.md index 6de32dae0..58541f235 100644 --- a/docs/API_docs/methods/photos_uploadProfilePhoto.md +++ b/docs/API_docs/methods/photos_uploadProfilePhoto.md @@ -18,6 +18,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/docs/API_docs/methods/stickers_addStickerToSet.md b/docs/API_docs/methods/stickers_addStickerToSet.md index 620e773ae..bf62fa090 100644 --- a/docs/API_docs/methods/stickers_addStickerToSet.md +++ b/docs/API_docs/methods/stickers_addStickerToSet.md @@ -19,6 +19,14 @@ description: stickers.addStickerToSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/docs/API_docs/methods/stickers_changeStickerPosition.md b/docs/API_docs/methods/stickers_changeStickerPosition.md index 6b517d4c2..942d3a33e 100644 --- a/docs/API_docs/methods/stickers_changeStickerPosition.md +++ b/docs/API_docs/methods/stickers_changeStickerPosition.md @@ -19,6 +19,14 @@ description: stickers.changeStickerPosition parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|STICKER_INVALID|The provided sticker is invalid| + + ### Example: diff --git a/docs/API_docs/methods/stickers_createStickerSet.md b/docs/API_docs/methods/stickers_createStickerSet.md index cacdd73a7..02ec673bd 100644 --- a/docs/API_docs/methods/stickers_createStickerSet.md +++ b/docs/API_docs/methods/stickers_createStickerSet.md @@ -22,6 +22,17 @@ description: stickers.createStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|PACK_SHORT_NAME_INVALID|Short pack name invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|STICKERS_EMPTY|No sticker provided| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/docs/API_docs/methods/stickers_removeStickerFromSet.md b/docs/API_docs/methods/stickers_removeStickerFromSet.md index 941b24f40..51e52f958 100644 --- a/docs/API_docs/methods/stickers_removeStickerFromSet.md +++ b/docs/API_docs/methods/stickers_removeStickerFromSet.md @@ -18,6 +18,14 @@ description: stickers.removeStickerFromSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|STICKER_INVALID|The provided sticker is invalid| + + ### Example: diff --git a/docs/API_docs/methods/upload_getWebFile.md b/docs/API_docs/methods/upload_getWebFile.md index fab17a7fc..ec7c05b4a 100644 --- a/docs/API_docs/methods/upload_getWebFile.md +++ b/docs/API_docs/methods/upload_getWebFile.md @@ -20,6 +20,13 @@ description: upload.getWebFile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LOCATION_INVALID|The provided location is invalid| + + ### Example: diff --git a/docs/API_docs/methods/users_getUsers.md b/docs/API_docs/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/docs/API_docs/methods/users_getUsers.md +++ b/docs/API_docs/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/docs/index.md b/docs/index.md index 7c1d2c6dc..9e02f855c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -152,19 +152,24 @@ You can find examples for nearly every MadelineProto function in ### Storing sessions -VERY IMPORTANT: An istance of MadelineProto MUST be serialized every time an update is fetched, and on shutdown. To serialize MadelineProto to a file, you must use the `\danog\MadelineProto\Serialization` class: +VERY IMPORTANT: An istance of MadelineProto MUST be serialized every time an update is fetched, and on shutdown. To serialize MadelineProto to a file, do the following: +When loading an already logged in session: ``` $MadelineProto = new \danog\MadelineProto\API('session.madeline'); -// Do stuff -\danog\MadelineProto\Serialization::serialize('session.madeline', $MadelineProto); -// or -$MadelineProto->serialize('session.madeline'); +$MadelineProto->serialize(); ``` -This way, if the scripts shutsdown normally (without ctrl+c or fatal errors/exceptions), the session will also be serialized automatically. +When loading a new session: +``` +$MadelineProto = new \danog\MadelineProto\API($settings); +$MadelineProto->session = 'session.madeline'; +$MadelineProto->serialize(); +``` -It is still recommended to serialize the session at every update. +If the scripts shutsdown normally (without ctrl+c or fatal errors/exceptions), the session will be serialized automatically. + +It is **strongly** recommended to serialize the session with `$MadelineProto->serialize()` after every `$MadelineProto->get_updates()`. ## Methods diff --git a/old_docs/API_docs_v18/methods/account_checkUsername.md b/old_docs/API_docs_v18/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v18/methods/account_checkUsername.md +++ b/old_docs/API_docs_v18/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/account_getNotifySettings.md b/old_docs/API_docs_v18/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v18/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v18/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/account_registerDevice.md b/old_docs/API_docs_v18/methods/account_registerDevice.md index 58e9988f1..ab7ec933f 100644 --- a/old_docs/API_docs_v18/methods/account_registerDevice.md +++ b/old_docs/API_docs_v18/methods/account_registerDevice.md @@ -24,6 +24,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/account_unregisterDevice.md b/old_docs/API_docs_v18/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v18/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v18/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/account_updateNotifySettings.md b/old_docs/API_docs_v18/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v18/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v18/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/account_updateProfile.md b/old_docs/API_docs_v18/methods/account_updateProfile.md index af2c8f572..c87120746 100644 --- a/old_docs/API_docs_v18/methods/account_updateProfile.md +++ b/old_docs/API_docs_v18/methods/account_updateProfile.md @@ -19,6 +19,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/account_updateStatus.md b/old_docs/API_docs_v18/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v18/methods/account_updateStatus.md +++ b/old_docs/API_docs_v18/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/account_updateUsername.md b/old_docs/API_docs_v18/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v18/methods/account_updateUsername.md +++ b/old_docs/API_docs_v18/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v18/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v18/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v18/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/auth_checkPhone.md b/old_docs/API_docs_v18/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v18/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v18/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/auth_exportAuthorization.md b/old_docs/API_docs_v18/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v18/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v18/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/auth_importAuthorization.md b/old_docs/API_docs_v18/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v18/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v18/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v18/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v18/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v18/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/auth_sendInvites.md b/old_docs/API_docs_v18/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v18/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v18/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/contacts_block.md b/old_docs/API_docs_v18/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v18/methods/contacts_block.md +++ b/old_docs/API_docs_v18/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/contacts_deleteContact.md b/old_docs/API_docs_v18/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v18/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v18/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/contacts_deleteContacts.md b/old_docs/API_docs_v18/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v18/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v18/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/contacts_importCard.md b/old_docs/API_docs_v18/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v18/methods/contacts_importCard.md +++ b/old_docs/API_docs_v18/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/contacts_search.md b/old_docs/API_docs_v18/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v18/methods/contacts_search.md +++ b/old_docs/API_docs_v18/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/contacts_unblock.md b/old_docs/API_docs_v18/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v18/methods/contacts_unblock.md +++ b/old_docs/API_docs_v18/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/help_getConfig.md b/old_docs/API_docs_v18/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v18/methods/help_getConfig.md +++ b/old_docs/API_docs_v18/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/initConnection.md b/old_docs/API_docs_v18/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v18/methods/initConnection.md +++ b/old_docs/API_docs_v18/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_addChatUser.md b/old_docs/API_docs_v18/methods/messages_addChatUser.md index 134599e57..6b3051fa0 100644 --- a/old_docs/API_docs_v18/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v18/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_createChat.md b/old_docs/API_docs_v18/methods/messages_createChat.md index e43d8017f..ce47d105c 100644 --- a/old_docs/API_docs_v18/methods/messages_createChat.md +++ b/old_docs/API_docs_v18/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_deleteChatUser.md b/old_docs/API_docs_v18/methods/messages_deleteChatUser.md index d3a735fb2..83eae12f0 100644 --- a/old_docs/API_docs_v18/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v18/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_deleteHistory.md b/old_docs/API_docs_v18/methods/messages_deleteHistory.md index 780451077..b7a9417d0 100644 --- a/old_docs/API_docs_v18/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v18/methods/messages_deleteHistory.md @@ -19,6 +19,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_deleteMessages.md b/old_docs/API_docs_v18/methods/messages_deleteMessages.md index e29549d54..ae8ed6b10 100644 --- a/old_docs/API_docs_v18/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v18/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_editChatPhoto.md b/old_docs/API_docs_v18/methods/messages_editChatPhoto.md index 9b1254a2d..1928f1cf3 100644 --- a/old_docs/API_docs_v18/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v18/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_editChatTitle.md b/old_docs/API_docs_v18/methods/messages_editChatTitle.md index 2602a3aea..25fd0467d 100644 --- a/old_docs/API_docs_v18/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v18/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_forwardMessage.md b/old_docs/API_docs_v18/methods/messages_forwardMessage.md index 79af822d5..21015bd7a 100644 --- a/old_docs/API_docs_v18/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v18/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_forwardMessages.md b/old_docs/API_docs_v18/methods/messages_forwardMessages.md index 6544bb0f1..debfc7cce 100644 --- a/old_docs/API_docs_v18/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v18/methods/messages_forwardMessages.md @@ -19,6 +19,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_getChats.md b/old_docs/API_docs_v18/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v18/methods/messages_getChats.md +++ b/old_docs/API_docs_v18/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_getDhConfig.md b/old_docs/API_docs_v18/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v18/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v18/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_getDialogs.md b/old_docs/API_docs_v18/methods/messages_getDialogs.md index 7b6c9d9bb..e6ba4b141 100644 --- a/old_docs/API_docs_v18/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v18/methods/messages_getDialogs.md @@ -20,6 +20,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_getHistory.md b/old_docs/API_docs_v18/methods/messages_getHistory.md index 9f94fc45e..d06a05a7a 100644 --- a/old_docs/API_docs_v18/methods/messages_getHistory.md +++ b/old_docs/API_docs_v18/methods/messages_getHistory.md @@ -21,6 +21,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v18/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v18/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v18/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_readHistory.md b/old_docs/API_docs_v18/methods/messages_readHistory.md index 7f5a23921..c5dca72de 100644 --- a/old_docs/API_docs_v18/methods/messages_readHistory.md +++ b/old_docs/API_docs_v18/methods/messages_readHistory.md @@ -21,6 +21,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_receivedQueue.md b/old_docs/API_docs_v18/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v18/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v18/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_reportSpam.md b/old_docs/API_docs_v18/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v18/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v18/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_search.md b/old_docs/API_docs_v18/methods/messages_search.md index 01e4c6143..5f49d0163 100644 --- a/old_docs/API_docs_v18/methods/messages_search.md +++ b/old_docs/API_docs_v18/methods/messages_search.md @@ -25,6 +25,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_sendEncrypted.md b/old_docs/API_docs_v18/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v18/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v18/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v18/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v18/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v18/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v18/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v18/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v18/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_sendMedia.md b/old_docs/API_docs_v18/methods/messages_sendMedia.md index ea45a4891..626a78abb 100644 --- a/old_docs/API_docs_v18/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v18/methods/messages_sendMedia.md @@ -19,6 +19,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_sendMessage.md b/old_docs/API_docs_v18/methods/messages_sendMessage.md index 89c7dbf1a..d91c62753 100644 --- a/old_docs/API_docs_v18/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v18/methods/messages_sendMessage.md @@ -19,6 +19,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v18/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v18/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v18/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/messages_setTyping.md b/old_docs/API_docs_v18/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v18/methods/messages_setTyping.md +++ b/old_docs/API_docs_v18/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/photos_getUserPhotos.md b/old_docs/API_docs_v18/methods/photos_getUserPhotos.md index 2eb701200..56c76d8ba 100644 --- a/old_docs/API_docs_v18/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v18/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v18/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v18/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v18/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v18/methods/users_getUsers.md b/old_docs/API_docs_v18/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v18/methods/users_getUsers.md +++ b/old_docs/API_docs_v18/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_changePhone.md b/old_docs/API_docs_v23/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v23/methods/account_changePhone.md +++ b/old_docs/API_docs_v23/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_checkUsername.md b/old_docs/API_docs_v23/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v23/methods/account_checkUsername.md +++ b/old_docs/API_docs_v23/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_getNotifySettings.md b/old_docs/API_docs_v23/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v23/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v23/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_getPrivacy.md b/old_docs/API_docs_v23/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v23/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v23/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_registerDevice.md b/old_docs/API_docs_v23/methods/account_registerDevice.md index 58e9988f1..ab7ec933f 100644 --- a/old_docs/API_docs_v23/methods/account_registerDevice.md +++ b/old_docs/API_docs_v23/methods/account_registerDevice.md @@ -24,6 +24,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_reportPeer.md b/old_docs/API_docs_v23/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v23/methods/account_reportPeer.md +++ b/old_docs/API_docs_v23/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v23/methods/account_sendChangePhoneCode.md index b31df77ce..650dba72d 100644 --- a/old_docs/API_docs_v23/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v23/methods/account_sendChangePhoneCode.md @@ -18,6 +18,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_setAccountTTL.md b/old_docs/API_docs_v23/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v23/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v23/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_setPrivacy.md b/old_docs/API_docs_v23/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v23/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v23/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_unregisterDevice.md b/old_docs/API_docs_v23/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v23/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v23/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_updateNotifySettings.md b/old_docs/API_docs_v23/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v23/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v23/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_updateProfile.md b/old_docs/API_docs_v23/methods/account_updateProfile.md index af2c8f572..c87120746 100644 --- a/old_docs/API_docs_v23/methods/account_updateProfile.md +++ b/old_docs/API_docs_v23/methods/account_updateProfile.md @@ -19,6 +19,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_updateStatus.md b/old_docs/API_docs_v23/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v23/methods/account_updateStatus.md +++ b/old_docs/API_docs_v23/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/account_updateUsername.md b/old_docs/API_docs_v23/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v23/methods/account_updateUsername.md +++ b/old_docs/API_docs_v23/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v23/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v23/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v23/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/auth_checkPhone.md b/old_docs/API_docs_v23/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v23/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v23/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/auth_exportAuthorization.md b/old_docs/API_docs_v23/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v23/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v23/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/auth_importAuthorization.md b/old_docs/API_docs_v23/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v23/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v23/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v23/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v23/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v23/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/auth_sendInvites.md b/old_docs/API_docs_v23/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v23/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v23/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/contacts_block.md b/old_docs/API_docs_v23/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v23/methods/contacts_block.md +++ b/old_docs/API_docs_v23/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/contacts_deleteContact.md b/old_docs/API_docs_v23/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v23/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v23/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/contacts_deleteContacts.md b/old_docs/API_docs_v23/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v23/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v23/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/contacts_importCard.md b/old_docs/API_docs_v23/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v23/methods/contacts_importCard.md +++ b/old_docs/API_docs_v23/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/contacts_search.md b/old_docs/API_docs_v23/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v23/methods/contacts_search.md +++ b/old_docs/API_docs_v23/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/contacts_unblock.md b/old_docs/API_docs_v23/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v23/methods/contacts_unblock.md +++ b/old_docs/API_docs_v23/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/help_getConfig.md b/old_docs/API_docs_v23/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v23/methods/help_getConfig.md +++ b/old_docs/API_docs_v23/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/initConnection.md b/old_docs/API_docs_v23/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v23/methods/initConnection.md +++ b/old_docs/API_docs_v23/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/invokeWithLayer.md b/old_docs/API_docs_v23/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v23/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v23/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_addChatUser.md b/old_docs/API_docs_v23/methods/messages_addChatUser.md index 134599e57..6b3051fa0 100644 --- a/old_docs/API_docs_v23/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v23/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_createChat.md b/old_docs/API_docs_v23/methods/messages_createChat.md index e43d8017f..ce47d105c 100644 --- a/old_docs/API_docs_v23/methods/messages_createChat.md +++ b/old_docs/API_docs_v23/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_deleteChatUser.md b/old_docs/API_docs_v23/methods/messages_deleteChatUser.md index d3a735fb2..83eae12f0 100644 --- a/old_docs/API_docs_v23/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v23/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_deleteHistory.md b/old_docs/API_docs_v23/methods/messages_deleteHistory.md index 780451077..b7a9417d0 100644 --- a/old_docs/API_docs_v23/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v23/methods/messages_deleteHistory.md @@ -19,6 +19,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_deleteMessages.md b/old_docs/API_docs_v23/methods/messages_deleteMessages.md index e29549d54..ae8ed6b10 100644 --- a/old_docs/API_docs_v23/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v23/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_editChatPhoto.md b/old_docs/API_docs_v23/methods/messages_editChatPhoto.md index 9b1254a2d..1928f1cf3 100644 --- a/old_docs/API_docs_v23/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v23/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_editChatTitle.md b/old_docs/API_docs_v23/methods/messages_editChatTitle.md index 2602a3aea..25fd0467d 100644 --- a/old_docs/API_docs_v23/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v23/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_forwardMessage.md b/old_docs/API_docs_v23/methods/messages_forwardMessage.md index 79af822d5..21015bd7a 100644 --- a/old_docs/API_docs_v23/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v23/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_forwardMessages.md b/old_docs/API_docs_v23/methods/messages_forwardMessages.md index 6544bb0f1..debfc7cce 100644 --- a/old_docs/API_docs_v23/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v23/methods/messages_forwardMessages.md @@ -19,6 +19,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_getChats.md b/old_docs/API_docs_v23/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v23/methods/messages_getChats.md +++ b/old_docs/API_docs_v23/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_getDhConfig.md b/old_docs/API_docs_v23/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v23/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v23/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_getDialogs.md b/old_docs/API_docs_v23/methods/messages_getDialogs.md index 7b6c9d9bb..e6ba4b141 100644 --- a/old_docs/API_docs_v23/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v23/methods/messages_getDialogs.md @@ -20,6 +20,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_getHistory.md b/old_docs/API_docs_v23/methods/messages_getHistory.md index 9f94fc45e..d06a05a7a 100644 --- a/old_docs/API_docs_v23/methods/messages_getHistory.md +++ b/old_docs/API_docs_v23/methods/messages_getHistory.md @@ -21,6 +21,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v23/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v23/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v23/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_readHistory.md b/old_docs/API_docs_v23/methods/messages_readHistory.md index 7f5a23921..c5dca72de 100644 --- a/old_docs/API_docs_v23/methods/messages_readHistory.md +++ b/old_docs/API_docs_v23/methods/messages_readHistory.md @@ -21,6 +21,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_receivedQueue.md b/old_docs/API_docs_v23/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v23/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v23/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_reportSpam.md b/old_docs/API_docs_v23/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v23/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v23/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_search.md b/old_docs/API_docs_v23/methods/messages_search.md index 01e4c6143..5f49d0163 100644 --- a/old_docs/API_docs_v23/methods/messages_search.md +++ b/old_docs/API_docs_v23/methods/messages_search.md @@ -25,6 +25,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_sendEncrypted.md b/old_docs/API_docs_v23/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v23/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v23/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v23/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v23/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v23/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v23/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v23/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v23/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_sendMedia.md b/old_docs/API_docs_v23/methods/messages_sendMedia.md index ea45a4891..626a78abb 100644 --- a/old_docs/API_docs_v23/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v23/methods/messages_sendMedia.md @@ -19,6 +19,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_sendMessage.md b/old_docs/API_docs_v23/methods/messages_sendMessage.md index 89c7dbf1a..d91c62753 100644 --- a/old_docs/API_docs_v23/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v23/methods/messages_sendMessage.md @@ -19,6 +19,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v23/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v23/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v23/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/messages_setTyping.md b/old_docs/API_docs_v23/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v23/methods/messages_setTyping.md +++ b/old_docs/API_docs_v23/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/photos_getUserPhotos.md b/old_docs/API_docs_v23/methods/photos_getUserPhotos.md index 2eb701200..56c76d8ba 100644 --- a/old_docs/API_docs_v23/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v23/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v23/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v23/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v23/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v23/methods/users_getUsers.md b/old_docs/API_docs_v23/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v23/methods/users_getUsers.md +++ b/old_docs/API_docs_v23/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/account_changePhone.md b/old_docs/API_docs_v25/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v25/methods/account_changePhone.md +++ b/old_docs/API_docs_v25/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/account_checkUsername.md b/old_docs/API_docs_v25/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v25/methods/account_checkUsername.md +++ b/old_docs/API_docs_v25/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/account_getNotifySettings.md b/old_docs/API_docs_v25/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v25/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v25/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/account_getPrivacy.md b/old_docs/API_docs_v25/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v25/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v25/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/account_registerDevice.md b/old_docs/API_docs_v25/methods/account_registerDevice.md index 58e9988f1..ab7ec933f 100644 --- a/old_docs/API_docs_v25/methods/account_registerDevice.md +++ b/old_docs/API_docs_v25/methods/account_registerDevice.md @@ -24,6 +24,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v25/methods/account_sendChangePhoneCode.md index b31df77ce..650dba72d 100644 --- a/old_docs/API_docs_v25/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v25/methods/account_sendChangePhoneCode.md @@ -18,6 +18,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/account_setAccountTTL.md b/old_docs/API_docs_v25/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v25/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v25/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/account_setPrivacy.md b/old_docs/API_docs_v25/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v25/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v25/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/account_unregisterDevice.md b/old_docs/API_docs_v25/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v25/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v25/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/account_updateNotifySettings.md b/old_docs/API_docs_v25/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v25/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v25/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/account_updateProfile.md b/old_docs/API_docs_v25/methods/account_updateProfile.md index af2c8f572..c87120746 100644 --- a/old_docs/API_docs_v25/methods/account_updateProfile.md +++ b/old_docs/API_docs_v25/methods/account_updateProfile.md @@ -19,6 +19,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/account_updateStatus.md b/old_docs/API_docs_v25/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v25/methods/account_updateStatus.md +++ b/old_docs/API_docs_v25/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/account_updateUsername.md b/old_docs/API_docs_v25/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v25/methods/account_updateUsername.md +++ b/old_docs/API_docs_v25/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v25/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v25/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v25/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/auth_checkPassword.md b/old_docs/API_docs_v25/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v25/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v25/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/auth_checkPhone.md b/old_docs/API_docs_v25/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v25/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v25/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/auth_exportAuthorization.md b/old_docs/API_docs_v25/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v25/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v25/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/auth_importAuthorization.md b/old_docs/API_docs_v25/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v25/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v25/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v25/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v25/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v25/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/auth_sendInvites.md b/old_docs/API_docs_v25/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v25/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v25/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/contacts_block.md b/old_docs/API_docs_v25/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v25/methods/contacts_block.md +++ b/old_docs/API_docs_v25/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/contacts_deleteContact.md b/old_docs/API_docs_v25/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v25/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v25/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/contacts_deleteContacts.md b/old_docs/API_docs_v25/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v25/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v25/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/contacts_importCard.md b/old_docs/API_docs_v25/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v25/methods/contacts_importCard.md +++ b/old_docs/API_docs_v25/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/contacts_search.md b/old_docs/API_docs_v25/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v25/methods/contacts_search.md +++ b/old_docs/API_docs_v25/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/contacts_unblock.md b/old_docs/API_docs_v25/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v25/methods/contacts_unblock.md +++ b/old_docs/API_docs_v25/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/help_getConfig.md b/old_docs/API_docs_v25/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v25/methods/help_getConfig.md +++ b/old_docs/API_docs_v25/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/initConnection.md b/old_docs/API_docs_v25/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v25/methods/initConnection.md +++ b/old_docs/API_docs_v25/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/invokeWithLayer.md b/old_docs/API_docs_v25/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v25/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v25/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_addChatUser.md b/old_docs/API_docs_v25/methods/messages_addChatUser.md index 134599e57..6b3051fa0 100644 --- a/old_docs/API_docs_v25/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v25/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_createChat.md b/old_docs/API_docs_v25/methods/messages_createChat.md index e43d8017f..ce47d105c 100644 --- a/old_docs/API_docs_v25/methods/messages_createChat.md +++ b/old_docs/API_docs_v25/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_deleteChatUser.md b/old_docs/API_docs_v25/methods/messages_deleteChatUser.md index d3a735fb2..83eae12f0 100644 --- a/old_docs/API_docs_v25/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v25/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_deleteHistory.md b/old_docs/API_docs_v25/methods/messages_deleteHistory.md index 780451077..b7a9417d0 100644 --- a/old_docs/API_docs_v25/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v25/methods/messages_deleteHistory.md @@ -19,6 +19,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_deleteMessages.md b/old_docs/API_docs_v25/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v25/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v25/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_editChatPhoto.md b/old_docs/API_docs_v25/methods/messages_editChatPhoto.md index 9b1254a2d..1928f1cf3 100644 --- a/old_docs/API_docs_v25/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v25/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_editChatTitle.md b/old_docs/API_docs_v25/methods/messages_editChatTitle.md index 2602a3aea..25fd0467d 100644 --- a/old_docs/API_docs_v25/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v25/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_forwardMessage.md b/old_docs/API_docs_v25/methods/messages_forwardMessage.md index 79af822d5..21015bd7a 100644 --- a/old_docs/API_docs_v25/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v25/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_forwardMessages.md b/old_docs/API_docs_v25/methods/messages_forwardMessages.md index 6544bb0f1..debfc7cce 100644 --- a/old_docs/API_docs_v25/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v25/methods/messages_forwardMessages.md @@ -19,6 +19,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_getChats.md b/old_docs/API_docs_v25/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v25/methods/messages_getChats.md +++ b/old_docs/API_docs_v25/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_getDhConfig.md b/old_docs/API_docs_v25/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v25/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v25/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_getDialogs.md b/old_docs/API_docs_v25/methods/messages_getDialogs.md index 7b6c9d9bb..e6ba4b141 100644 --- a/old_docs/API_docs_v25/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v25/methods/messages_getDialogs.md @@ -20,6 +20,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_getHistory.md b/old_docs/API_docs_v25/methods/messages_getHistory.md index 9f94fc45e..d06a05a7a 100644 --- a/old_docs/API_docs_v25/methods/messages_getHistory.md +++ b/old_docs/API_docs_v25/methods/messages_getHistory.md @@ -21,6 +21,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v25/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v25/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v25/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_readHistory.md b/old_docs/API_docs_v25/methods/messages_readHistory.md index d7e89a94a..d392dbce4 100644 --- a/old_docs/API_docs_v25/methods/messages_readHistory.md +++ b/old_docs/API_docs_v25/methods/messages_readHistory.md @@ -20,6 +20,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_receivedQueue.md b/old_docs/API_docs_v25/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v25/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v25/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_search.md b/old_docs/API_docs_v25/methods/messages_search.md index 01e4c6143..5f49d0163 100644 --- a/old_docs/API_docs_v25/methods/messages_search.md +++ b/old_docs/API_docs_v25/methods/messages_search.md @@ -25,6 +25,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_sendEncrypted.md b/old_docs/API_docs_v25/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v25/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v25/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v25/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v25/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v25/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v25/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v25/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v25/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_sendMedia.md b/old_docs/API_docs_v25/methods/messages_sendMedia.md index 3e239cfdf..478b2e987 100644 --- a/old_docs/API_docs_v25/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v25/methods/messages_sendMedia.md @@ -20,6 +20,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_sendMessage.md b/old_docs/API_docs_v25/methods/messages_sendMessage.md index 3b50e48fa..b445baa9e 100644 --- a/old_docs/API_docs_v25/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v25/methods/messages_sendMessage.md @@ -20,6 +20,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v25/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v25/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v25/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/messages_setTyping.md b/old_docs/API_docs_v25/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v25/methods/messages_setTyping.md +++ b/old_docs/API_docs_v25/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/photos_getUserPhotos.md b/old_docs/API_docs_v25/methods/photos_getUserPhotos.md index 2eb701200..56c76d8ba 100644 --- a/old_docs/API_docs_v25/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v25/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v25/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v25/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v25/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v25/methods/users_getUsers.md b/old_docs/API_docs_v25/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v25/methods/users_getUsers.md +++ b/old_docs/API_docs_v25/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_changePhone.md b/old_docs/API_docs_v27/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v27/methods/account_changePhone.md +++ b/old_docs/API_docs_v27/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_checkUsername.md b/old_docs/API_docs_v27/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v27/methods/account_checkUsername.md +++ b/old_docs/API_docs_v27/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_getNotifySettings.md b/old_docs/API_docs_v27/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v27/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v27/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_getPasswordSettings.md b/old_docs/API_docs_v27/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v27/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v27/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_getPrivacy.md b/old_docs/API_docs_v27/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v27/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v27/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_registerDevice.md b/old_docs/API_docs_v27/methods/account_registerDevice.md index 58e9988f1..ab7ec933f 100644 --- a/old_docs/API_docs_v27/methods/account_registerDevice.md +++ b/old_docs/API_docs_v27/methods/account_registerDevice.md @@ -24,6 +24,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_resetAuthorization.md b/old_docs/API_docs_v27/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v27/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v27/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v27/methods/account_sendChangePhoneCode.md index b31df77ce..650dba72d 100644 --- a/old_docs/API_docs_v27/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v27/methods/account_sendChangePhoneCode.md @@ -18,6 +18,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_setAccountTTL.md b/old_docs/API_docs_v27/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v27/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v27/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_setPrivacy.md b/old_docs/API_docs_v27/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v27/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v27/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_unregisterDevice.md b/old_docs/API_docs_v27/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v27/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v27/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_updateNotifySettings.md b/old_docs/API_docs_v27/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v27/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v27/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v27/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v27/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v27/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_updateProfile.md b/old_docs/API_docs_v27/methods/account_updateProfile.md index af2c8f572..c87120746 100644 --- a/old_docs/API_docs_v27/methods/account_updateProfile.md +++ b/old_docs/API_docs_v27/methods/account_updateProfile.md @@ -19,6 +19,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_updateStatus.md b/old_docs/API_docs_v27/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v27/methods/account_updateStatus.md +++ b/old_docs/API_docs_v27/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/account_updateUsername.md b/old_docs/API_docs_v27/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v27/methods/account_updateUsername.md +++ b/old_docs/API_docs_v27/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v27/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v27/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v27/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/auth_checkPassword.md b/old_docs/API_docs_v27/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v27/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v27/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/auth_checkPhone.md b/old_docs/API_docs_v27/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v27/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v27/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/auth_exportAuthorization.md b/old_docs/API_docs_v27/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v27/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v27/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/auth_importAuthorization.md b/old_docs/API_docs_v27/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v27/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v27/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/auth_recoverPassword.md b/old_docs/API_docs_v27/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v27/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v27/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v27/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v27/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v27/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v27/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v27/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v27/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/auth_sendInvites.md b/old_docs/API_docs_v27/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v27/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v27/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/contacts_block.md b/old_docs/API_docs_v27/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v27/methods/contacts_block.md +++ b/old_docs/API_docs_v27/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/contacts_deleteContact.md b/old_docs/API_docs_v27/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v27/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v27/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/contacts_deleteContacts.md b/old_docs/API_docs_v27/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v27/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v27/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/contacts_importCard.md b/old_docs/API_docs_v27/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v27/methods/contacts_importCard.md +++ b/old_docs/API_docs_v27/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/contacts_search.md b/old_docs/API_docs_v27/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v27/methods/contacts_search.md +++ b/old_docs/API_docs_v27/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/contacts_unblock.md b/old_docs/API_docs_v27/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v27/methods/contacts_unblock.md +++ b/old_docs/API_docs_v27/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/help_getConfig.md b/old_docs/API_docs_v27/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v27/methods/help_getConfig.md +++ b/old_docs/API_docs_v27/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/initConnection.md b/old_docs/API_docs_v27/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v27/methods/initConnection.md +++ b/old_docs/API_docs_v27/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/invokeWithLayer.md b/old_docs/API_docs_v27/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v27/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v27/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_addChatUser.md b/old_docs/API_docs_v27/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v27/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v27/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_createChat.md b/old_docs/API_docs_v27/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v27/methods/messages_createChat.md +++ b/old_docs/API_docs_v27/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_deleteChatUser.md b/old_docs/API_docs_v27/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v27/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v27/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_deleteHistory.md b/old_docs/API_docs_v27/methods/messages_deleteHistory.md index 780451077..b7a9417d0 100644 --- a/old_docs/API_docs_v27/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v27/methods/messages_deleteHistory.md @@ -19,6 +19,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_deleteMessages.md b/old_docs/API_docs_v27/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v27/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v27/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_editChatPhoto.md b/old_docs/API_docs_v27/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v27/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v27/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_editChatTitle.md b/old_docs/API_docs_v27/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v27/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v27/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_forwardMessage.md b/old_docs/API_docs_v27/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v27/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v27/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_forwardMessages.md b/old_docs/API_docs_v27/methods/messages_forwardMessages.md index 484321e00..4ed1881c1 100644 --- a/old_docs/API_docs_v27/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v27/methods/messages_forwardMessages.md @@ -19,6 +19,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_getChats.md b/old_docs/API_docs_v27/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v27/methods/messages_getChats.md +++ b/old_docs/API_docs_v27/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_getDhConfig.md b/old_docs/API_docs_v27/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v27/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v27/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_getDialogs.md b/old_docs/API_docs_v27/methods/messages_getDialogs.md index 7b6c9d9bb..e6ba4b141 100644 --- a/old_docs/API_docs_v27/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v27/methods/messages_getDialogs.md @@ -20,6 +20,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_getHistory.md b/old_docs/API_docs_v27/methods/messages_getHistory.md index 9f94fc45e..d06a05a7a 100644 --- a/old_docs/API_docs_v27/methods/messages_getHistory.md +++ b/old_docs/API_docs_v27/methods/messages_getHistory.md @@ -21,6 +21,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v27/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v27/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v27/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_readHistory.md b/old_docs/API_docs_v27/methods/messages_readHistory.md index d7e89a94a..d392dbce4 100644 --- a/old_docs/API_docs_v27/methods/messages_readHistory.md +++ b/old_docs/API_docs_v27/methods/messages_readHistory.md @@ -20,6 +20,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_receivedQueue.md b/old_docs/API_docs_v27/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v27/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v27/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_search.md b/old_docs/API_docs_v27/methods/messages_search.md index 01e4c6143..5f49d0163 100644 --- a/old_docs/API_docs_v27/methods/messages_search.md +++ b/old_docs/API_docs_v27/methods/messages_search.md @@ -25,6 +25,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_sendEncrypted.md b/old_docs/API_docs_v27/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v27/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v27/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v27/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v27/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v27/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v27/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v27/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v27/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_sendMedia.md b/old_docs/API_docs_v27/methods/messages_sendMedia.md index 52cb2255d..f89461eed 100644 --- a/old_docs/API_docs_v27/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v27/methods/messages_sendMedia.md @@ -20,6 +20,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_sendMessage.md b/old_docs/API_docs_v27/methods/messages_sendMessage.md index 18e77def0..3d0e332c1 100644 --- a/old_docs/API_docs_v27/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v27/methods/messages_sendMessage.md @@ -20,6 +20,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v27/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v27/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v27/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/messages_setTyping.md b/old_docs/API_docs_v27/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v27/methods/messages_setTyping.md +++ b/old_docs/API_docs_v27/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/photos_getUserPhotos.md b/old_docs/API_docs_v27/methods/photos_getUserPhotos.md index 2eb701200..56c76d8ba 100644 --- a/old_docs/API_docs_v27/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v27/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v27/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v27/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v27/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v27/methods/users_getUsers.md b/old_docs/API_docs_v27/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v27/methods/users_getUsers.md +++ b/old_docs/API_docs_v27/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_changePhone.md b/old_docs/API_docs_v33/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v33/methods/account_changePhone.md +++ b/old_docs/API_docs_v33/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_checkUsername.md b/old_docs/API_docs_v33/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v33/methods/account_checkUsername.md +++ b/old_docs/API_docs_v33/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_getNotifySettings.md b/old_docs/API_docs_v33/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v33/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v33/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_getPasswordSettings.md b/old_docs/API_docs_v33/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v33/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v33/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_getPrivacy.md b/old_docs/API_docs_v33/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v33/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v33/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_registerDevice.md b/old_docs/API_docs_v33/methods/account_registerDevice.md index 58e9988f1..ab7ec933f 100644 --- a/old_docs/API_docs_v33/methods/account_registerDevice.md +++ b/old_docs/API_docs_v33/methods/account_registerDevice.md @@ -24,6 +24,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_resetAuthorization.md b/old_docs/API_docs_v33/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v33/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v33/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v33/methods/account_sendChangePhoneCode.md index b31df77ce..650dba72d 100644 --- a/old_docs/API_docs_v33/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v33/methods/account_sendChangePhoneCode.md @@ -18,6 +18,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_setAccountTTL.md b/old_docs/API_docs_v33/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v33/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v33/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_setPrivacy.md b/old_docs/API_docs_v33/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v33/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v33/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_unregisterDevice.md b/old_docs/API_docs_v33/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v33/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v33/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_updateNotifySettings.md b/old_docs/API_docs_v33/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v33/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v33/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v33/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v33/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v33/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_updateProfile.md b/old_docs/API_docs_v33/methods/account_updateProfile.md index af2c8f572..c87120746 100644 --- a/old_docs/API_docs_v33/methods/account_updateProfile.md +++ b/old_docs/API_docs_v33/methods/account_updateProfile.md @@ -19,6 +19,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_updateStatus.md b/old_docs/API_docs_v33/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v33/methods/account_updateStatus.md +++ b/old_docs/API_docs_v33/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/account_updateUsername.md b/old_docs/API_docs_v33/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v33/methods/account_updateUsername.md +++ b/old_docs/API_docs_v33/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v33/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v33/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v33/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/auth_checkPassword.md b/old_docs/API_docs_v33/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v33/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v33/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/auth_checkPhone.md b/old_docs/API_docs_v33/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v33/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v33/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/auth_exportAuthorization.md b/old_docs/API_docs_v33/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v33/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v33/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/auth_importAuthorization.md b/old_docs/API_docs_v33/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v33/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v33/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/auth_recoverPassword.md b/old_docs/API_docs_v33/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v33/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v33/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v33/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v33/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v33/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v33/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v33/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v33/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/auth_sendInvites.md b/old_docs/API_docs_v33/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v33/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v33/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/contacts_block.md b/old_docs/API_docs_v33/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v33/methods/contacts_block.md +++ b/old_docs/API_docs_v33/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/contacts_deleteContact.md b/old_docs/API_docs_v33/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v33/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v33/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/contacts_deleteContacts.md b/old_docs/API_docs_v33/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v33/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v33/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/contacts_importCard.md b/old_docs/API_docs_v33/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v33/methods/contacts_importCard.md +++ b/old_docs/API_docs_v33/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/contacts_search.md b/old_docs/API_docs_v33/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v33/methods/contacts_search.md +++ b/old_docs/API_docs_v33/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/contacts_unblock.md b/old_docs/API_docs_v33/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v33/methods/contacts_unblock.md +++ b/old_docs/API_docs_v33/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/help_getConfig.md b/old_docs/API_docs_v33/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v33/methods/help_getConfig.md +++ b/old_docs/API_docs_v33/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/initConnection.md b/old_docs/API_docs_v33/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v33/methods/initConnection.md +++ b/old_docs/API_docs_v33/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/invokeWithLayer.md b/old_docs/API_docs_v33/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v33/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v33/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_addChatUser.md b/old_docs/API_docs_v33/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v33/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v33/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_checkChatInvite.md b/old_docs/API_docs_v33/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v33/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v33/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_createChat.md b/old_docs/API_docs_v33/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v33/methods/messages_createChat.md +++ b/old_docs/API_docs_v33/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_deleteChatUser.md b/old_docs/API_docs_v33/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v33/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v33/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_deleteHistory.md b/old_docs/API_docs_v33/methods/messages_deleteHistory.md index 780451077..b7a9417d0 100644 --- a/old_docs/API_docs_v33/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v33/methods/messages_deleteHistory.md @@ -19,6 +19,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_deleteMessages.md b/old_docs/API_docs_v33/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v33/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v33/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_editChatPhoto.md b/old_docs/API_docs_v33/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v33/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v33/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_editChatTitle.md b/old_docs/API_docs_v33/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v33/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v33/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_exportChatInvite.md b/old_docs/API_docs_v33/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v33/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v33/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_forwardMessage.md b/old_docs/API_docs_v33/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v33/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v33/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_forwardMessages.md b/old_docs/API_docs_v33/methods/messages_forwardMessages.md index 484321e00..4ed1881c1 100644 --- a/old_docs/API_docs_v33/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v33/methods/messages_forwardMessages.md @@ -19,6 +19,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_getChats.md b/old_docs/API_docs_v33/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v33/methods/messages_getChats.md +++ b/old_docs/API_docs_v33/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_getDhConfig.md b/old_docs/API_docs_v33/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v33/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v33/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_getDialogs.md b/old_docs/API_docs_v33/methods/messages_getDialogs.md index 7b6c9d9bb..e6ba4b141 100644 --- a/old_docs/API_docs_v33/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v33/methods/messages_getDialogs.md @@ -20,6 +20,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_getHistory.md b/old_docs/API_docs_v33/methods/messages_getHistory.md index 9f94fc45e..d06a05a7a 100644 --- a/old_docs/API_docs_v33/methods/messages_getHistory.md +++ b/old_docs/API_docs_v33/methods/messages_getHistory.md @@ -21,6 +21,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_getStickerSet.md b/old_docs/API_docs_v33/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v33/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v33/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_importChatInvite.md b/old_docs/API_docs_v33/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v33/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v33/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_installStickerSet.md b/old_docs/API_docs_v33/methods/messages_installStickerSet.md index 0b5053978..1969d0083 100644 --- a/old_docs/API_docs_v33/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v33/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v33/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v33/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v33/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_readHistory.md b/old_docs/API_docs_v33/methods/messages_readHistory.md index d7e89a94a..d392dbce4 100644 --- a/old_docs/API_docs_v33/methods/messages_readHistory.md +++ b/old_docs/API_docs_v33/methods/messages_readHistory.md @@ -20,6 +20,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_receivedQueue.md b/old_docs/API_docs_v33/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v33/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v33/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_search.md b/old_docs/API_docs_v33/methods/messages_search.md index 01e4c6143..5f49d0163 100644 --- a/old_docs/API_docs_v33/methods/messages_search.md +++ b/old_docs/API_docs_v33/methods/messages_search.md @@ -25,6 +25,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_sendEncrypted.md b/old_docs/API_docs_v33/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v33/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v33/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v33/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v33/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v33/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v33/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v33/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v33/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_sendMedia.md b/old_docs/API_docs_v33/methods/messages_sendMedia.md index 64ac8840a..97b0d5570 100644 --- a/old_docs/API_docs_v33/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v33/methods/messages_sendMedia.md @@ -21,6 +21,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_sendMessage.md b/old_docs/API_docs_v33/methods/messages_sendMessage.md index 0747a7eed..c3bc8d9e9 100644 --- a/old_docs/API_docs_v33/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v33/methods/messages_sendMessage.md @@ -21,6 +21,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v33/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v33/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v33/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_setTyping.md b/old_docs/API_docs_v33/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v33/methods/messages_setTyping.md +++ b/old_docs/API_docs_v33/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_startBot.md b/old_docs/API_docs_v33/methods/messages_startBot.md index dc989df13..b4b186731 100644 --- a/old_docs/API_docs_v33/methods/messages_startBot.md +++ b/old_docs/API_docs_v33/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v33/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v33/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v33/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/photos_getUserPhotos.md b/old_docs/API_docs_v33/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v33/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v33/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v33/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v33/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v33/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v33/methods/users_getUsers.md b/old_docs/API_docs_v33/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v33/methods/users_getUsers.md +++ b/old_docs/API_docs_v33/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_changePhone.md b/old_docs/API_docs_v38/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v38/methods/account_changePhone.md +++ b/old_docs/API_docs_v38/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_checkUsername.md b/old_docs/API_docs_v38/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v38/methods/account_checkUsername.md +++ b/old_docs/API_docs_v38/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_getNotifySettings.md b/old_docs/API_docs_v38/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v38/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v38/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_getPasswordSettings.md b/old_docs/API_docs_v38/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v38/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v38/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_getPrivacy.md b/old_docs/API_docs_v38/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v38/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v38/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_registerDevice.md b/old_docs/API_docs_v38/methods/account_registerDevice.md index 58e9988f1..ab7ec933f 100644 --- a/old_docs/API_docs_v38/methods/account_registerDevice.md +++ b/old_docs/API_docs_v38/methods/account_registerDevice.md @@ -24,6 +24,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_resetAuthorization.md b/old_docs/API_docs_v38/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v38/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v38/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v38/methods/account_sendChangePhoneCode.md index b31df77ce..650dba72d 100644 --- a/old_docs/API_docs_v38/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v38/methods/account_sendChangePhoneCode.md @@ -18,6 +18,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_setAccountTTL.md b/old_docs/API_docs_v38/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v38/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v38/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_setPrivacy.md b/old_docs/API_docs_v38/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v38/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v38/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_unregisterDevice.md b/old_docs/API_docs_v38/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v38/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v38/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_updateNotifySettings.md b/old_docs/API_docs_v38/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v38/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v38/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v38/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v38/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v38/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_updateProfile.md b/old_docs/API_docs_v38/methods/account_updateProfile.md index af2c8f572..c87120746 100644 --- a/old_docs/API_docs_v38/methods/account_updateProfile.md +++ b/old_docs/API_docs_v38/methods/account_updateProfile.md @@ -19,6 +19,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_updateStatus.md b/old_docs/API_docs_v38/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v38/methods/account_updateStatus.md +++ b/old_docs/API_docs_v38/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/account_updateUsername.md b/old_docs/API_docs_v38/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v38/methods/account_updateUsername.md +++ b/old_docs/API_docs_v38/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v38/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v38/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v38/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/auth_checkPassword.md b/old_docs/API_docs_v38/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v38/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v38/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/auth_checkPhone.md b/old_docs/API_docs_v38/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v38/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v38/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/auth_exportAuthorization.md b/old_docs/API_docs_v38/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v38/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v38/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/auth_importAuthorization.md b/old_docs/API_docs_v38/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v38/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v38/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/auth_recoverPassword.md b/old_docs/API_docs_v38/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v38/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v38/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v38/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v38/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v38/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v38/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v38/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v38/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/auth_sendInvites.md b/old_docs/API_docs_v38/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v38/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v38/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_checkUsername.md b/old_docs/API_docs_v38/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v38/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v38/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_createChannel.md b/old_docs/API_docs_v38/methods/channels_createChannel.md index 2ae639be6..728d7e8a4 100644 --- a/old_docs/API_docs_v38/methods/channels_createChannel.md +++ b/old_docs/API_docs_v38/methods/channels_createChannel.md @@ -20,6 +20,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_deleteChannel.md b/old_docs/API_docs_v38/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v38/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v38/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_deleteMessages.md b/old_docs/API_docs_v38/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v38/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v38/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v38/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v38/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v38/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_editAbout.md b/old_docs/API_docs_v38/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v38/methods/channels_editAbout.md +++ b/old_docs/API_docs_v38/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_editAdmin.md b/old_docs/API_docs_v38/methods/channels_editAdmin.md index 4a692986e..fda46a3b1 100644 --- a/old_docs/API_docs_v38/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v38/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_editPhoto.md b/old_docs/API_docs_v38/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v38/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v38/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_editTitle.md b/old_docs/API_docs_v38/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v38/methods/channels_editTitle.md +++ b/old_docs/API_docs_v38/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_exportInvite.md b/old_docs/API_docs_v38/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v38/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v38/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_getChannels.md b/old_docs/API_docs_v38/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v38/methods/channels_getChannels.md +++ b/old_docs/API_docs_v38/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_getMessages.md b/old_docs/API_docs_v38/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v38/methods/channels_getMessages.md +++ b/old_docs/API_docs_v38/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_getParticipant.md b/old_docs/API_docs_v38/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v38/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v38/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_inviteToChannel.md b/old_docs/API_docs_v38/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v38/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v38/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_joinChannel.md b/old_docs/API_docs_v38/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v38/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v38/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_leaveChannel.md b/old_docs/API_docs_v38/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v38/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v38/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_readHistory.md b/old_docs/API_docs_v38/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v38/methods/channels_readHistory.md +++ b/old_docs/API_docs_v38/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_reportSpam.md b/old_docs/API_docs_v38/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v38/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v38/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/channels_updateUsername.md b/old_docs/API_docs_v38/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v38/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v38/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/contacts_block.md b/old_docs/API_docs_v38/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v38/methods/contacts_block.md +++ b/old_docs/API_docs_v38/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/contacts_deleteContact.md b/old_docs/API_docs_v38/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v38/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v38/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/contacts_deleteContacts.md b/old_docs/API_docs_v38/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v38/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v38/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/contacts_importCard.md b/old_docs/API_docs_v38/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v38/methods/contacts_importCard.md +++ b/old_docs/API_docs_v38/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/contacts_search.md b/old_docs/API_docs_v38/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v38/methods/contacts_search.md +++ b/old_docs/API_docs_v38/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/contacts_unblock.md b/old_docs/API_docs_v38/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v38/methods/contacts_unblock.md +++ b/old_docs/API_docs_v38/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/help_getConfig.md b/old_docs/API_docs_v38/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v38/methods/help_getConfig.md +++ b/old_docs/API_docs_v38/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/initConnection.md b/old_docs/API_docs_v38/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v38/methods/initConnection.md +++ b/old_docs/API_docs_v38/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/invokeWithLayer.md b/old_docs/API_docs_v38/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v38/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v38/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_addChatUser.md b/old_docs/API_docs_v38/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v38/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v38/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_checkChatInvite.md b/old_docs/API_docs_v38/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v38/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v38/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_createChat.md b/old_docs/API_docs_v38/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v38/methods/messages_createChat.md +++ b/old_docs/API_docs_v38/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_deleteChatUser.md b/old_docs/API_docs_v38/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v38/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v38/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_deleteHistory.md b/old_docs/API_docs_v38/methods/messages_deleteHistory.md index 780451077..b7a9417d0 100644 --- a/old_docs/API_docs_v38/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v38/methods/messages_deleteHistory.md @@ -19,6 +19,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_deleteMessages.md b/old_docs/API_docs_v38/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v38/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v38/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_editChatPhoto.md b/old_docs/API_docs_v38/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v38/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v38/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_editChatTitle.md b/old_docs/API_docs_v38/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v38/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v38/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_exportChatInvite.md b/old_docs/API_docs_v38/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v38/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v38/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_forwardMessage.md b/old_docs/API_docs_v38/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v38/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v38/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_forwardMessages.md b/old_docs/API_docs_v38/methods/messages_forwardMessages.md index 5c6eb1f45..b590503a1 100644 --- a/old_docs/API_docs_v38/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v38/methods/messages_forwardMessages.md @@ -20,6 +20,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_getChats.md b/old_docs/API_docs_v38/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v38/methods/messages_getChats.md +++ b/old_docs/API_docs_v38/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_getDhConfig.md b/old_docs/API_docs_v38/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v38/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v38/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_getDialogs.md b/old_docs/API_docs_v38/methods/messages_getDialogs.md index 0ac952961..6b0e807d4 100644 --- a/old_docs/API_docs_v38/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v38/methods/messages_getDialogs.md @@ -19,6 +19,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_getHistory.md b/old_docs/API_docs_v38/methods/messages_getHistory.md index 62f2e26fa..ba9ed92d6 100644 --- a/old_docs/API_docs_v38/methods/messages_getHistory.md +++ b/old_docs/API_docs_v38/methods/messages_getHistory.md @@ -23,6 +23,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_getMessagesViews.md b/old_docs/API_docs_v38/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v38/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v38/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_getStickerSet.md b/old_docs/API_docs_v38/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v38/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v38/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_importChatInvite.md b/old_docs/API_docs_v38/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v38/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v38/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_installStickerSet.md b/old_docs/API_docs_v38/methods/messages_installStickerSet.md index 0b5053978..1969d0083 100644 --- a/old_docs/API_docs_v38/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v38/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v38/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v38/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v38/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_readHistory.md b/old_docs/API_docs_v38/methods/messages_readHistory.md index d7e89a94a..d392dbce4 100644 --- a/old_docs/API_docs_v38/methods/messages_readHistory.md +++ b/old_docs/API_docs_v38/methods/messages_readHistory.md @@ -20,6 +20,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_receivedQueue.md b/old_docs/API_docs_v38/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v38/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v38/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_reportSpam.md b/old_docs/API_docs_v38/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v38/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v38/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_search.md b/old_docs/API_docs_v38/methods/messages_search.md index 01e4c6143..5f49d0163 100644 --- a/old_docs/API_docs_v38/methods/messages_search.md +++ b/old_docs/API_docs_v38/methods/messages_search.md @@ -25,6 +25,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_sendEncrypted.md b/old_docs/API_docs_v38/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v38/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v38/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v38/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v38/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v38/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v38/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v38/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v38/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_sendMedia.md b/old_docs/API_docs_v38/methods/messages_sendMedia.md index 64ac8840a..97b0d5570 100644 --- a/old_docs/API_docs_v38/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v38/methods/messages_sendMedia.md @@ -21,6 +21,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_sendMessage.md b/old_docs/API_docs_v38/methods/messages_sendMessage.md index dd8c13a9c..ec066c9f8 100644 --- a/old_docs/API_docs_v38/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v38/methods/messages_sendMessage.md @@ -23,6 +23,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v38/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v38/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v38/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_setTyping.md b/old_docs/API_docs_v38/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v38/methods/messages_setTyping.md +++ b/old_docs/API_docs_v38/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_startBot.md b/old_docs/API_docs_v38/methods/messages_startBot.md index dc989df13..b4b186731 100644 --- a/old_docs/API_docs_v38/methods/messages_startBot.md +++ b/old_docs/API_docs_v38/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v38/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v38/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v38/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/photos_getUserPhotos.md b/old_docs/API_docs_v38/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v38/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v38/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v38/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v38/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v38/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v38/methods/users_getUsers.md b/old_docs/API_docs_v38/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v38/methods/users_getUsers.md +++ b/old_docs/API_docs_v38/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_changePhone.md b/old_docs/API_docs_v40/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v40/methods/account_changePhone.md +++ b/old_docs/API_docs_v40/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_checkUsername.md b/old_docs/API_docs_v40/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v40/methods/account_checkUsername.md +++ b/old_docs/API_docs_v40/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_getNotifySettings.md b/old_docs/API_docs_v40/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v40/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v40/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_getPasswordSettings.md b/old_docs/API_docs_v40/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v40/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v40/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_getPrivacy.md b/old_docs/API_docs_v40/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v40/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v40/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_registerDevice.md b/old_docs/API_docs_v40/methods/account_registerDevice.md index 58e9988f1..ab7ec933f 100644 --- a/old_docs/API_docs_v40/methods/account_registerDevice.md +++ b/old_docs/API_docs_v40/methods/account_registerDevice.md @@ -24,6 +24,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_resetAuthorization.md b/old_docs/API_docs_v40/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v40/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v40/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v40/methods/account_sendChangePhoneCode.md index b31df77ce..650dba72d 100644 --- a/old_docs/API_docs_v40/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v40/methods/account_sendChangePhoneCode.md @@ -18,6 +18,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_setAccountTTL.md b/old_docs/API_docs_v40/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v40/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v40/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_setPrivacy.md b/old_docs/API_docs_v40/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v40/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v40/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_unregisterDevice.md b/old_docs/API_docs_v40/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v40/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v40/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_updateNotifySettings.md b/old_docs/API_docs_v40/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v40/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v40/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v40/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v40/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v40/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_updateProfile.md b/old_docs/API_docs_v40/methods/account_updateProfile.md index af2c8f572..c87120746 100644 --- a/old_docs/API_docs_v40/methods/account_updateProfile.md +++ b/old_docs/API_docs_v40/methods/account_updateProfile.md @@ -19,6 +19,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_updateStatus.md b/old_docs/API_docs_v40/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v40/methods/account_updateStatus.md +++ b/old_docs/API_docs_v40/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/account_updateUsername.md b/old_docs/API_docs_v40/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v40/methods/account_updateUsername.md +++ b/old_docs/API_docs_v40/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v40/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v40/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v40/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/auth_checkPassword.md b/old_docs/API_docs_v40/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v40/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v40/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/auth_checkPhone.md b/old_docs/API_docs_v40/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v40/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v40/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/auth_exportAuthorization.md b/old_docs/API_docs_v40/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v40/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v40/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/auth_importAuthorization.md b/old_docs/API_docs_v40/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v40/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v40/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/auth_recoverPassword.md b/old_docs/API_docs_v40/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v40/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v40/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v40/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v40/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v40/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v40/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v40/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v40/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/auth_sendInvites.md b/old_docs/API_docs_v40/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v40/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v40/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/contacts_block.md b/old_docs/API_docs_v40/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v40/methods/contacts_block.md +++ b/old_docs/API_docs_v40/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/contacts_deleteContact.md b/old_docs/API_docs_v40/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v40/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v40/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/contacts_deleteContacts.md b/old_docs/API_docs_v40/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v40/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v40/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/contacts_importCard.md b/old_docs/API_docs_v40/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v40/methods/contacts_importCard.md +++ b/old_docs/API_docs_v40/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/contacts_search.md b/old_docs/API_docs_v40/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v40/methods/contacts_search.md +++ b/old_docs/API_docs_v40/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/contacts_unblock.md b/old_docs/API_docs_v40/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v40/methods/contacts_unblock.md +++ b/old_docs/API_docs_v40/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/help_getConfig.md b/old_docs/API_docs_v40/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v40/methods/help_getConfig.md +++ b/old_docs/API_docs_v40/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/initConnection.md b/old_docs/API_docs_v40/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v40/methods/initConnection.md +++ b/old_docs/API_docs_v40/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/invokeWithLayer.md b/old_docs/API_docs_v40/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v40/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v40/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_addChatUser.md b/old_docs/API_docs_v40/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v40/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v40/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_checkChatInvite.md b/old_docs/API_docs_v40/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v40/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v40/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_createChat.md b/old_docs/API_docs_v40/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v40/methods/messages_createChat.md +++ b/old_docs/API_docs_v40/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_deleteChatUser.md b/old_docs/API_docs_v40/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v40/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v40/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_deleteHistory.md b/old_docs/API_docs_v40/methods/messages_deleteHistory.md index 780451077..b7a9417d0 100644 --- a/old_docs/API_docs_v40/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v40/methods/messages_deleteHistory.md @@ -19,6 +19,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_deleteMessages.md b/old_docs/API_docs_v40/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v40/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v40/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_editChatPhoto.md b/old_docs/API_docs_v40/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v40/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v40/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_editChatTitle.md b/old_docs/API_docs_v40/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v40/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v40/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_exportChatInvite.md b/old_docs/API_docs_v40/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v40/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v40/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_forwardMessage.md b/old_docs/API_docs_v40/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v40/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v40/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_forwardMessages.md b/old_docs/API_docs_v40/methods/messages_forwardMessages.md index 484321e00..4ed1881c1 100644 --- a/old_docs/API_docs_v40/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v40/methods/messages_forwardMessages.md @@ -19,6 +19,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_getChats.md b/old_docs/API_docs_v40/methods/messages_getChats.md index 65e040f06..d3e82fa46 100644 --- a/old_docs/API_docs_v40/methods/messages_getChats.md +++ b/old_docs/API_docs_v40/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_getDhConfig.md b/old_docs/API_docs_v40/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v40/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v40/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_getDialogs.md b/old_docs/API_docs_v40/methods/messages_getDialogs.md index 0ac952961..6b0e807d4 100644 --- a/old_docs/API_docs_v40/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v40/methods/messages_getDialogs.md @@ -19,6 +19,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_getHistory.md b/old_docs/API_docs_v40/methods/messages_getHistory.md index b2253e66a..ab034582a 100644 --- a/old_docs/API_docs_v40/methods/messages_getHistory.md +++ b/old_docs/API_docs_v40/methods/messages_getHistory.md @@ -22,6 +22,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_getStickerSet.md b/old_docs/API_docs_v40/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v40/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v40/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_importChatInvite.md b/old_docs/API_docs_v40/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v40/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v40/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_installStickerSet.md b/old_docs/API_docs_v40/methods/messages_installStickerSet.md index 0b5053978..1969d0083 100644 --- a/old_docs/API_docs_v40/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v40/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v40/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v40/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v40/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_readHistory.md b/old_docs/API_docs_v40/methods/messages_readHistory.md index d7e89a94a..d392dbce4 100644 --- a/old_docs/API_docs_v40/methods/messages_readHistory.md +++ b/old_docs/API_docs_v40/methods/messages_readHistory.md @@ -20,6 +20,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_receivedQueue.md b/old_docs/API_docs_v40/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v40/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v40/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_search.md b/old_docs/API_docs_v40/methods/messages_search.md index 01e4c6143..5f49d0163 100644 --- a/old_docs/API_docs_v40/methods/messages_search.md +++ b/old_docs/API_docs_v40/methods/messages_search.md @@ -25,6 +25,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_sendEncrypted.md b/old_docs/API_docs_v40/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v40/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v40/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v40/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v40/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v40/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v40/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v40/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v40/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_sendMedia.md b/old_docs/API_docs_v40/methods/messages_sendMedia.md index 64ac8840a..97b0d5570 100644 --- a/old_docs/API_docs_v40/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v40/methods/messages_sendMedia.md @@ -21,6 +21,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_sendMessage.md b/old_docs/API_docs_v40/methods/messages_sendMessage.md index dd8c13a9c..ec066c9f8 100644 --- a/old_docs/API_docs_v40/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v40/methods/messages_sendMessage.md @@ -23,6 +23,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v40/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v40/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v40/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_setTyping.md b/old_docs/API_docs_v40/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v40/methods/messages_setTyping.md +++ b/old_docs/API_docs_v40/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_startBot.md b/old_docs/API_docs_v40/methods/messages_startBot.md index dc989df13..b4b186731 100644 --- a/old_docs/API_docs_v40/methods/messages_startBot.md +++ b/old_docs/API_docs_v40/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v40/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v40/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v40/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/photos_getUserPhotos.md b/old_docs/API_docs_v40/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v40/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v40/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v40/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v40/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v40/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v40/methods/users_getUsers.md b/old_docs/API_docs_v40/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v40/methods/users_getUsers.md +++ b/old_docs/API_docs_v40/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_changePhone.md b/old_docs/API_docs_v41/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v41/methods/account_changePhone.md +++ b/old_docs/API_docs_v41/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_checkUsername.md b/old_docs/API_docs_v41/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v41/methods/account_checkUsername.md +++ b/old_docs/API_docs_v41/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_getNotifySettings.md b/old_docs/API_docs_v41/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v41/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v41/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_getPasswordSettings.md b/old_docs/API_docs_v41/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v41/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v41/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_getPrivacy.md b/old_docs/API_docs_v41/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v41/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v41/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_registerDevice.md b/old_docs/API_docs_v41/methods/account_registerDevice.md index 58e9988f1..ab7ec933f 100644 --- a/old_docs/API_docs_v41/methods/account_registerDevice.md +++ b/old_docs/API_docs_v41/methods/account_registerDevice.md @@ -24,6 +24,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_resetAuthorization.md b/old_docs/API_docs_v41/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v41/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v41/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v41/methods/account_sendChangePhoneCode.md index b31df77ce..650dba72d 100644 --- a/old_docs/API_docs_v41/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v41/methods/account_sendChangePhoneCode.md @@ -18,6 +18,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_setAccountTTL.md b/old_docs/API_docs_v41/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v41/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v41/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_setPrivacy.md b/old_docs/API_docs_v41/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v41/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v41/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_unregisterDevice.md b/old_docs/API_docs_v41/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v41/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v41/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_updateNotifySettings.md b/old_docs/API_docs_v41/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v41/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v41/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v41/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v41/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v41/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_updateProfile.md b/old_docs/API_docs_v41/methods/account_updateProfile.md index af2c8f572..c87120746 100644 --- a/old_docs/API_docs_v41/methods/account_updateProfile.md +++ b/old_docs/API_docs_v41/methods/account_updateProfile.md @@ -19,6 +19,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_updateStatus.md b/old_docs/API_docs_v41/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v41/methods/account_updateStatus.md +++ b/old_docs/API_docs_v41/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/account_updateUsername.md b/old_docs/API_docs_v41/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v41/methods/account_updateUsername.md +++ b/old_docs/API_docs_v41/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v41/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v41/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v41/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/auth_checkPassword.md b/old_docs/API_docs_v41/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v41/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v41/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/auth_checkPhone.md b/old_docs/API_docs_v41/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v41/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v41/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/auth_exportAuthorization.md b/old_docs/API_docs_v41/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v41/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v41/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/auth_importAuthorization.md b/old_docs/API_docs_v41/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v41/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v41/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/auth_recoverPassword.md b/old_docs/API_docs_v41/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v41/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v41/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v41/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v41/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v41/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v41/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v41/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v41/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/auth_sendInvites.md b/old_docs/API_docs_v41/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v41/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v41/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_checkUsername.md b/old_docs/API_docs_v41/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v41/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v41/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_createChannel.md b/old_docs/API_docs_v41/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v41/methods/channels_createChannel.md +++ b/old_docs/API_docs_v41/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_deleteChannel.md b/old_docs/API_docs_v41/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v41/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v41/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_deleteMessages.md b/old_docs/API_docs_v41/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v41/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v41/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v41/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v41/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v41/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_editAbout.md b/old_docs/API_docs_v41/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v41/methods/channels_editAbout.md +++ b/old_docs/API_docs_v41/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_editAdmin.md b/old_docs/API_docs_v41/methods/channels_editAdmin.md index 4a692986e..fda46a3b1 100644 --- a/old_docs/API_docs_v41/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v41/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_editPhoto.md b/old_docs/API_docs_v41/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v41/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v41/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_editTitle.md b/old_docs/API_docs_v41/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v41/methods/channels_editTitle.md +++ b/old_docs/API_docs_v41/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_exportInvite.md b/old_docs/API_docs_v41/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v41/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v41/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_getChannels.md b/old_docs/API_docs_v41/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v41/methods/channels_getChannels.md +++ b/old_docs/API_docs_v41/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_getMessages.md b/old_docs/API_docs_v41/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v41/methods/channels_getMessages.md +++ b/old_docs/API_docs_v41/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_getParticipant.md b/old_docs/API_docs_v41/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v41/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v41/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_inviteToChannel.md b/old_docs/API_docs_v41/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v41/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v41/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_joinChannel.md b/old_docs/API_docs_v41/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v41/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v41/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_leaveChannel.md b/old_docs/API_docs_v41/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v41/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v41/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_readHistory.md b/old_docs/API_docs_v41/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v41/methods/channels_readHistory.md +++ b/old_docs/API_docs_v41/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_reportSpam.md b/old_docs/API_docs_v41/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v41/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v41/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/channels_updateUsername.md b/old_docs/API_docs_v41/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v41/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v41/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/contacts_block.md b/old_docs/API_docs_v41/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v41/methods/contacts_block.md +++ b/old_docs/API_docs_v41/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/contacts_deleteContact.md b/old_docs/API_docs_v41/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v41/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v41/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/contacts_deleteContacts.md b/old_docs/API_docs_v41/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v41/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v41/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/contacts_importCard.md b/old_docs/API_docs_v41/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v41/methods/contacts_importCard.md +++ b/old_docs/API_docs_v41/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/contacts_search.md b/old_docs/API_docs_v41/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v41/methods/contacts_search.md +++ b/old_docs/API_docs_v41/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/contacts_unblock.md b/old_docs/API_docs_v41/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v41/methods/contacts_unblock.md +++ b/old_docs/API_docs_v41/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/help_getConfig.md b/old_docs/API_docs_v41/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v41/methods/help_getConfig.md +++ b/old_docs/API_docs_v41/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/initConnection.md b/old_docs/API_docs_v41/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v41/methods/initConnection.md +++ b/old_docs/API_docs_v41/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/invokeWithLayer.md b/old_docs/API_docs_v41/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v41/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v41/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_addChatUser.md b/old_docs/API_docs_v41/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v41/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v41/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_checkChatInvite.md b/old_docs/API_docs_v41/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v41/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v41/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_createChat.md b/old_docs/API_docs_v41/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v41/methods/messages_createChat.md +++ b/old_docs/API_docs_v41/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_deleteChatUser.md b/old_docs/API_docs_v41/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v41/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v41/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_deleteHistory.md b/old_docs/API_docs_v41/methods/messages_deleteHistory.md index 5508a7d8f..c8081e796 100644 --- a/old_docs/API_docs_v41/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v41/methods/messages_deleteHistory.md @@ -19,6 +19,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_deleteMessages.md b/old_docs/API_docs_v41/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v41/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v41/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_editChatAdmin.md b/old_docs/API_docs_v41/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v41/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v41/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_editChatPhoto.md b/old_docs/API_docs_v41/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v41/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v41/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_editChatTitle.md b/old_docs/API_docs_v41/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v41/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v41/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_exportChatInvite.md b/old_docs/API_docs_v41/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v41/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v41/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_forwardMessage.md b/old_docs/API_docs_v41/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v41/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v41/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_forwardMessages.md b/old_docs/API_docs_v41/methods/messages_forwardMessages.md index 555b71241..aea62cdfd 100644 --- a/old_docs/API_docs_v41/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v41/methods/messages_forwardMessages.md @@ -21,6 +21,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_getChats.md b/old_docs/API_docs_v41/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v41/methods/messages_getChats.md +++ b/old_docs/API_docs_v41/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_getDhConfig.md b/old_docs/API_docs_v41/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v41/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v41/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_getDialogs.md b/old_docs/API_docs_v41/methods/messages_getDialogs.md index 0ac952961..6b0e807d4 100644 --- a/old_docs/API_docs_v41/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v41/methods/messages_getDialogs.md @@ -19,6 +19,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_getHistory.md b/old_docs/API_docs_v41/methods/messages_getHistory.md index 62f2e26fa..ba9ed92d6 100644 --- a/old_docs/API_docs_v41/methods/messages_getHistory.md +++ b/old_docs/API_docs_v41/methods/messages_getHistory.md @@ -23,6 +23,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_getMessagesViews.md b/old_docs/API_docs_v41/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v41/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v41/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_getStickerSet.md b/old_docs/API_docs_v41/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v41/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v41/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_importChatInvite.md b/old_docs/API_docs_v41/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v41/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v41/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_installStickerSet.md b/old_docs/API_docs_v41/methods/messages_installStickerSet.md index 0b5053978..1969d0083 100644 --- a/old_docs/API_docs_v41/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v41/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_migrateChat.md b/old_docs/API_docs_v41/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v41/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v41/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v41/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v41/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v41/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_readHistory.md b/old_docs/API_docs_v41/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v41/methods/messages_readHistory.md +++ b/old_docs/API_docs_v41/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_receivedQueue.md b/old_docs/API_docs_v41/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v41/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v41/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_reportSpam.md b/old_docs/API_docs_v41/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v41/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v41/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_search.md b/old_docs/API_docs_v41/methods/messages_search.md index db0a07fd9..16d0d8532 100644 --- a/old_docs/API_docs_v41/methods/messages_search.md +++ b/old_docs/API_docs_v41/methods/messages_search.md @@ -26,6 +26,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_searchGlobal.md b/old_docs/API_docs_v41/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v41/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v41/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_sendEncrypted.md b/old_docs/API_docs_v41/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v41/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v41/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v41/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v41/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v41/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v41/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v41/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v41/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_sendMedia.md b/old_docs/API_docs_v41/methods/messages_sendMedia.md index c8b36ab88..1e4ebdaab 100644 --- a/old_docs/API_docs_v41/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v41/methods/messages_sendMedia.md @@ -22,6 +22,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_sendMessage.md b/old_docs/API_docs_v41/methods/messages_sendMessage.md index ef590c9d7..723c2f652 100644 --- a/old_docs/API_docs_v41/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v41/methods/messages_sendMessage.md @@ -25,6 +25,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v41/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v41/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v41/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_setTyping.md b/old_docs/API_docs_v41/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v41/methods/messages_setTyping.md +++ b/old_docs/API_docs_v41/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_startBot.md b/old_docs/API_docs_v41/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v41/methods/messages_startBot.md +++ b/old_docs/API_docs_v41/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v41/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v41/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v41/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v41/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v41/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v41/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/photos_getUserPhotos.md b/old_docs/API_docs_v41/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v41/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v41/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v41/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v41/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v41/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v41/methods/users_getUsers.md b/old_docs/API_docs_v41/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v41/methods/users_getUsers.md +++ b/old_docs/API_docs_v41/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_changePhone.md b/old_docs/API_docs_v42/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v42/methods/account_changePhone.md +++ b/old_docs/API_docs_v42/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_checkUsername.md b/old_docs/API_docs_v42/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v42/methods/account_checkUsername.md +++ b/old_docs/API_docs_v42/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_getNotifySettings.md b/old_docs/API_docs_v42/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v42/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v42/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_getPasswordSettings.md b/old_docs/API_docs_v42/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v42/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v42/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_getPrivacy.md b/old_docs/API_docs_v42/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v42/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v42/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_registerDevice.md b/old_docs/API_docs_v42/methods/account_registerDevice.md index 58e9988f1..ab7ec933f 100644 --- a/old_docs/API_docs_v42/methods/account_registerDevice.md +++ b/old_docs/API_docs_v42/methods/account_registerDevice.md @@ -24,6 +24,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_resetAuthorization.md b/old_docs/API_docs_v42/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v42/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v42/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v42/methods/account_sendChangePhoneCode.md index b31df77ce..650dba72d 100644 --- a/old_docs/API_docs_v42/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v42/methods/account_sendChangePhoneCode.md @@ -18,6 +18,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_setAccountTTL.md b/old_docs/API_docs_v42/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v42/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v42/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_setPrivacy.md b/old_docs/API_docs_v42/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v42/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v42/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_unregisterDevice.md b/old_docs/API_docs_v42/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v42/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v42/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_updateNotifySettings.md b/old_docs/API_docs_v42/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v42/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v42/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v42/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v42/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v42/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_updateProfile.md b/old_docs/API_docs_v42/methods/account_updateProfile.md index af2c8f572..c87120746 100644 --- a/old_docs/API_docs_v42/methods/account_updateProfile.md +++ b/old_docs/API_docs_v42/methods/account_updateProfile.md @@ -19,6 +19,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_updateStatus.md b/old_docs/API_docs_v42/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v42/methods/account_updateStatus.md +++ b/old_docs/API_docs_v42/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/account_updateUsername.md b/old_docs/API_docs_v42/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v42/methods/account_updateUsername.md +++ b/old_docs/API_docs_v42/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v42/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v42/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v42/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/auth_checkPassword.md b/old_docs/API_docs_v42/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v42/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v42/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/auth_checkPhone.md b/old_docs/API_docs_v42/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v42/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v42/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/auth_exportAuthorization.md b/old_docs/API_docs_v42/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v42/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v42/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/auth_importAuthorization.md b/old_docs/API_docs_v42/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v42/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v42/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/auth_recoverPassword.md b/old_docs/API_docs_v42/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v42/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v42/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v42/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v42/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v42/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v42/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v42/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v42/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/auth_sendInvites.md b/old_docs/API_docs_v42/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v42/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v42/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_checkUsername.md b/old_docs/API_docs_v42/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v42/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v42/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_createChannel.md b/old_docs/API_docs_v42/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v42/methods/channels_createChannel.md +++ b/old_docs/API_docs_v42/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_deleteChannel.md b/old_docs/API_docs_v42/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v42/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v42/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_deleteMessages.md b/old_docs/API_docs_v42/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v42/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v42/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v42/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v42/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v42/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_editAbout.md b/old_docs/API_docs_v42/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v42/methods/channels_editAbout.md +++ b/old_docs/API_docs_v42/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_editAdmin.md b/old_docs/API_docs_v42/methods/channels_editAdmin.md index cb8212977..7707bdfe7 100644 --- a/old_docs/API_docs_v42/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v42/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_editPhoto.md b/old_docs/API_docs_v42/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v42/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v42/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_editTitle.md b/old_docs/API_docs_v42/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v42/methods/channels_editTitle.md +++ b/old_docs/API_docs_v42/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_exportInvite.md b/old_docs/API_docs_v42/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v42/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v42/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_getChannels.md b/old_docs/API_docs_v42/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v42/methods/channels_getChannels.md +++ b/old_docs/API_docs_v42/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_getMessages.md b/old_docs/API_docs_v42/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v42/methods/channels_getMessages.md +++ b/old_docs/API_docs_v42/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_getParticipant.md b/old_docs/API_docs_v42/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v42/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v42/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_inviteToChannel.md b/old_docs/API_docs_v42/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v42/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v42/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_joinChannel.md b/old_docs/API_docs_v42/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v42/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v42/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_leaveChannel.md b/old_docs/API_docs_v42/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v42/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v42/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_readHistory.md b/old_docs/API_docs_v42/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v42/methods/channels_readHistory.md +++ b/old_docs/API_docs_v42/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_reportSpam.md b/old_docs/API_docs_v42/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v42/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v42/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/channels_updateUsername.md b/old_docs/API_docs_v42/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v42/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v42/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/contacts_block.md b/old_docs/API_docs_v42/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v42/methods/contacts_block.md +++ b/old_docs/API_docs_v42/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/contacts_deleteContact.md b/old_docs/API_docs_v42/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v42/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v42/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/contacts_deleteContacts.md b/old_docs/API_docs_v42/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v42/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v42/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/contacts_importCard.md b/old_docs/API_docs_v42/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v42/methods/contacts_importCard.md +++ b/old_docs/API_docs_v42/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/contacts_search.md b/old_docs/API_docs_v42/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v42/methods/contacts_search.md +++ b/old_docs/API_docs_v42/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/contacts_unblock.md b/old_docs/API_docs_v42/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v42/methods/contacts_unblock.md +++ b/old_docs/API_docs_v42/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/help_getConfig.md b/old_docs/API_docs_v42/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v42/methods/help_getConfig.md +++ b/old_docs/API_docs_v42/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/initConnection.md b/old_docs/API_docs_v42/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v42/methods/initConnection.md +++ b/old_docs/API_docs_v42/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/invokeWithLayer.md b/old_docs/API_docs_v42/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v42/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v42/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_addChatUser.md b/old_docs/API_docs_v42/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v42/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v42/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_checkChatInvite.md b/old_docs/API_docs_v42/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v42/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v42/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_createChat.md b/old_docs/API_docs_v42/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v42/methods/messages_createChat.md +++ b/old_docs/API_docs_v42/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_deleteChatUser.md b/old_docs/API_docs_v42/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v42/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v42/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_deleteHistory.md b/old_docs/API_docs_v42/methods/messages_deleteHistory.md index 5508a7d8f..c8081e796 100644 --- a/old_docs/API_docs_v42/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v42/methods/messages_deleteHistory.md @@ -19,6 +19,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_deleteMessages.md b/old_docs/API_docs_v42/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v42/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v42/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_editChatAdmin.md b/old_docs/API_docs_v42/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v42/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v42/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_editChatPhoto.md b/old_docs/API_docs_v42/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v42/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v42/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_editChatTitle.md b/old_docs/API_docs_v42/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v42/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v42/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_exportChatInvite.md b/old_docs/API_docs_v42/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v42/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v42/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_forwardMessage.md b/old_docs/API_docs_v42/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v42/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v42/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_forwardMessages.md b/old_docs/API_docs_v42/methods/messages_forwardMessages.md index 555b71241..aea62cdfd 100644 --- a/old_docs/API_docs_v42/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v42/methods/messages_forwardMessages.md @@ -21,6 +21,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_getChats.md b/old_docs/API_docs_v42/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v42/methods/messages_getChats.md +++ b/old_docs/API_docs_v42/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_getDhConfig.md b/old_docs/API_docs_v42/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v42/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v42/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_getDialogs.md b/old_docs/API_docs_v42/methods/messages_getDialogs.md index d59c49555..4c278eae2 100644 --- a/old_docs/API_docs_v42/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v42/methods/messages_getDialogs.md @@ -21,6 +21,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_getHistory.md b/old_docs/API_docs_v42/methods/messages_getHistory.md index 62f2e26fa..ba9ed92d6 100644 --- a/old_docs/API_docs_v42/methods/messages_getHistory.md +++ b/old_docs/API_docs_v42/methods/messages_getHistory.md @@ -23,6 +23,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_getMessagesViews.md b/old_docs/API_docs_v42/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v42/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v42/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_getStickerSet.md b/old_docs/API_docs_v42/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v42/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v42/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_importChatInvite.md b/old_docs/API_docs_v42/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v42/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v42/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_installStickerSet.md b/old_docs/API_docs_v42/methods/messages_installStickerSet.md index 0b5053978..1969d0083 100644 --- a/old_docs/API_docs_v42/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v42/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_migrateChat.md b/old_docs/API_docs_v42/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v42/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v42/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v42/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v42/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v42/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_readHistory.md b/old_docs/API_docs_v42/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v42/methods/messages_readHistory.md +++ b/old_docs/API_docs_v42/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_receivedQueue.md b/old_docs/API_docs_v42/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v42/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v42/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_reportSpam.md b/old_docs/API_docs_v42/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v42/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v42/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_search.md b/old_docs/API_docs_v42/methods/messages_search.md index db0a07fd9..16d0d8532 100644 --- a/old_docs/API_docs_v42/methods/messages_search.md +++ b/old_docs/API_docs_v42/methods/messages_search.md @@ -26,6 +26,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_searchGlobal.md b/old_docs/API_docs_v42/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v42/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v42/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_sendEncrypted.md b/old_docs/API_docs_v42/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v42/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v42/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v42/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v42/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v42/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v42/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v42/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v42/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_sendMedia.md b/old_docs/API_docs_v42/methods/messages_sendMedia.md index c8b36ab88..1e4ebdaab 100644 --- a/old_docs/API_docs_v42/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v42/methods/messages_sendMedia.md @@ -22,6 +22,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_sendMessage.md b/old_docs/API_docs_v42/methods/messages_sendMessage.md index ef590c9d7..723c2f652 100644 --- a/old_docs/API_docs_v42/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v42/methods/messages_sendMessage.md @@ -25,6 +25,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v42/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v42/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v42/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_setTyping.md b/old_docs/API_docs_v42/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v42/methods/messages_setTyping.md +++ b/old_docs/API_docs_v42/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_startBot.md b/old_docs/API_docs_v42/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v42/methods/messages_startBot.md +++ b/old_docs/API_docs_v42/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v42/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v42/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v42/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v42/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v42/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v42/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/photos_getUserPhotos.md b/old_docs/API_docs_v42/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v42/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v42/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v42/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v42/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v42/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v42/methods/users_getUsers.md b/old_docs/API_docs_v42/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v42/methods/users_getUsers.md +++ b/old_docs/API_docs_v42/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_changePhone.md b/old_docs/API_docs_v44/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v44/methods/account_changePhone.md +++ b/old_docs/API_docs_v44/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_checkUsername.md b/old_docs/API_docs_v44/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v44/methods/account_checkUsername.md +++ b/old_docs/API_docs_v44/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_getNotifySettings.md b/old_docs/API_docs_v44/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v44/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v44/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_getPasswordSettings.md b/old_docs/API_docs_v44/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v44/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v44/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_getPrivacy.md b/old_docs/API_docs_v44/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v44/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v44/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_registerDevice.md b/old_docs/API_docs_v44/methods/account_registerDevice.md index 58e9988f1..ab7ec933f 100644 --- a/old_docs/API_docs_v44/methods/account_registerDevice.md +++ b/old_docs/API_docs_v44/methods/account_registerDevice.md @@ -24,6 +24,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_reportPeer.md b/old_docs/API_docs_v44/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v44/methods/account_reportPeer.md +++ b/old_docs/API_docs_v44/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_resetAuthorization.md b/old_docs/API_docs_v44/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v44/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v44/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v44/methods/account_sendChangePhoneCode.md index b31df77ce..650dba72d 100644 --- a/old_docs/API_docs_v44/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v44/methods/account_sendChangePhoneCode.md @@ -18,6 +18,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_setAccountTTL.md b/old_docs/API_docs_v44/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v44/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v44/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_setPrivacy.md b/old_docs/API_docs_v44/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v44/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v44/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_unregisterDevice.md b/old_docs/API_docs_v44/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v44/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v44/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_updateNotifySettings.md b/old_docs/API_docs_v44/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v44/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v44/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v44/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v44/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v44/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_updateProfile.md b/old_docs/API_docs_v44/methods/account_updateProfile.md index af2c8f572..c87120746 100644 --- a/old_docs/API_docs_v44/methods/account_updateProfile.md +++ b/old_docs/API_docs_v44/methods/account_updateProfile.md @@ -19,6 +19,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_updateStatus.md b/old_docs/API_docs_v44/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v44/methods/account_updateStatus.md +++ b/old_docs/API_docs_v44/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/account_updateUsername.md b/old_docs/API_docs_v44/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v44/methods/account_updateUsername.md +++ b/old_docs/API_docs_v44/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v44/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v44/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v44/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/auth_checkPassword.md b/old_docs/API_docs_v44/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v44/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v44/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/auth_checkPhone.md b/old_docs/API_docs_v44/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v44/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v44/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/auth_exportAuthorization.md b/old_docs/API_docs_v44/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v44/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v44/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/auth_importAuthorization.md b/old_docs/API_docs_v44/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v44/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v44/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/auth_recoverPassword.md b/old_docs/API_docs_v44/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v44/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v44/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v44/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v44/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v44/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v44/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v44/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v44/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/auth_sendInvites.md b/old_docs/API_docs_v44/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v44/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v44/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_checkUsername.md b/old_docs/API_docs_v44/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v44/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v44/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_createChannel.md b/old_docs/API_docs_v44/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v44/methods/channels_createChannel.md +++ b/old_docs/API_docs_v44/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_deleteChannel.md b/old_docs/API_docs_v44/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v44/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v44/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_deleteMessages.md b/old_docs/API_docs_v44/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v44/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v44/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v44/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v44/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v44/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_editAbout.md b/old_docs/API_docs_v44/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v44/methods/channels_editAbout.md +++ b/old_docs/API_docs_v44/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_editAdmin.md b/old_docs/API_docs_v44/methods/channels_editAdmin.md index cb8212977..7707bdfe7 100644 --- a/old_docs/API_docs_v44/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v44/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_editPhoto.md b/old_docs/API_docs_v44/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v44/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v44/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_editTitle.md b/old_docs/API_docs_v44/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v44/methods/channels_editTitle.md +++ b/old_docs/API_docs_v44/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_exportInvite.md b/old_docs/API_docs_v44/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v44/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v44/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_getChannels.md b/old_docs/API_docs_v44/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v44/methods/channels_getChannels.md +++ b/old_docs/API_docs_v44/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_getMessages.md b/old_docs/API_docs_v44/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v44/methods/channels_getMessages.md +++ b/old_docs/API_docs_v44/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_getParticipant.md b/old_docs/API_docs_v44/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v44/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v44/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_inviteToChannel.md b/old_docs/API_docs_v44/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v44/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v44/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_joinChannel.md b/old_docs/API_docs_v44/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v44/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v44/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_leaveChannel.md b/old_docs/API_docs_v44/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v44/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v44/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_readHistory.md b/old_docs/API_docs_v44/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v44/methods/channels_readHistory.md +++ b/old_docs/API_docs_v44/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_reportSpam.md b/old_docs/API_docs_v44/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v44/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v44/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/channels_updateUsername.md b/old_docs/API_docs_v44/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v44/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v44/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/contacts_block.md b/old_docs/API_docs_v44/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v44/methods/contacts_block.md +++ b/old_docs/API_docs_v44/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/contacts_deleteContact.md b/old_docs/API_docs_v44/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v44/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v44/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/contacts_deleteContacts.md b/old_docs/API_docs_v44/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v44/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v44/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/contacts_importCard.md b/old_docs/API_docs_v44/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v44/methods/contacts_importCard.md +++ b/old_docs/API_docs_v44/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/contacts_search.md b/old_docs/API_docs_v44/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v44/methods/contacts_search.md +++ b/old_docs/API_docs_v44/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/contacts_unblock.md b/old_docs/API_docs_v44/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v44/methods/contacts_unblock.md +++ b/old_docs/API_docs_v44/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/help_getConfig.md b/old_docs/API_docs_v44/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v44/methods/help_getConfig.md +++ b/old_docs/API_docs_v44/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/initConnection.md b/old_docs/API_docs_v44/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v44/methods/initConnection.md +++ b/old_docs/API_docs_v44/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/invokeWithLayer.md b/old_docs/API_docs_v44/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v44/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v44/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_addChatUser.md b/old_docs/API_docs_v44/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v44/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v44/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_checkChatInvite.md b/old_docs/API_docs_v44/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v44/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v44/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_createChat.md b/old_docs/API_docs_v44/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v44/methods/messages_createChat.md +++ b/old_docs/API_docs_v44/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_deleteChatUser.md b/old_docs/API_docs_v44/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v44/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v44/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_deleteHistory.md b/old_docs/API_docs_v44/methods/messages_deleteHistory.md index 5508a7d8f..c8081e796 100644 --- a/old_docs/API_docs_v44/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v44/methods/messages_deleteHistory.md @@ -19,6 +19,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_deleteMessages.md b/old_docs/API_docs_v44/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v44/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v44/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_editChatAdmin.md b/old_docs/API_docs_v44/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v44/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v44/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_editChatPhoto.md b/old_docs/API_docs_v44/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v44/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v44/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_editChatTitle.md b/old_docs/API_docs_v44/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v44/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v44/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_exportChatInvite.md b/old_docs/API_docs_v44/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v44/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v44/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_forwardMessage.md b/old_docs/API_docs_v44/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v44/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v44/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_forwardMessages.md b/old_docs/API_docs_v44/methods/messages_forwardMessages.md index 555b71241..aea62cdfd 100644 --- a/old_docs/API_docs_v44/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v44/methods/messages_forwardMessages.md @@ -21,6 +21,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_getChats.md b/old_docs/API_docs_v44/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v44/methods/messages_getChats.md +++ b/old_docs/API_docs_v44/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_getDhConfig.md b/old_docs/API_docs_v44/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v44/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v44/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_getDialogs.md b/old_docs/API_docs_v44/methods/messages_getDialogs.md index d59c49555..4c278eae2 100644 --- a/old_docs/API_docs_v44/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v44/methods/messages_getDialogs.md @@ -21,6 +21,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v44/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/old_docs/API_docs_v44/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v44/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_getHistory.md b/old_docs/API_docs_v44/methods/messages_getHistory.md index 62f2e26fa..ba9ed92d6 100644 --- a/old_docs/API_docs_v44/methods/messages_getHistory.md +++ b/old_docs/API_docs_v44/methods/messages_getHistory.md @@ -23,6 +23,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_getMessagesViews.md b/old_docs/API_docs_v44/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v44/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v44/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_getStickerSet.md b/old_docs/API_docs_v44/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v44/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v44/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_importChatInvite.md b/old_docs/API_docs_v44/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v44/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v44/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_installStickerSet.md b/old_docs/API_docs_v44/methods/messages_installStickerSet.md index 0b5053978..1969d0083 100644 --- a/old_docs/API_docs_v44/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v44/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_migrateChat.md b/old_docs/API_docs_v44/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v44/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v44/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v44/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v44/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v44/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_readHistory.md b/old_docs/API_docs_v44/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v44/methods/messages_readHistory.md +++ b/old_docs/API_docs_v44/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_receivedQueue.md b/old_docs/API_docs_v44/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v44/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v44/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_reportSpam.md b/old_docs/API_docs_v44/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v44/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v44/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_search.md b/old_docs/API_docs_v44/methods/messages_search.md index db0a07fd9..16d0d8532 100644 --- a/old_docs/API_docs_v44/methods/messages_search.md +++ b/old_docs/API_docs_v44/methods/messages_search.md @@ -26,6 +26,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_searchGifs.md b/old_docs/API_docs_v44/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/old_docs/API_docs_v44/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v44/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_searchGlobal.md b/old_docs/API_docs_v44/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v44/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v44/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_sendEncrypted.md b/old_docs/API_docs_v44/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v44/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v44/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v44/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v44/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v44/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v44/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v44/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v44/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_sendMedia.md b/old_docs/API_docs_v44/methods/messages_sendMedia.md index c8b36ab88..1e4ebdaab 100644 --- a/old_docs/API_docs_v44/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v44/methods/messages_sendMedia.md @@ -22,6 +22,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_sendMessage.md b/old_docs/API_docs_v44/methods/messages_sendMessage.md index ef590c9d7..723c2f652 100644 --- a/old_docs/API_docs_v44/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v44/methods/messages_sendMessage.md @@ -25,6 +25,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v44/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v44/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v44/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_setTyping.md b/old_docs/API_docs_v44/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v44/methods/messages_setTyping.md +++ b/old_docs/API_docs_v44/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_startBot.md b/old_docs/API_docs_v44/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v44/methods/messages_startBot.md +++ b/old_docs/API_docs_v44/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v44/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v44/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v44/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v44/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v44/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v44/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/photos_getUserPhotos.md b/old_docs/API_docs_v44/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v44/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v44/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v44/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v44/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v44/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v44/methods/users_getUsers.md b/old_docs/API_docs_v44/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v44/methods/users_getUsers.md +++ b/old_docs/API_docs_v44/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_changePhone.md b/old_docs/API_docs_v45/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v45/methods/account_changePhone.md +++ b/old_docs/API_docs_v45/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_checkUsername.md b/old_docs/API_docs_v45/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v45/methods/account_checkUsername.md +++ b/old_docs/API_docs_v45/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_getNotifySettings.md b/old_docs/API_docs_v45/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v45/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v45/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_getPasswordSettings.md b/old_docs/API_docs_v45/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v45/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v45/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_getPrivacy.md b/old_docs/API_docs_v45/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v45/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v45/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_registerDevice.md b/old_docs/API_docs_v45/methods/account_registerDevice.md index 58e9988f1..ab7ec933f 100644 --- a/old_docs/API_docs_v45/methods/account_registerDevice.md +++ b/old_docs/API_docs_v45/methods/account_registerDevice.md @@ -24,6 +24,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_reportPeer.md b/old_docs/API_docs_v45/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v45/methods/account_reportPeer.md +++ b/old_docs/API_docs_v45/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_resetAuthorization.md b/old_docs/API_docs_v45/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v45/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v45/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v45/methods/account_sendChangePhoneCode.md index b31df77ce..650dba72d 100644 --- a/old_docs/API_docs_v45/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v45/methods/account_sendChangePhoneCode.md @@ -18,6 +18,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_setAccountTTL.md b/old_docs/API_docs_v45/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v45/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v45/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_setPrivacy.md b/old_docs/API_docs_v45/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v45/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v45/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_unregisterDevice.md b/old_docs/API_docs_v45/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v45/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v45/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_updateNotifySettings.md b/old_docs/API_docs_v45/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v45/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v45/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v45/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v45/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v45/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_updateProfile.md b/old_docs/API_docs_v45/methods/account_updateProfile.md index af2c8f572..c87120746 100644 --- a/old_docs/API_docs_v45/methods/account_updateProfile.md +++ b/old_docs/API_docs_v45/methods/account_updateProfile.md @@ -19,6 +19,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_updateStatus.md b/old_docs/API_docs_v45/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v45/methods/account_updateStatus.md +++ b/old_docs/API_docs_v45/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/account_updateUsername.md b/old_docs/API_docs_v45/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v45/methods/account_updateUsername.md +++ b/old_docs/API_docs_v45/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v45/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v45/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v45/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/auth_checkPassword.md b/old_docs/API_docs_v45/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v45/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v45/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/auth_checkPhone.md b/old_docs/API_docs_v45/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v45/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v45/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/auth_exportAuthorization.md b/old_docs/API_docs_v45/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v45/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v45/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/auth_importAuthorization.md b/old_docs/API_docs_v45/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v45/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v45/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/auth_recoverPassword.md b/old_docs/API_docs_v45/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v45/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v45/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v45/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v45/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v45/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v45/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v45/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v45/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/auth_sendInvites.md b/old_docs/API_docs_v45/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v45/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v45/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_checkUsername.md b/old_docs/API_docs_v45/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v45/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v45/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_createChannel.md b/old_docs/API_docs_v45/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v45/methods/channels_createChannel.md +++ b/old_docs/API_docs_v45/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_deleteChannel.md b/old_docs/API_docs_v45/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v45/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v45/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_deleteMessages.md b/old_docs/API_docs_v45/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v45/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v45/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v45/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v45/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v45/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_editAbout.md b/old_docs/API_docs_v45/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v45/methods/channels_editAbout.md +++ b/old_docs/API_docs_v45/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_editAdmin.md b/old_docs/API_docs_v45/methods/channels_editAdmin.md index cb8212977..7707bdfe7 100644 --- a/old_docs/API_docs_v45/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v45/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_editPhoto.md b/old_docs/API_docs_v45/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v45/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v45/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_editTitle.md b/old_docs/API_docs_v45/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v45/methods/channels_editTitle.md +++ b/old_docs/API_docs_v45/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_exportInvite.md b/old_docs/API_docs_v45/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v45/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v45/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_getChannels.md b/old_docs/API_docs_v45/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v45/methods/channels_getChannels.md +++ b/old_docs/API_docs_v45/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_getMessages.md b/old_docs/API_docs_v45/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v45/methods/channels_getMessages.md +++ b/old_docs/API_docs_v45/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_getParticipant.md b/old_docs/API_docs_v45/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v45/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v45/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_inviteToChannel.md b/old_docs/API_docs_v45/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v45/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v45/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_joinChannel.md b/old_docs/API_docs_v45/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v45/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v45/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_leaveChannel.md b/old_docs/API_docs_v45/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v45/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v45/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_readHistory.md b/old_docs/API_docs_v45/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v45/methods/channels_readHistory.md +++ b/old_docs/API_docs_v45/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_reportSpam.md b/old_docs/API_docs_v45/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v45/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v45/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/channels_updateUsername.md b/old_docs/API_docs_v45/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v45/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v45/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/contacts_block.md b/old_docs/API_docs_v45/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v45/methods/contacts_block.md +++ b/old_docs/API_docs_v45/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/contacts_deleteContact.md b/old_docs/API_docs_v45/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v45/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v45/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/contacts_deleteContacts.md b/old_docs/API_docs_v45/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v45/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v45/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/contacts_importCard.md b/old_docs/API_docs_v45/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v45/methods/contacts_importCard.md +++ b/old_docs/API_docs_v45/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/contacts_search.md b/old_docs/API_docs_v45/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v45/methods/contacts_search.md +++ b/old_docs/API_docs_v45/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/contacts_unblock.md b/old_docs/API_docs_v45/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v45/methods/contacts_unblock.md +++ b/old_docs/API_docs_v45/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/help_getConfig.md b/old_docs/API_docs_v45/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v45/methods/help_getConfig.md +++ b/old_docs/API_docs_v45/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/initConnection.md b/old_docs/API_docs_v45/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v45/methods/initConnection.md +++ b/old_docs/API_docs_v45/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/invokeWithLayer.md b/old_docs/API_docs_v45/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v45/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v45/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_addChatUser.md b/old_docs/API_docs_v45/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v45/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v45/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_checkChatInvite.md b/old_docs/API_docs_v45/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v45/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v45/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_createChat.md b/old_docs/API_docs_v45/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v45/methods/messages_createChat.md +++ b/old_docs/API_docs_v45/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_deleteChatUser.md b/old_docs/API_docs_v45/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v45/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v45/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_deleteHistory.md b/old_docs/API_docs_v45/methods/messages_deleteHistory.md index 5508a7d8f..c8081e796 100644 --- a/old_docs/API_docs_v45/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v45/methods/messages_deleteHistory.md @@ -19,6 +19,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_deleteMessages.md b/old_docs/API_docs_v45/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v45/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v45/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_editChatAdmin.md b/old_docs/API_docs_v45/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v45/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v45/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_editChatPhoto.md b/old_docs/API_docs_v45/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v45/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v45/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_editChatTitle.md b/old_docs/API_docs_v45/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v45/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v45/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_exportChatInvite.md b/old_docs/API_docs_v45/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v45/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v45/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_forwardMessage.md b/old_docs/API_docs_v45/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v45/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v45/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_forwardMessages.md b/old_docs/API_docs_v45/methods/messages_forwardMessages.md index 555b71241..aea62cdfd 100644 --- a/old_docs/API_docs_v45/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v45/methods/messages_forwardMessages.md @@ -21,6 +21,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_getChats.md b/old_docs/API_docs_v45/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v45/methods/messages_getChats.md +++ b/old_docs/API_docs_v45/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_getDhConfig.md b/old_docs/API_docs_v45/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v45/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v45/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_getDialogs.md b/old_docs/API_docs_v45/methods/messages_getDialogs.md index d59c49555..4c278eae2 100644 --- a/old_docs/API_docs_v45/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v45/methods/messages_getDialogs.md @@ -21,6 +21,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v45/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/old_docs/API_docs_v45/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v45/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_getHistory.md b/old_docs/API_docs_v45/methods/messages_getHistory.md index 62f2e26fa..ba9ed92d6 100644 --- a/old_docs/API_docs_v45/methods/messages_getHistory.md +++ b/old_docs/API_docs_v45/methods/messages_getHistory.md @@ -23,6 +23,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v45/methods/messages_getInlineBotResults.md index 1a1b05cff..fb592bcf4 100644 --- a/old_docs/API_docs_v45/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v45/methods/messages_getInlineBotResults.md @@ -20,6 +20,16 @@ description: messages.getInlineBotResults parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INLINE_DISABLED|This bot can't be used in inline mode| +|BOT_INVALID|This is not a valid bot| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_getMessagesViews.md b/old_docs/API_docs_v45/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v45/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v45/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_getStickerSet.md b/old_docs/API_docs_v45/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v45/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v45/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_importChatInvite.md b/old_docs/API_docs_v45/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v45/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v45/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_installStickerSet.md b/old_docs/API_docs_v45/methods/messages_installStickerSet.md index 0b5053978..1969d0083 100644 --- a/old_docs/API_docs_v45/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v45/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_migrateChat.md b/old_docs/API_docs_v45/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v45/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v45/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v45/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v45/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v45/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_readHistory.md b/old_docs/API_docs_v45/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v45/methods/messages_readHistory.md +++ b/old_docs/API_docs_v45/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_receivedQueue.md b/old_docs/API_docs_v45/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v45/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v45/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_reportSpam.md b/old_docs/API_docs_v45/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v45/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v45/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_saveGif.md b/old_docs/API_docs_v45/methods/messages_saveGif.md index 2d41d5338..31e486320 100644 --- a/old_docs/API_docs_v45/methods/messages_saveGif.md +++ b/old_docs/API_docs_v45/methods/messages_saveGif.md @@ -19,6 +19,13 @@ description: messages.saveGif parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|GIF_ID_INVALID|The provided GIF ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_search.md b/old_docs/API_docs_v45/methods/messages_search.md index db0a07fd9..16d0d8532 100644 --- a/old_docs/API_docs_v45/methods/messages_search.md +++ b/old_docs/API_docs_v45/methods/messages_search.md @@ -26,6 +26,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_searchGifs.md b/old_docs/API_docs_v45/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/old_docs/API_docs_v45/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v45/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_searchGlobal.md b/old_docs/API_docs_v45/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v45/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v45/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_sendEncrypted.md b/old_docs/API_docs_v45/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v45/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v45/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v45/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v45/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v45/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v45/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v45/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v45/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v45/methods/messages_sendInlineBotResult.md index 530d02550..c4f8601f1 100644 --- a/old_docs/API_docs_v45/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v45/methods/messages_sendInlineBotResult.md @@ -22,6 +22,16 @@ description: messages.sendInlineBotResult parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INLINE_RESULT_EXPIRED|The inline query expired| +|PEER_ID_INVALID|The provided peer id is invalid| +|QUERY_ID_EMPTY|The query ID is empty| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_sendMedia.md b/old_docs/API_docs_v45/methods/messages_sendMedia.md index c8b36ab88..1e4ebdaab 100644 --- a/old_docs/API_docs_v45/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v45/methods/messages_sendMedia.md @@ -22,6 +22,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_sendMessage.md b/old_docs/API_docs_v45/methods/messages_sendMessage.md index ef590c9d7..723c2f652 100644 --- a/old_docs/API_docs_v45/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v45/methods/messages_sendMessage.md @@ -25,6 +25,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v45/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v45/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v45/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v45/methods/messages_setInlineBotResults.md index d31f0a435..e347494bb 100644 --- a/old_docs/API_docs_v45/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v45/methods/messages_setInlineBotResults.md @@ -23,6 +23,23 @@ description: messages.setInlineBotResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ARTICLE_TITLE_EMPTY|The title of the article is empty| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|MESSAGE_EMPTY|The provided message is empty| +|QUERY_ID_INVALID|The query ID is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|RESULT_TYPE_INVALID|Result type invalid| +|SEND_MESSAGE_TYPE_INVALID|The message type is invalid| +|START_PARAM_INVALID|Start parameter invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_setTyping.md b/old_docs/API_docs_v45/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v45/methods/messages_setTyping.md +++ b/old_docs/API_docs_v45/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_startBot.md b/old_docs/API_docs_v45/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v45/methods/messages_startBot.md +++ b/old_docs/API_docs_v45/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v45/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v45/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v45/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v45/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v45/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v45/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/photos_getUserPhotos.md b/old_docs/API_docs_v45/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v45/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v45/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v45/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v45/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v45/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v45/methods/users_getUsers.md b/old_docs/API_docs_v45/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v45/methods/users_getUsers.md +++ b/old_docs/API_docs_v45/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_changePhone.md b/old_docs/API_docs_v46/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v46/methods/account_changePhone.md +++ b/old_docs/API_docs_v46/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_checkUsername.md b/old_docs/API_docs_v46/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v46/methods/account_checkUsername.md +++ b/old_docs/API_docs_v46/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_getNotifySettings.md b/old_docs/API_docs_v46/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v46/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v46/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_getPasswordSettings.md b/old_docs/API_docs_v46/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v46/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v46/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_getPrivacy.md b/old_docs/API_docs_v46/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v46/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v46/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_registerDevice.md b/old_docs/API_docs_v46/methods/account_registerDevice.md index 58e9988f1..ab7ec933f 100644 --- a/old_docs/API_docs_v46/methods/account_registerDevice.md +++ b/old_docs/API_docs_v46/methods/account_registerDevice.md @@ -24,6 +24,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_reportPeer.md b/old_docs/API_docs_v46/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v46/methods/account_reportPeer.md +++ b/old_docs/API_docs_v46/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_resetAuthorization.md b/old_docs/API_docs_v46/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v46/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v46/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v46/methods/account_sendChangePhoneCode.md index b31df77ce..650dba72d 100644 --- a/old_docs/API_docs_v46/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v46/methods/account_sendChangePhoneCode.md @@ -18,6 +18,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_setAccountTTL.md b/old_docs/API_docs_v46/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v46/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v46/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_setPrivacy.md b/old_docs/API_docs_v46/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v46/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v46/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_unregisterDevice.md b/old_docs/API_docs_v46/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v46/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v46/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_updateNotifySettings.md b/old_docs/API_docs_v46/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v46/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v46/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v46/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v46/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v46/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_updateProfile.md b/old_docs/API_docs_v46/methods/account_updateProfile.md index af2c8f572..c87120746 100644 --- a/old_docs/API_docs_v46/methods/account_updateProfile.md +++ b/old_docs/API_docs_v46/methods/account_updateProfile.md @@ -19,6 +19,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_updateStatus.md b/old_docs/API_docs_v46/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v46/methods/account_updateStatus.md +++ b/old_docs/API_docs_v46/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/account_updateUsername.md b/old_docs/API_docs_v46/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v46/methods/account_updateUsername.md +++ b/old_docs/API_docs_v46/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v46/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v46/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v46/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/auth_checkPassword.md b/old_docs/API_docs_v46/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v46/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v46/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/auth_checkPhone.md b/old_docs/API_docs_v46/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v46/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v46/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/auth_exportAuthorization.md b/old_docs/API_docs_v46/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v46/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v46/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/auth_importAuthorization.md b/old_docs/API_docs_v46/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v46/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v46/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/auth_recoverPassword.md b/old_docs/API_docs_v46/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v46/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v46/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v46/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v46/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v46/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v46/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v46/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v46/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/auth_sendInvites.md b/old_docs/API_docs_v46/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v46/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v46/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_checkUsername.md b/old_docs/API_docs_v46/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v46/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v46/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_createChannel.md b/old_docs/API_docs_v46/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v46/methods/channels_createChannel.md +++ b/old_docs/API_docs_v46/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_deleteChannel.md b/old_docs/API_docs_v46/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v46/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v46/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_deleteMessages.md b/old_docs/API_docs_v46/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v46/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v46/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v46/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v46/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v46/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_editAbout.md b/old_docs/API_docs_v46/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v46/methods/channels_editAbout.md +++ b/old_docs/API_docs_v46/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_editAdmin.md b/old_docs/API_docs_v46/methods/channels_editAdmin.md index cb8212977..7707bdfe7 100644 --- a/old_docs/API_docs_v46/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v46/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_editPhoto.md b/old_docs/API_docs_v46/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v46/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v46/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_editTitle.md b/old_docs/API_docs_v46/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v46/methods/channels_editTitle.md +++ b/old_docs/API_docs_v46/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_exportInvite.md b/old_docs/API_docs_v46/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v46/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v46/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_getChannels.md b/old_docs/API_docs_v46/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v46/methods/channels_getChannels.md +++ b/old_docs/API_docs_v46/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_getMessages.md b/old_docs/API_docs_v46/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v46/methods/channels_getMessages.md +++ b/old_docs/API_docs_v46/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_getParticipant.md b/old_docs/API_docs_v46/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v46/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v46/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_inviteToChannel.md b/old_docs/API_docs_v46/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v46/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v46/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_joinChannel.md b/old_docs/API_docs_v46/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v46/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v46/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_leaveChannel.md b/old_docs/API_docs_v46/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v46/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v46/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_readHistory.md b/old_docs/API_docs_v46/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v46/methods/channels_readHistory.md +++ b/old_docs/API_docs_v46/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_reportSpam.md b/old_docs/API_docs_v46/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v46/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v46/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/channels_updateUsername.md b/old_docs/API_docs_v46/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v46/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v46/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/contacts_block.md b/old_docs/API_docs_v46/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v46/methods/contacts_block.md +++ b/old_docs/API_docs_v46/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/contacts_deleteContact.md b/old_docs/API_docs_v46/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v46/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v46/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/contacts_deleteContacts.md b/old_docs/API_docs_v46/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v46/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v46/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/contacts_importCard.md b/old_docs/API_docs_v46/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v46/methods/contacts_importCard.md +++ b/old_docs/API_docs_v46/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/contacts_search.md b/old_docs/API_docs_v46/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v46/methods/contacts_search.md +++ b/old_docs/API_docs_v46/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/contacts_unblock.md b/old_docs/API_docs_v46/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v46/methods/contacts_unblock.md +++ b/old_docs/API_docs_v46/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/help_getConfig.md b/old_docs/API_docs_v46/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v46/methods/help_getConfig.md +++ b/old_docs/API_docs_v46/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/initConnection.md b/old_docs/API_docs_v46/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v46/methods/initConnection.md +++ b/old_docs/API_docs_v46/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/invokeWithLayer.md b/old_docs/API_docs_v46/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v46/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v46/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_addChatUser.md b/old_docs/API_docs_v46/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v46/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v46/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_checkChatInvite.md b/old_docs/API_docs_v46/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v46/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v46/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_createChat.md b/old_docs/API_docs_v46/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v46/methods/messages_createChat.md +++ b/old_docs/API_docs_v46/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_deleteChatUser.md b/old_docs/API_docs_v46/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v46/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v46/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_deleteHistory.md b/old_docs/API_docs_v46/methods/messages_deleteHistory.md index 5508a7d8f..c8081e796 100644 --- a/old_docs/API_docs_v46/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v46/methods/messages_deleteHistory.md @@ -19,6 +19,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_deleteMessages.md b/old_docs/API_docs_v46/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v46/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v46/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_editChatAdmin.md b/old_docs/API_docs_v46/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v46/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v46/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_editChatPhoto.md b/old_docs/API_docs_v46/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v46/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v46/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_editChatTitle.md b/old_docs/API_docs_v46/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v46/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v46/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_exportChatInvite.md b/old_docs/API_docs_v46/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v46/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v46/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_forwardMessage.md b/old_docs/API_docs_v46/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v46/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v46/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_forwardMessages.md b/old_docs/API_docs_v46/methods/messages_forwardMessages.md index 555b71241..aea62cdfd 100644 --- a/old_docs/API_docs_v46/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v46/methods/messages_forwardMessages.md @@ -21,6 +21,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_getChats.md b/old_docs/API_docs_v46/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v46/methods/messages_getChats.md +++ b/old_docs/API_docs_v46/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_getDhConfig.md b/old_docs/API_docs_v46/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v46/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v46/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_getDialogs.md b/old_docs/API_docs_v46/methods/messages_getDialogs.md index d59c49555..4c278eae2 100644 --- a/old_docs/API_docs_v46/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v46/methods/messages_getDialogs.md @@ -21,6 +21,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v46/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/old_docs/API_docs_v46/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v46/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_getHistory.md b/old_docs/API_docs_v46/methods/messages_getHistory.md index 62f2e26fa..ba9ed92d6 100644 --- a/old_docs/API_docs_v46/methods/messages_getHistory.md +++ b/old_docs/API_docs_v46/methods/messages_getHistory.md @@ -23,6 +23,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v46/methods/messages_getInlineBotResults.md index 1a1b05cff..fb592bcf4 100644 --- a/old_docs/API_docs_v46/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v46/methods/messages_getInlineBotResults.md @@ -20,6 +20,16 @@ description: messages.getInlineBotResults parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INLINE_DISABLED|This bot can't be used in inline mode| +|BOT_INVALID|This is not a valid bot| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_getMessagesViews.md b/old_docs/API_docs_v46/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v46/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v46/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_getStickerSet.md b/old_docs/API_docs_v46/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v46/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v46/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_importChatInvite.md b/old_docs/API_docs_v46/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v46/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v46/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_installStickerSet.md b/old_docs/API_docs_v46/methods/messages_installStickerSet.md index 0b5053978..1969d0083 100644 --- a/old_docs/API_docs_v46/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v46/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_migrateChat.md b/old_docs/API_docs_v46/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v46/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v46/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v46/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v46/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v46/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_readHistory.md b/old_docs/API_docs_v46/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v46/methods/messages_readHistory.md +++ b/old_docs/API_docs_v46/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_receivedQueue.md b/old_docs/API_docs_v46/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v46/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v46/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_reportSpam.md b/old_docs/API_docs_v46/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v46/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v46/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_saveGif.md b/old_docs/API_docs_v46/methods/messages_saveGif.md index 2d41d5338..31e486320 100644 --- a/old_docs/API_docs_v46/methods/messages_saveGif.md +++ b/old_docs/API_docs_v46/methods/messages_saveGif.md @@ -19,6 +19,13 @@ description: messages.saveGif parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|GIF_ID_INVALID|The provided GIF ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_search.md b/old_docs/API_docs_v46/methods/messages_search.md index db0a07fd9..16d0d8532 100644 --- a/old_docs/API_docs_v46/methods/messages_search.md +++ b/old_docs/API_docs_v46/methods/messages_search.md @@ -26,6 +26,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_searchGifs.md b/old_docs/API_docs_v46/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/old_docs/API_docs_v46/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v46/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_searchGlobal.md b/old_docs/API_docs_v46/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v46/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v46/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_sendEncrypted.md b/old_docs/API_docs_v46/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v46/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v46/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v46/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v46/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v46/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v46/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v46/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v46/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v46/methods/messages_sendInlineBotResult.md index 530d02550..c4f8601f1 100644 --- a/old_docs/API_docs_v46/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v46/methods/messages_sendInlineBotResult.md @@ -22,6 +22,16 @@ description: messages.sendInlineBotResult parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INLINE_RESULT_EXPIRED|The inline query expired| +|PEER_ID_INVALID|The provided peer id is invalid| +|QUERY_ID_EMPTY|The query ID is empty| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_sendMedia.md b/old_docs/API_docs_v46/methods/messages_sendMedia.md index c8b36ab88..1e4ebdaab 100644 --- a/old_docs/API_docs_v46/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v46/methods/messages_sendMedia.md @@ -22,6 +22,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_sendMessage.md b/old_docs/API_docs_v46/methods/messages_sendMessage.md index ef590c9d7..723c2f652 100644 --- a/old_docs/API_docs_v46/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v46/methods/messages_sendMessage.md @@ -25,6 +25,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v46/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v46/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v46/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v46/methods/messages_setInlineBotResults.md index d31f0a435..e347494bb 100644 --- a/old_docs/API_docs_v46/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v46/methods/messages_setInlineBotResults.md @@ -23,6 +23,23 @@ description: messages.setInlineBotResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ARTICLE_TITLE_EMPTY|The title of the article is empty| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|MESSAGE_EMPTY|The provided message is empty| +|QUERY_ID_INVALID|The query ID is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|RESULT_TYPE_INVALID|Result type invalid| +|SEND_MESSAGE_TYPE_INVALID|The message type is invalid| +|START_PARAM_INVALID|Start parameter invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_setTyping.md b/old_docs/API_docs_v46/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v46/methods/messages_setTyping.md +++ b/old_docs/API_docs_v46/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_startBot.md b/old_docs/API_docs_v46/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v46/methods/messages_startBot.md +++ b/old_docs/API_docs_v46/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v46/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v46/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v46/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v46/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v46/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v46/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/photos_getUserPhotos.md b/old_docs/API_docs_v46/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v46/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v46/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v46/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v46/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v46/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v46/methods/users_getUsers.md b/old_docs/API_docs_v46/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v46/methods/users_getUsers.md +++ b/old_docs/API_docs_v46/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_changePhone.md b/old_docs/API_docs_v51/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v51/methods/account_changePhone.md +++ b/old_docs/API_docs_v51/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_checkUsername.md b/old_docs/API_docs_v51/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v51/methods/account_checkUsername.md +++ b/old_docs/API_docs_v51/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_getNotifySettings.md b/old_docs/API_docs_v51/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v51/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v51/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_getPasswordSettings.md b/old_docs/API_docs_v51/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v51/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v51/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_getPrivacy.md b/old_docs/API_docs_v51/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v51/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v51/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_registerDevice.md b/old_docs/API_docs_v51/methods/account_registerDevice.md index 58e9988f1..ab7ec933f 100644 --- a/old_docs/API_docs_v51/methods/account_registerDevice.md +++ b/old_docs/API_docs_v51/methods/account_registerDevice.md @@ -24,6 +24,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_reportPeer.md b/old_docs/API_docs_v51/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v51/methods/account_reportPeer.md +++ b/old_docs/API_docs_v51/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_resetAuthorization.md b/old_docs/API_docs_v51/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v51/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v51/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v51/methods/account_sendChangePhoneCode.md index a1f49156d..4be218f24 100644 --- a/old_docs/API_docs_v51/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v51/methods/account_sendChangePhoneCode.md @@ -20,6 +20,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_setAccountTTL.md b/old_docs/API_docs_v51/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v51/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v51/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_setPrivacy.md b/old_docs/API_docs_v51/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v51/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v51/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_unregisterDevice.md b/old_docs/API_docs_v51/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v51/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v51/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_updateNotifySettings.md b/old_docs/API_docs_v51/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v51/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v51/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v51/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v51/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v51/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_updateProfile.md b/old_docs/API_docs_v51/methods/account_updateProfile.md index 531bbb028..a50eaea58 100644 --- a/old_docs/API_docs_v51/methods/account_updateProfile.md +++ b/old_docs/API_docs_v51/methods/account_updateProfile.md @@ -20,6 +20,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_updateStatus.md b/old_docs/API_docs_v51/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v51/methods/account_updateStatus.md +++ b/old_docs/API_docs_v51/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/account_updateUsername.md b/old_docs/API_docs_v51/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v51/methods/account_updateUsername.md +++ b/old_docs/API_docs_v51/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v51/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v51/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v51/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/auth_cancelCode.md b/old_docs/API_docs_v51/methods/auth_cancelCode.md index cc93fff5b..dc390329f 100644 --- a/old_docs/API_docs_v51/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v51/methods/auth_cancelCode.md @@ -19,6 +19,13 @@ description: auth.cancelCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/auth_checkPassword.md b/old_docs/API_docs_v51/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v51/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v51/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/auth_checkPhone.md b/old_docs/API_docs_v51/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v51/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v51/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/auth_exportAuthorization.md b/old_docs/API_docs_v51/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v51/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v51/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/auth_importAuthorization.md b/old_docs/API_docs_v51/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v51/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v51/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/auth_recoverPassword.md b/old_docs/API_docs_v51/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v51/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v51/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v51/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v51/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v51/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/auth_resendCode.md b/old_docs/API_docs_v51/methods/auth_resendCode.md index 92f7aa308..14d08ddd1 100644 --- a/old_docs/API_docs_v51/methods/auth_resendCode.md +++ b/old_docs/API_docs_v51/methods/auth_resendCode.md @@ -19,6 +19,13 @@ description: auth.resendCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v51/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v51/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v51/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/auth_sendInvites.md b/old_docs/API_docs_v51/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v51/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v51/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_checkUsername.md b/old_docs/API_docs_v51/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v51/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v51/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_createChannel.md b/old_docs/API_docs_v51/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v51/methods/channels_createChannel.md +++ b/old_docs/API_docs_v51/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_deleteChannel.md b/old_docs/API_docs_v51/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v51/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v51/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_deleteMessages.md b/old_docs/API_docs_v51/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v51/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v51/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v51/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v51/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v51/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_editAbout.md b/old_docs/API_docs_v51/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v51/methods/channels_editAbout.md +++ b/old_docs/API_docs_v51/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_editAdmin.md b/old_docs/API_docs_v51/methods/channels_editAdmin.md index cb8212977..7707bdfe7 100644 --- a/old_docs/API_docs_v51/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v51/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_editPhoto.md b/old_docs/API_docs_v51/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v51/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v51/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_editTitle.md b/old_docs/API_docs_v51/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v51/methods/channels_editTitle.md +++ b/old_docs/API_docs_v51/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_exportInvite.md b/old_docs/API_docs_v51/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v51/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v51/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_exportMessageLink.md b/old_docs/API_docs_v51/methods/channels_exportMessageLink.md index 9e7135ab8..9831c9c03 100644 --- a/old_docs/API_docs_v51/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v51/methods/channels_exportMessageLink.md @@ -19,6 +19,13 @@ description: channels.exportMessageLink parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_getChannels.md b/old_docs/API_docs_v51/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v51/methods/channels_getChannels.md +++ b/old_docs/API_docs_v51/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_getMessages.md b/old_docs/API_docs_v51/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v51/methods/channels_getMessages.md +++ b/old_docs/API_docs_v51/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_getParticipant.md b/old_docs/API_docs_v51/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v51/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v51/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_inviteToChannel.md b/old_docs/API_docs_v51/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v51/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v51/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_joinChannel.md b/old_docs/API_docs_v51/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v51/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v51/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_leaveChannel.md b/old_docs/API_docs_v51/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v51/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v51/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_readHistory.md b/old_docs/API_docs_v51/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v51/methods/channels_readHistory.md +++ b/old_docs/API_docs_v51/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_reportSpam.md b/old_docs/API_docs_v51/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v51/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v51/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_toggleInvites.md b/old_docs/API_docs_v51/methods/channels_toggleInvites.md index 0733d419f..c2715b323 100644 --- a/old_docs/API_docs_v51/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v51/methods/channels_toggleInvites.md @@ -19,6 +19,15 @@ description: channels.toggleInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_toggleSignatures.md b/old_docs/API_docs_v51/methods/channels_toggleSignatures.md index 3056eaee8..a214b8493 100644 --- a/old_docs/API_docs_v51/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v51/methods/channels_toggleSignatures.md @@ -19,6 +19,13 @@ description: channels.toggleSignatures parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v51/methods/channels_updatePinnedMessage.md index d2314d851..7376df10a 100644 --- a/old_docs/API_docs_v51/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v51/methods/channels_updatePinnedMessage.md @@ -20,6 +20,15 @@ description: channels.updatePinnedMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/channels_updateUsername.md b/old_docs/API_docs_v51/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v51/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v51/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/contacts_block.md b/old_docs/API_docs_v51/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v51/methods/contacts_block.md +++ b/old_docs/API_docs_v51/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/contacts_deleteContact.md b/old_docs/API_docs_v51/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v51/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v51/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/contacts_deleteContacts.md b/old_docs/API_docs_v51/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v51/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v51/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/contacts_importCard.md b/old_docs/API_docs_v51/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v51/methods/contacts_importCard.md +++ b/old_docs/API_docs_v51/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/contacts_search.md b/old_docs/API_docs_v51/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v51/methods/contacts_search.md +++ b/old_docs/API_docs_v51/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/contacts_unblock.md b/old_docs/API_docs_v51/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v51/methods/contacts_unblock.md +++ b/old_docs/API_docs_v51/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/help_getConfig.md b/old_docs/API_docs_v51/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v51/methods/help_getConfig.md +++ b/old_docs/API_docs_v51/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/initConnection.md b/old_docs/API_docs_v51/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v51/methods/initConnection.md +++ b/old_docs/API_docs_v51/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/invokeWithLayer.md b/old_docs/API_docs_v51/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v51/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v51/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_addChatUser.md b/old_docs/API_docs_v51/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v51/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v51/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_checkChatInvite.md b/old_docs/API_docs_v51/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v51/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v51/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_createChat.md b/old_docs/API_docs_v51/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v51/methods/messages_createChat.md +++ b/old_docs/API_docs_v51/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_deleteChatUser.md b/old_docs/API_docs_v51/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v51/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v51/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_deleteHistory.md b/old_docs/API_docs_v51/methods/messages_deleteHistory.md index 5508a7d8f..c8081e796 100644 --- a/old_docs/API_docs_v51/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v51/methods/messages_deleteHistory.md @@ -19,6 +19,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_deleteMessages.md b/old_docs/API_docs_v51/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v51/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v51/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_editChatAdmin.md b/old_docs/API_docs_v51/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v51/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v51/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_editChatPhoto.md b/old_docs/API_docs_v51/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v51/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v51/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_editChatTitle.md b/old_docs/API_docs_v51/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v51/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v51/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v51/methods/messages_editInlineBotMessage.md index 083d4a61b..621c81a37 100644 --- a/old_docs/API_docs_v51/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v51/methods/messages_editInlineBotMessage.md @@ -23,6 +23,14 @@ description: messages.editInlineBotMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_editMessage.md b/old_docs/API_docs_v51/methods/messages_editMessage.md index a2766336e..b8cdda817 100644 --- a/old_docs/API_docs_v51/methods/messages_editMessage.md +++ b/old_docs/API_docs_v51/methods/messages_editMessage.md @@ -24,6 +24,22 @@ description: messages.editMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_exportChatInvite.md b/old_docs/API_docs_v51/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v51/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v51/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_forwardMessage.md b/old_docs/API_docs_v51/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v51/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v51/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_forwardMessages.md b/old_docs/API_docs_v51/methods/messages_forwardMessages.md index ce1c5f80c..c02ab9013 100644 --- a/old_docs/API_docs_v51/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v51/methods/messages_forwardMessages.md @@ -23,6 +23,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v51/methods/messages_getBotCallbackAnswer.md index d41d1ab6c..9afb2e6a6 100644 --- a/old_docs/API_docs_v51/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v51/methods/messages_getBotCallbackAnswer.md @@ -20,6 +20,16 @@ description: messages.getBotCallbackAnswer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_getChats.md b/old_docs/API_docs_v51/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v51/methods/messages_getChats.md +++ b/old_docs/API_docs_v51/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_getDhConfig.md b/old_docs/API_docs_v51/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v51/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v51/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_getDialogs.md b/old_docs/API_docs_v51/methods/messages_getDialogs.md index d59c49555..4c278eae2 100644 --- a/old_docs/API_docs_v51/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v51/methods/messages_getDialogs.md @@ -21,6 +21,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v51/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/old_docs/API_docs_v51/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v51/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_getHistory.md b/old_docs/API_docs_v51/methods/messages_getHistory.md index 273eb6a91..a48a465eb 100644 --- a/old_docs/API_docs_v51/methods/messages_getHistory.md +++ b/old_docs/API_docs_v51/methods/messages_getHistory.md @@ -24,6 +24,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v51/methods/messages_getInlineBotResults.md index f5da1c5a0..61366580b 100644 --- a/old_docs/API_docs_v51/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v51/methods/messages_getInlineBotResults.md @@ -22,6 +22,16 @@ description: messages.getInlineBotResults parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INLINE_DISABLED|This bot can't be used in inline mode| +|BOT_INVALID|This is not a valid bot| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_getMessageEditData.md b/old_docs/API_docs_v51/methods/messages_getMessageEditData.md index ee07fd74e..a8b135c67 100644 --- a/old_docs/API_docs_v51/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v51/methods/messages_getMessageEditData.md @@ -19,6 +19,14 @@ description: messages.getMessageEditData parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_getMessagesViews.md b/old_docs/API_docs_v51/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v51/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v51/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_getPeerSettings.md b/old_docs/API_docs_v51/methods/messages_getPeerSettings.md index 26776c43b..d3e3cfc39 100644 --- a/old_docs/API_docs_v51/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v51/methods/messages_getPeerSettings.md @@ -18,6 +18,14 @@ description: messages.getPeerSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_getStickerSet.md b/old_docs/API_docs_v51/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v51/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v51/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_hideReportSpam.md b/old_docs/API_docs_v51/methods/messages_hideReportSpam.md index 20bc6f186..2dfe4dd7a 100644 --- a/old_docs/API_docs_v51/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v51/methods/messages_hideReportSpam.md @@ -18,6 +18,13 @@ description: messages.hideReportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_importChatInvite.md b/old_docs/API_docs_v51/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v51/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v51/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_installStickerSet.md b/old_docs/API_docs_v51/methods/messages_installStickerSet.md index 0b5053978..1969d0083 100644 --- a/old_docs/API_docs_v51/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v51/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_migrateChat.md b/old_docs/API_docs_v51/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v51/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v51/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v51/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v51/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v51/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_readHistory.md b/old_docs/API_docs_v51/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v51/methods/messages_readHistory.md +++ b/old_docs/API_docs_v51/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_receivedQueue.md b/old_docs/API_docs_v51/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v51/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v51/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_reportSpam.md b/old_docs/API_docs_v51/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v51/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v51/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_saveGif.md b/old_docs/API_docs_v51/methods/messages_saveGif.md index 2d41d5338..31e486320 100644 --- a/old_docs/API_docs_v51/methods/messages_saveGif.md +++ b/old_docs/API_docs_v51/methods/messages_saveGif.md @@ -19,6 +19,13 @@ description: messages.saveGif parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|GIF_ID_INVALID|The provided GIF ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_search.md b/old_docs/API_docs_v51/methods/messages_search.md index db0a07fd9..16d0d8532 100644 --- a/old_docs/API_docs_v51/methods/messages_search.md +++ b/old_docs/API_docs_v51/methods/messages_search.md @@ -26,6 +26,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_searchGifs.md b/old_docs/API_docs_v51/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/old_docs/API_docs_v51/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v51/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_searchGlobal.md b/old_docs/API_docs_v51/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v51/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v51/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_sendEncrypted.md b/old_docs/API_docs_v51/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v51/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v51/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v51/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v51/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v51/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v51/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v51/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v51/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v51/methods/messages_sendInlineBotResult.md index f0352f04f..173075a03 100644 --- a/old_docs/API_docs_v51/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v51/methods/messages_sendInlineBotResult.md @@ -24,6 +24,16 @@ description: messages.sendInlineBotResult parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INLINE_RESULT_EXPIRED|The inline query expired| +|PEER_ID_INVALID|The provided peer id is invalid| +|QUERY_ID_EMPTY|The query ID is empty| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_sendMedia.md b/old_docs/API_docs_v51/methods/messages_sendMedia.md index 14f176baa..b13d18784 100644 --- a/old_docs/API_docs_v51/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v51/methods/messages_sendMedia.md @@ -24,6 +24,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_sendMessage.md b/old_docs/API_docs_v51/methods/messages_sendMessage.md index b32d1b170..031aaee9b 100644 --- a/old_docs/API_docs_v51/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v51/methods/messages_sendMessage.md @@ -27,6 +27,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v51/methods/messages_setBotCallbackAnswer.md index 5c9ebc146..ea7cdd796 100644 --- a/old_docs/API_docs_v51/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v51/methods/messages_setBotCallbackAnswer.md @@ -20,6 +20,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v51/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v51/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v51/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v51/methods/messages_setInlineBotResults.md index cf74e5e4b..8b5625f34 100644 --- a/old_docs/API_docs_v51/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v51/methods/messages_setInlineBotResults.md @@ -24,6 +24,23 @@ description: messages.setInlineBotResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ARTICLE_TITLE_EMPTY|The title of the article is empty| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|MESSAGE_EMPTY|The provided message is empty| +|QUERY_ID_INVALID|The query ID is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|RESULT_TYPE_INVALID|Result type invalid| +|SEND_MESSAGE_TYPE_INVALID|The message type is invalid| +|START_PARAM_INVALID|Start parameter invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_setTyping.md b/old_docs/API_docs_v51/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v51/methods/messages_setTyping.md +++ b/old_docs/API_docs_v51/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_startBot.md b/old_docs/API_docs_v51/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v51/methods/messages_startBot.md +++ b/old_docs/API_docs_v51/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v51/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v51/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v51/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v51/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v51/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v51/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/photos_getUserPhotos.md b/old_docs/API_docs_v51/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v51/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v51/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v51/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v51/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v51/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v51/methods/users_getUsers.md b/old_docs/API_docs_v51/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v51/methods/users_getUsers.md +++ b/old_docs/API_docs_v51/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_changePhone.md b/old_docs/API_docs_v53/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v53/methods/account_changePhone.md +++ b/old_docs/API_docs_v53/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_checkUsername.md b/old_docs/API_docs_v53/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v53/methods/account_checkUsername.md +++ b/old_docs/API_docs_v53/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_getNotifySettings.md b/old_docs/API_docs_v53/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v53/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v53/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_getPasswordSettings.md b/old_docs/API_docs_v53/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v53/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v53/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_getPrivacy.md b/old_docs/API_docs_v53/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v53/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v53/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_registerDevice.md b/old_docs/API_docs_v53/methods/account_registerDevice.md index 6865551ee..3cc7f98d4 100644 --- a/old_docs/API_docs_v53/methods/account_registerDevice.md +++ b/old_docs/API_docs_v53/methods/account_registerDevice.md @@ -19,6 +19,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_reportPeer.md b/old_docs/API_docs_v53/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v53/methods/account_reportPeer.md +++ b/old_docs/API_docs_v53/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_resetAuthorization.md b/old_docs/API_docs_v53/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v53/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v53/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v53/methods/account_sendChangePhoneCode.md index a1f49156d..4be218f24 100644 --- a/old_docs/API_docs_v53/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v53/methods/account_sendChangePhoneCode.md @@ -20,6 +20,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_setAccountTTL.md b/old_docs/API_docs_v53/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v53/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v53/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_setPrivacy.md b/old_docs/API_docs_v53/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v53/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v53/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_unregisterDevice.md b/old_docs/API_docs_v53/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v53/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v53/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_updateNotifySettings.md b/old_docs/API_docs_v53/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v53/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v53/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v53/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v53/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v53/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_updateProfile.md b/old_docs/API_docs_v53/methods/account_updateProfile.md index 531bbb028..a50eaea58 100644 --- a/old_docs/API_docs_v53/methods/account_updateProfile.md +++ b/old_docs/API_docs_v53/methods/account_updateProfile.md @@ -20,6 +20,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_updateStatus.md b/old_docs/API_docs_v53/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v53/methods/account_updateStatus.md +++ b/old_docs/API_docs_v53/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/account_updateUsername.md b/old_docs/API_docs_v53/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v53/methods/account_updateUsername.md +++ b/old_docs/API_docs_v53/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v53/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v53/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v53/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/auth_cancelCode.md b/old_docs/API_docs_v53/methods/auth_cancelCode.md index cc93fff5b..dc390329f 100644 --- a/old_docs/API_docs_v53/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v53/methods/auth_cancelCode.md @@ -19,6 +19,13 @@ description: auth.cancelCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/auth_checkPassword.md b/old_docs/API_docs_v53/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v53/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v53/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/auth_checkPhone.md b/old_docs/API_docs_v53/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v53/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v53/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/auth_exportAuthorization.md b/old_docs/API_docs_v53/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v53/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v53/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/auth_importAuthorization.md b/old_docs/API_docs_v53/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v53/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v53/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/auth_recoverPassword.md b/old_docs/API_docs_v53/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v53/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v53/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v53/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v53/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v53/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/auth_resendCode.md b/old_docs/API_docs_v53/methods/auth_resendCode.md index 92f7aa308..14d08ddd1 100644 --- a/old_docs/API_docs_v53/methods/auth_resendCode.md +++ b/old_docs/API_docs_v53/methods/auth_resendCode.md @@ -19,6 +19,13 @@ description: auth.resendCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v53/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v53/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v53/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/auth_sendInvites.md b/old_docs/API_docs_v53/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v53/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v53/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_checkUsername.md b/old_docs/API_docs_v53/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v53/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v53/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_createChannel.md b/old_docs/API_docs_v53/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v53/methods/channels_createChannel.md +++ b/old_docs/API_docs_v53/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_deleteChannel.md b/old_docs/API_docs_v53/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v53/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v53/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_deleteMessages.md b/old_docs/API_docs_v53/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v53/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v53/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v53/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v53/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v53/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_editAbout.md b/old_docs/API_docs_v53/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v53/methods/channels_editAbout.md +++ b/old_docs/API_docs_v53/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_editAdmin.md b/old_docs/API_docs_v53/methods/channels_editAdmin.md index cb8212977..7707bdfe7 100644 --- a/old_docs/API_docs_v53/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v53/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_editPhoto.md b/old_docs/API_docs_v53/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v53/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v53/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_editTitle.md b/old_docs/API_docs_v53/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v53/methods/channels_editTitle.md +++ b/old_docs/API_docs_v53/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_exportInvite.md b/old_docs/API_docs_v53/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v53/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v53/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_exportMessageLink.md b/old_docs/API_docs_v53/methods/channels_exportMessageLink.md index 9e7135ab8..9831c9c03 100644 --- a/old_docs/API_docs_v53/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v53/methods/channels_exportMessageLink.md @@ -19,6 +19,13 @@ description: channels.exportMessageLink parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_getChannels.md b/old_docs/API_docs_v53/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v53/methods/channels_getChannels.md +++ b/old_docs/API_docs_v53/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_getMessages.md b/old_docs/API_docs_v53/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v53/methods/channels_getMessages.md +++ b/old_docs/API_docs_v53/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_getParticipant.md b/old_docs/API_docs_v53/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v53/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v53/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_inviteToChannel.md b/old_docs/API_docs_v53/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v53/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v53/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_joinChannel.md b/old_docs/API_docs_v53/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v53/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v53/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_leaveChannel.md b/old_docs/API_docs_v53/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v53/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v53/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_readHistory.md b/old_docs/API_docs_v53/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v53/methods/channels_readHistory.md +++ b/old_docs/API_docs_v53/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_reportSpam.md b/old_docs/API_docs_v53/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v53/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v53/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_toggleInvites.md b/old_docs/API_docs_v53/methods/channels_toggleInvites.md index 0733d419f..c2715b323 100644 --- a/old_docs/API_docs_v53/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v53/methods/channels_toggleInvites.md @@ -19,6 +19,15 @@ description: channels.toggleInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_toggleSignatures.md b/old_docs/API_docs_v53/methods/channels_toggleSignatures.md index 3056eaee8..a214b8493 100644 --- a/old_docs/API_docs_v53/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v53/methods/channels_toggleSignatures.md @@ -19,6 +19,13 @@ description: channels.toggleSignatures parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v53/methods/channels_updatePinnedMessage.md index d2314d851..7376df10a 100644 --- a/old_docs/API_docs_v53/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v53/methods/channels_updatePinnedMessage.md @@ -20,6 +20,15 @@ description: channels.updatePinnedMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/channels_updateUsername.md b/old_docs/API_docs_v53/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v53/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v53/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/contacts_block.md b/old_docs/API_docs_v53/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v53/methods/contacts_block.md +++ b/old_docs/API_docs_v53/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/contacts_deleteContact.md b/old_docs/API_docs_v53/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v53/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v53/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/contacts_deleteContacts.md b/old_docs/API_docs_v53/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v53/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v53/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/contacts_getTopPeers.md b/old_docs/API_docs_v53/methods/contacts_getTopPeers.md index 60967d060..1caa1d779 100644 --- a/old_docs/API_docs_v53/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v53/methods/contacts_getTopPeers.md @@ -25,6 +25,13 @@ description: contacts.getTopPeers parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TYPES_EMPTY|The types field is empty| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/contacts_importCard.md b/old_docs/API_docs_v53/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v53/methods/contacts_importCard.md +++ b/old_docs/API_docs_v53/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v53/methods/contacts_resetTopPeerRating.md index 2f7841892..738494b2e 100644 --- a/old_docs/API_docs_v53/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v53/methods/contacts_resetTopPeerRating.md @@ -19,6 +19,13 @@ description: contacts.resetTopPeerRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/contacts_search.md b/old_docs/API_docs_v53/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v53/methods/contacts_search.md +++ b/old_docs/API_docs_v53/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/contacts_unblock.md b/old_docs/API_docs_v53/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v53/methods/contacts_unblock.md +++ b/old_docs/API_docs_v53/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/help_getConfig.md b/old_docs/API_docs_v53/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v53/methods/help_getConfig.md +++ b/old_docs/API_docs_v53/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/initConnection.md b/old_docs/API_docs_v53/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v53/methods/initConnection.md +++ b/old_docs/API_docs_v53/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/invokeWithLayer.md b/old_docs/API_docs_v53/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v53/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v53/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_addChatUser.md b/old_docs/API_docs_v53/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v53/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v53/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_checkChatInvite.md b/old_docs/API_docs_v53/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v53/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v53/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_createChat.md b/old_docs/API_docs_v53/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v53/methods/messages_createChat.md +++ b/old_docs/API_docs_v53/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_deleteChatUser.md b/old_docs/API_docs_v53/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v53/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v53/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_deleteHistory.md b/old_docs/API_docs_v53/methods/messages_deleteHistory.md index fb9b77639..ce6ba6e70 100644 --- a/old_docs/API_docs_v53/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v53/methods/messages_deleteHistory.md @@ -20,6 +20,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_deleteMessages.md b/old_docs/API_docs_v53/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v53/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v53/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_editChatAdmin.md b/old_docs/API_docs_v53/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v53/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v53/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_editChatPhoto.md b/old_docs/API_docs_v53/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v53/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v53/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_editChatTitle.md b/old_docs/API_docs_v53/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v53/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v53/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v53/methods/messages_editInlineBotMessage.md index 083d4a61b..621c81a37 100644 --- a/old_docs/API_docs_v53/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v53/methods/messages_editInlineBotMessage.md @@ -23,6 +23,14 @@ description: messages.editInlineBotMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_editMessage.md b/old_docs/API_docs_v53/methods/messages_editMessage.md index a2766336e..b8cdda817 100644 --- a/old_docs/API_docs_v53/methods/messages_editMessage.md +++ b/old_docs/API_docs_v53/methods/messages_editMessage.md @@ -24,6 +24,22 @@ description: messages.editMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_exportChatInvite.md b/old_docs/API_docs_v53/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v53/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v53/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_forwardMessage.md b/old_docs/API_docs_v53/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v53/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v53/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_forwardMessages.md b/old_docs/API_docs_v53/methods/messages_forwardMessages.md index c06dc5231..04d9c02d7 100644 --- a/old_docs/API_docs_v53/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v53/methods/messages_forwardMessages.md @@ -22,6 +22,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v53/methods/messages_getBotCallbackAnswer.md index d41d1ab6c..9afb2e6a6 100644 --- a/old_docs/API_docs_v53/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v53/methods/messages_getBotCallbackAnswer.md @@ -20,6 +20,16 @@ description: messages.getBotCallbackAnswer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_getChats.md b/old_docs/API_docs_v53/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v53/methods/messages_getChats.md +++ b/old_docs/API_docs_v53/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_getDhConfig.md b/old_docs/API_docs_v53/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v53/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v53/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_getDialogs.md b/old_docs/API_docs_v53/methods/messages_getDialogs.md index d59c49555..4c278eae2 100644 --- a/old_docs/API_docs_v53/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v53/methods/messages_getDialogs.md @@ -21,6 +21,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v53/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/old_docs/API_docs_v53/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v53/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_getHistory.md b/old_docs/API_docs_v53/methods/messages_getHistory.md index 273eb6a91..a48a465eb 100644 --- a/old_docs/API_docs_v53/methods/messages_getHistory.md +++ b/old_docs/API_docs_v53/methods/messages_getHistory.md @@ -24,6 +24,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v53/methods/messages_getInlineBotResults.md index f5da1c5a0..61366580b 100644 --- a/old_docs/API_docs_v53/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v53/methods/messages_getInlineBotResults.md @@ -22,6 +22,16 @@ description: messages.getInlineBotResults parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INLINE_DISABLED|This bot can't be used in inline mode| +|BOT_INVALID|This is not a valid bot| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_getMessageEditData.md b/old_docs/API_docs_v53/methods/messages_getMessageEditData.md index ee07fd74e..a8b135c67 100644 --- a/old_docs/API_docs_v53/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v53/methods/messages_getMessageEditData.md @@ -19,6 +19,14 @@ description: messages.getMessageEditData parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_getMessagesViews.md b/old_docs/API_docs_v53/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v53/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v53/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v53/methods/messages_getPeerDialogs.md index e388e309c..3da60038f 100644 --- a/old_docs/API_docs_v53/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v53/methods/messages_getPeerDialogs.md @@ -18,6 +18,14 @@ description: messages.getPeerDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_getPeerSettings.md b/old_docs/API_docs_v53/methods/messages_getPeerSettings.md index 26776c43b..d3e3cfc39 100644 --- a/old_docs/API_docs_v53/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v53/methods/messages_getPeerSettings.md @@ -18,6 +18,14 @@ description: messages.getPeerSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_getStickerSet.md b/old_docs/API_docs_v53/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v53/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v53/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_hideReportSpam.md b/old_docs/API_docs_v53/methods/messages_hideReportSpam.md index 20bc6f186..2dfe4dd7a 100644 --- a/old_docs/API_docs_v53/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v53/methods/messages_hideReportSpam.md @@ -18,6 +18,13 @@ description: messages.hideReportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_importChatInvite.md b/old_docs/API_docs_v53/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v53/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v53/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_installStickerSet.md b/old_docs/API_docs_v53/methods/messages_installStickerSet.md index 0b5053978..1969d0083 100644 --- a/old_docs/API_docs_v53/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v53/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_migrateChat.md b/old_docs/API_docs_v53/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v53/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v53/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v53/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v53/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v53/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_readHistory.md b/old_docs/API_docs_v53/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v53/methods/messages_readHistory.md +++ b/old_docs/API_docs_v53/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_receivedQueue.md b/old_docs/API_docs_v53/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v53/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v53/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_reportSpam.md b/old_docs/API_docs_v53/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v53/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v53/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_saveDraft.md b/old_docs/API_docs_v53/methods/messages_saveDraft.md index ef5e65c57..42308b46f 100644 --- a/old_docs/API_docs_v53/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v53/methods/messages_saveDraft.md @@ -23,6 +23,13 @@ description: messages.saveDraft parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_saveGif.md b/old_docs/API_docs_v53/methods/messages_saveGif.md index 2d41d5338..31e486320 100644 --- a/old_docs/API_docs_v53/methods/messages_saveGif.md +++ b/old_docs/API_docs_v53/methods/messages_saveGif.md @@ -19,6 +19,13 @@ description: messages.saveGif parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|GIF_ID_INVALID|The provided GIF ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_search.md b/old_docs/API_docs_v53/methods/messages_search.md index 01e4c6143..5f49d0163 100644 --- a/old_docs/API_docs_v53/methods/messages_search.md +++ b/old_docs/API_docs_v53/methods/messages_search.md @@ -25,6 +25,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_searchGifs.md b/old_docs/API_docs_v53/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/old_docs/API_docs_v53/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v53/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_searchGlobal.md b/old_docs/API_docs_v53/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v53/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v53/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_sendEncrypted.md b/old_docs/API_docs_v53/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v53/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v53/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v53/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v53/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v53/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v53/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v53/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v53/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v53/methods/messages_sendInlineBotResult.md index 6ab41f500..6aeeb67d5 100644 --- a/old_docs/API_docs_v53/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v53/methods/messages_sendInlineBotResult.md @@ -24,6 +24,16 @@ description: messages.sendInlineBotResult parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INLINE_RESULT_EXPIRED|The inline query expired| +|PEER_ID_INVALID|The provided peer id is invalid| +|QUERY_ID_EMPTY|The query ID is empty| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_sendMedia.md b/old_docs/API_docs_v53/methods/messages_sendMedia.md index 68e2c41be..8c22e1c9f 100644 --- a/old_docs/API_docs_v53/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v53/methods/messages_sendMedia.md @@ -24,6 +24,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_sendMessage.md b/old_docs/API_docs_v53/methods/messages_sendMessage.md index cabccdb33..60b50412f 100644 --- a/old_docs/API_docs_v53/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v53/methods/messages_sendMessage.md @@ -27,6 +27,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v53/methods/messages_setBotCallbackAnswer.md index 5c9ebc146..ea7cdd796 100644 --- a/old_docs/API_docs_v53/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v53/methods/messages_setBotCallbackAnswer.md @@ -20,6 +20,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v53/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v53/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v53/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v53/methods/messages_setInlineBotResults.md index cf74e5e4b..8b5625f34 100644 --- a/old_docs/API_docs_v53/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v53/methods/messages_setInlineBotResults.md @@ -24,6 +24,23 @@ description: messages.setInlineBotResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ARTICLE_TITLE_EMPTY|The title of the article is empty| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|MESSAGE_EMPTY|The provided message is empty| +|QUERY_ID_INVALID|The query ID is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|RESULT_TYPE_INVALID|Result type invalid| +|SEND_MESSAGE_TYPE_INVALID|The message type is invalid| +|START_PARAM_INVALID|Start parameter invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_setTyping.md b/old_docs/API_docs_v53/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v53/methods/messages_setTyping.md +++ b/old_docs/API_docs_v53/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_startBot.md b/old_docs/API_docs_v53/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v53/methods/messages_startBot.md +++ b/old_docs/API_docs_v53/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v53/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v53/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v53/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v53/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v53/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v53/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/photos_getUserPhotos.md b/old_docs/API_docs_v53/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v53/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v53/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v53/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v53/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v53/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v53/methods/users_getUsers.md b/old_docs/API_docs_v53/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v53/methods/users_getUsers.md +++ b/old_docs/API_docs_v53/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_changePhone.md b/old_docs/API_docs_v55/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v55/methods/account_changePhone.md +++ b/old_docs/API_docs_v55/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_checkUsername.md b/old_docs/API_docs_v55/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v55/methods/account_checkUsername.md +++ b/old_docs/API_docs_v55/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_confirmPhone.md b/old_docs/API_docs_v55/methods/account_confirmPhone.md index c2526b2ad..0d2dc5c64 100644 --- a/old_docs/API_docs_v55/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v55/methods/account_confirmPhone.md @@ -19,6 +19,14 @@ description: account.confirmPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_HASH_INVALID|Code hash invalid| +|PHONE_CODE_EMPTY|phone_code is missing| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_getNotifySettings.md b/old_docs/API_docs_v55/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v55/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v55/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_getPasswordSettings.md b/old_docs/API_docs_v55/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v55/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v55/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_getPrivacy.md b/old_docs/API_docs_v55/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v55/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v55/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_registerDevice.md b/old_docs/API_docs_v55/methods/account_registerDevice.md index 6865551ee..3cc7f98d4 100644 --- a/old_docs/API_docs_v55/methods/account_registerDevice.md +++ b/old_docs/API_docs_v55/methods/account_registerDevice.md @@ -19,6 +19,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_reportPeer.md b/old_docs/API_docs_v55/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v55/methods/account_reportPeer.md +++ b/old_docs/API_docs_v55/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_resetAuthorization.md b/old_docs/API_docs_v55/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v55/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v55/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v55/methods/account_sendChangePhoneCode.md index a1f49156d..4be218f24 100644 --- a/old_docs/API_docs_v55/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v55/methods/account_sendChangePhoneCode.md @@ -20,6 +20,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v55/methods/account_sendConfirmPhoneCode.md index 5ad44987b..009fcb09b 100644 --- a/old_docs/API_docs_v55/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v55/methods/account_sendConfirmPhoneCode.md @@ -20,6 +20,13 @@ description: account.sendConfirmPhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_setAccountTTL.md b/old_docs/API_docs_v55/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v55/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v55/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_setPrivacy.md b/old_docs/API_docs_v55/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v55/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v55/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_unregisterDevice.md b/old_docs/API_docs_v55/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v55/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v55/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_updateNotifySettings.md b/old_docs/API_docs_v55/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v55/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v55/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v55/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v55/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v55/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_updateProfile.md b/old_docs/API_docs_v55/methods/account_updateProfile.md index 531bbb028..a50eaea58 100644 --- a/old_docs/API_docs_v55/methods/account_updateProfile.md +++ b/old_docs/API_docs_v55/methods/account_updateProfile.md @@ -20,6 +20,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_updateStatus.md b/old_docs/API_docs_v55/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v55/methods/account_updateStatus.md +++ b/old_docs/API_docs_v55/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/account_updateUsername.md b/old_docs/API_docs_v55/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v55/methods/account_updateUsername.md +++ b/old_docs/API_docs_v55/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v55/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v55/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v55/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/auth_cancelCode.md b/old_docs/API_docs_v55/methods/auth_cancelCode.md index cc93fff5b..dc390329f 100644 --- a/old_docs/API_docs_v55/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v55/methods/auth_cancelCode.md @@ -19,6 +19,13 @@ description: auth.cancelCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/auth_checkPassword.md b/old_docs/API_docs_v55/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v55/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v55/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/auth_checkPhone.md b/old_docs/API_docs_v55/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v55/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v55/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/auth_exportAuthorization.md b/old_docs/API_docs_v55/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v55/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v55/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/auth_importAuthorization.md b/old_docs/API_docs_v55/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v55/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v55/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/auth_recoverPassword.md b/old_docs/API_docs_v55/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v55/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v55/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v55/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v55/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v55/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/auth_resendCode.md b/old_docs/API_docs_v55/methods/auth_resendCode.md index 92f7aa308..14d08ddd1 100644 --- a/old_docs/API_docs_v55/methods/auth_resendCode.md +++ b/old_docs/API_docs_v55/methods/auth_resendCode.md @@ -19,6 +19,13 @@ description: auth.resendCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v55/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v55/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v55/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/auth_sendInvites.md b/old_docs/API_docs_v55/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v55/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v55/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_checkUsername.md b/old_docs/API_docs_v55/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v55/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v55/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_createChannel.md b/old_docs/API_docs_v55/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v55/methods/channels_createChannel.md +++ b/old_docs/API_docs_v55/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_deleteChannel.md b/old_docs/API_docs_v55/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v55/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v55/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_deleteMessages.md b/old_docs/API_docs_v55/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v55/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v55/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v55/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v55/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v55/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_editAbout.md b/old_docs/API_docs_v55/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v55/methods/channels_editAbout.md +++ b/old_docs/API_docs_v55/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_editAdmin.md b/old_docs/API_docs_v55/methods/channels_editAdmin.md index cb8212977..7707bdfe7 100644 --- a/old_docs/API_docs_v55/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v55/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_editPhoto.md b/old_docs/API_docs_v55/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v55/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v55/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_editTitle.md b/old_docs/API_docs_v55/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v55/methods/channels_editTitle.md +++ b/old_docs/API_docs_v55/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_exportInvite.md b/old_docs/API_docs_v55/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v55/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v55/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_exportMessageLink.md b/old_docs/API_docs_v55/methods/channels_exportMessageLink.md index 9e7135ab8..9831c9c03 100644 --- a/old_docs/API_docs_v55/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v55/methods/channels_exportMessageLink.md @@ -19,6 +19,13 @@ description: channels.exportMessageLink parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_getChannels.md b/old_docs/API_docs_v55/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v55/methods/channels_getChannels.md +++ b/old_docs/API_docs_v55/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_getMessages.md b/old_docs/API_docs_v55/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v55/methods/channels_getMessages.md +++ b/old_docs/API_docs_v55/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_getParticipant.md b/old_docs/API_docs_v55/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v55/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v55/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_inviteToChannel.md b/old_docs/API_docs_v55/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v55/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v55/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_joinChannel.md b/old_docs/API_docs_v55/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v55/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v55/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_leaveChannel.md b/old_docs/API_docs_v55/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v55/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v55/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_readHistory.md b/old_docs/API_docs_v55/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v55/methods/channels_readHistory.md +++ b/old_docs/API_docs_v55/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_reportSpam.md b/old_docs/API_docs_v55/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v55/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v55/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_toggleInvites.md b/old_docs/API_docs_v55/methods/channels_toggleInvites.md index 0733d419f..c2715b323 100644 --- a/old_docs/API_docs_v55/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v55/methods/channels_toggleInvites.md @@ -19,6 +19,15 @@ description: channels.toggleInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_toggleSignatures.md b/old_docs/API_docs_v55/methods/channels_toggleSignatures.md index 3056eaee8..a214b8493 100644 --- a/old_docs/API_docs_v55/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v55/methods/channels_toggleSignatures.md @@ -19,6 +19,13 @@ description: channels.toggleSignatures parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v55/methods/channels_updatePinnedMessage.md index d2314d851..7376df10a 100644 --- a/old_docs/API_docs_v55/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v55/methods/channels_updatePinnedMessage.md @@ -20,6 +20,15 @@ description: channels.updatePinnedMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/channels_updateUsername.md b/old_docs/API_docs_v55/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v55/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v55/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/contacts_block.md b/old_docs/API_docs_v55/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v55/methods/contacts_block.md +++ b/old_docs/API_docs_v55/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/contacts_deleteContact.md b/old_docs/API_docs_v55/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v55/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v55/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/contacts_deleteContacts.md b/old_docs/API_docs_v55/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v55/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v55/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/contacts_getTopPeers.md b/old_docs/API_docs_v55/methods/contacts_getTopPeers.md index 60967d060..1caa1d779 100644 --- a/old_docs/API_docs_v55/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v55/methods/contacts_getTopPeers.md @@ -25,6 +25,13 @@ description: contacts.getTopPeers parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TYPES_EMPTY|The types field is empty| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/contacts_importCard.md b/old_docs/API_docs_v55/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v55/methods/contacts_importCard.md +++ b/old_docs/API_docs_v55/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v55/methods/contacts_resetTopPeerRating.md index 2f7841892..738494b2e 100644 --- a/old_docs/API_docs_v55/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v55/methods/contacts_resetTopPeerRating.md @@ -19,6 +19,13 @@ description: contacts.resetTopPeerRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/contacts_search.md b/old_docs/API_docs_v55/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v55/methods/contacts_search.md +++ b/old_docs/API_docs_v55/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/contacts_unblock.md b/old_docs/API_docs_v55/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v55/methods/contacts_unblock.md +++ b/old_docs/API_docs_v55/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/help_getConfig.md b/old_docs/API_docs_v55/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v55/methods/help_getConfig.md +++ b/old_docs/API_docs_v55/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/initConnection.md b/old_docs/API_docs_v55/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v55/methods/initConnection.md +++ b/old_docs/API_docs_v55/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/invokeWithLayer.md b/old_docs/API_docs_v55/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v55/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v55/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_addChatUser.md b/old_docs/API_docs_v55/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v55/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v55/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_checkChatInvite.md b/old_docs/API_docs_v55/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v55/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v55/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_createChat.md b/old_docs/API_docs_v55/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v55/methods/messages_createChat.md +++ b/old_docs/API_docs_v55/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_deleteChatUser.md b/old_docs/API_docs_v55/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v55/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v55/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_deleteHistory.md b/old_docs/API_docs_v55/methods/messages_deleteHistory.md index fb9b77639..ce6ba6e70 100644 --- a/old_docs/API_docs_v55/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v55/methods/messages_deleteHistory.md @@ -20,6 +20,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_deleteMessages.md b/old_docs/API_docs_v55/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v55/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v55/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_editChatAdmin.md b/old_docs/API_docs_v55/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v55/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v55/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_editChatPhoto.md b/old_docs/API_docs_v55/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v55/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v55/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_editChatTitle.md b/old_docs/API_docs_v55/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v55/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v55/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v55/methods/messages_editInlineBotMessage.md index 083d4a61b..621c81a37 100644 --- a/old_docs/API_docs_v55/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v55/methods/messages_editInlineBotMessage.md @@ -23,6 +23,14 @@ description: messages.editInlineBotMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_editMessage.md b/old_docs/API_docs_v55/methods/messages_editMessage.md index a2766336e..b8cdda817 100644 --- a/old_docs/API_docs_v55/methods/messages_editMessage.md +++ b/old_docs/API_docs_v55/methods/messages_editMessage.md @@ -24,6 +24,22 @@ description: messages.editMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_exportChatInvite.md b/old_docs/API_docs_v55/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v55/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v55/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_forwardMessage.md b/old_docs/API_docs_v55/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v55/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v55/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_forwardMessages.md b/old_docs/API_docs_v55/methods/messages_forwardMessages.md index c06dc5231..04d9c02d7 100644 --- a/old_docs/API_docs_v55/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v55/methods/messages_forwardMessages.md @@ -22,6 +22,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v55/methods/messages_getBotCallbackAnswer.md index d41d1ab6c..9afb2e6a6 100644 --- a/old_docs/API_docs_v55/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v55/methods/messages_getBotCallbackAnswer.md @@ -20,6 +20,16 @@ description: messages.getBotCallbackAnswer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_getChats.md b/old_docs/API_docs_v55/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v55/methods/messages_getChats.md +++ b/old_docs/API_docs_v55/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_getDhConfig.md b/old_docs/API_docs_v55/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v55/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v55/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_getDialogs.md b/old_docs/API_docs_v55/methods/messages_getDialogs.md index d59c49555..4c278eae2 100644 --- a/old_docs/API_docs_v55/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v55/methods/messages_getDialogs.md @@ -21,6 +21,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v55/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/old_docs/API_docs_v55/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v55/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_getHistory.md b/old_docs/API_docs_v55/methods/messages_getHistory.md index 273eb6a91..a48a465eb 100644 --- a/old_docs/API_docs_v55/methods/messages_getHistory.md +++ b/old_docs/API_docs_v55/methods/messages_getHistory.md @@ -24,6 +24,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v55/methods/messages_getInlineBotResults.md index f5da1c5a0..61366580b 100644 --- a/old_docs/API_docs_v55/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v55/methods/messages_getInlineBotResults.md @@ -22,6 +22,16 @@ description: messages.getInlineBotResults parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INLINE_DISABLED|This bot can't be used in inline mode| +|BOT_INVALID|This is not a valid bot| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_getMessageEditData.md b/old_docs/API_docs_v55/methods/messages_getMessageEditData.md index ee07fd74e..a8b135c67 100644 --- a/old_docs/API_docs_v55/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v55/methods/messages_getMessageEditData.md @@ -19,6 +19,14 @@ description: messages.getMessageEditData parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_getMessagesViews.md b/old_docs/API_docs_v55/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v55/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v55/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v55/methods/messages_getPeerDialogs.md index e388e309c..3da60038f 100644 --- a/old_docs/API_docs_v55/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v55/methods/messages_getPeerDialogs.md @@ -18,6 +18,14 @@ description: messages.getPeerDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_getPeerSettings.md b/old_docs/API_docs_v55/methods/messages_getPeerSettings.md index 26776c43b..d3e3cfc39 100644 --- a/old_docs/API_docs_v55/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v55/methods/messages_getPeerSettings.md @@ -18,6 +18,14 @@ description: messages.getPeerSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_getStickerSet.md b/old_docs/API_docs_v55/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v55/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v55/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_hideReportSpam.md b/old_docs/API_docs_v55/methods/messages_hideReportSpam.md index 20bc6f186..2dfe4dd7a 100644 --- a/old_docs/API_docs_v55/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v55/methods/messages_hideReportSpam.md @@ -18,6 +18,13 @@ description: messages.hideReportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_importChatInvite.md b/old_docs/API_docs_v55/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v55/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v55/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_installStickerSet.md b/old_docs/API_docs_v55/methods/messages_installStickerSet.md index 6073eb13b..3dde52a75 100644 --- a/old_docs/API_docs_v55/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v55/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_migrateChat.md b/old_docs/API_docs_v55/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v55/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v55/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v55/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v55/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v55/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_readHistory.md b/old_docs/API_docs_v55/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v55/methods/messages_readHistory.md +++ b/old_docs/API_docs_v55/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_receivedQueue.md b/old_docs/API_docs_v55/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v55/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v55/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_reportSpam.md b/old_docs/API_docs_v55/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v55/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v55/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_saveDraft.md b/old_docs/API_docs_v55/methods/messages_saveDraft.md index ef5e65c57..42308b46f 100644 --- a/old_docs/API_docs_v55/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v55/methods/messages_saveDraft.md @@ -23,6 +23,13 @@ description: messages.saveDraft parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_saveGif.md b/old_docs/API_docs_v55/methods/messages_saveGif.md index 2d41d5338..31e486320 100644 --- a/old_docs/API_docs_v55/methods/messages_saveGif.md +++ b/old_docs/API_docs_v55/methods/messages_saveGif.md @@ -19,6 +19,13 @@ description: messages.saveGif parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|GIF_ID_INVALID|The provided GIF ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v55/methods/messages_saveRecentSticker.md index e430c512e..5e74b88f7 100644 --- a/old_docs/API_docs_v55/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v55/methods/messages_saveRecentSticker.md @@ -19,6 +19,13 @@ description: messages.saveRecentSticker parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKER_ID_INVALID|The provided sticker ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_search.md b/old_docs/API_docs_v55/methods/messages_search.md index 01e4c6143..5f49d0163 100644 --- a/old_docs/API_docs_v55/methods/messages_search.md +++ b/old_docs/API_docs_v55/methods/messages_search.md @@ -25,6 +25,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_searchGifs.md b/old_docs/API_docs_v55/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/old_docs/API_docs_v55/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v55/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_searchGlobal.md b/old_docs/API_docs_v55/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v55/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v55/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_sendEncrypted.md b/old_docs/API_docs_v55/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v55/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v55/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v55/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v55/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v55/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v55/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v55/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v55/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v55/methods/messages_sendInlineBotResult.md index 6ab41f500..6aeeb67d5 100644 --- a/old_docs/API_docs_v55/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v55/methods/messages_sendInlineBotResult.md @@ -24,6 +24,16 @@ description: messages.sendInlineBotResult parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INLINE_RESULT_EXPIRED|The inline query expired| +|PEER_ID_INVALID|The provided peer id is invalid| +|QUERY_ID_EMPTY|The query ID is empty| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_sendMedia.md b/old_docs/API_docs_v55/methods/messages_sendMedia.md index 68e2c41be..8c22e1c9f 100644 --- a/old_docs/API_docs_v55/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v55/methods/messages_sendMedia.md @@ -24,6 +24,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_sendMessage.md b/old_docs/API_docs_v55/methods/messages_sendMessage.md index cabccdb33..60b50412f 100644 --- a/old_docs/API_docs_v55/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v55/methods/messages_sendMessage.md @@ -27,6 +27,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v55/methods/messages_setBotCallbackAnswer.md index cf6845b73..fb10afe1a 100644 --- a/old_docs/API_docs_v55/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v55/methods/messages_setBotCallbackAnswer.md @@ -21,6 +21,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v55/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v55/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v55/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v55/methods/messages_setInlineBotResults.md index cf74e5e4b..8b5625f34 100644 --- a/old_docs/API_docs_v55/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v55/methods/messages_setInlineBotResults.md @@ -24,6 +24,23 @@ description: messages.setInlineBotResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ARTICLE_TITLE_EMPTY|The title of the article is empty| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|MESSAGE_EMPTY|The provided message is empty| +|QUERY_ID_INVALID|The query ID is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|RESULT_TYPE_INVALID|Result type invalid| +|SEND_MESSAGE_TYPE_INVALID|The message type is invalid| +|START_PARAM_INVALID|Start parameter invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_setTyping.md b/old_docs/API_docs_v55/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v55/methods/messages_setTyping.md +++ b/old_docs/API_docs_v55/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_startBot.md b/old_docs/API_docs_v55/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v55/methods/messages_startBot.md +++ b/old_docs/API_docs_v55/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v55/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v55/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v55/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v55/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v55/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v55/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/photos_getUserPhotos.md b/old_docs/API_docs_v55/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v55/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v55/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v55/methods/photos_uploadProfilePhoto.md index 790f5cb0f..ae20fdfc9 100644 --- a/old_docs/API_docs_v55/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v55/methods/photos_uploadProfilePhoto.md @@ -21,6 +21,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v55/methods/users_getUsers.md b/old_docs/API_docs_v55/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v55/methods/users_getUsers.md +++ b/old_docs/API_docs_v55/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_changePhone.md b/old_docs/API_docs_v57/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v57/methods/account_changePhone.md +++ b/old_docs/API_docs_v57/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_checkUsername.md b/old_docs/API_docs_v57/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v57/methods/account_checkUsername.md +++ b/old_docs/API_docs_v57/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_confirmPhone.md b/old_docs/API_docs_v57/methods/account_confirmPhone.md index c2526b2ad..0d2dc5c64 100644 --- a/old_docs/API_docs_v57/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v57/methods/account_confirmPhone.md @@ -19,6 +19,14 @@ description: account.confirmPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_HASH_INVALID|Code hash invalid| +|PHONE_CODE_EMPTY|phone_code is missing| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_getNotifySettings.md b/old_docs/API_docs_v57/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v57/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v57/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_getPasswordSettings.md b/old_docs/API_docs_v57/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v57/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v57/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_getPrivacy.md b/old_docs/API_docs_v57/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v57/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v57/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_registerDevice.md b/old_docs/API_docs_v57/methods/account_registerDevice.md index 6865551ee..3cc7f98d4 100644 --- a/old_docs/API_docs_v57/methods/account_registerDevice.md +++ b/old_docs/API_docs_v57/methods/account_registerDevice.md @@ -19,6 +19,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_reportPeer.md b/old_docs/API_docs_v57/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v57/methods/account_reportPeer.md +++ b/old_docs/API_docs_v57/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_resetAuthorization.md b/old_docs/API_docs_v57/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v57/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v57/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v57/methods/account_sendChangePhoneCode.md index a1f49156d..4be218f24 100644 --- a/old_docs/API_docs_v57/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v57/methods/account_sendChangePhoneCode.md @@ -20,6 +20,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v57/methods/account_sendConfirmPhoneCode.md index 5ad44987b..009fcb09b 100644 --- a/old_docs/API_docs_v57/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v57/methods/account_sendConfirmPhoneCode.md @@ -20,6 +20,13 @@ description: account.sendConfirmPhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_setAccountTTL.md b/old_docs/API_docs_v57/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v57/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v57/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_setPrivacy.md b/old_docs/API_docs_v57/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v57/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v57/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_unregisterDevice.md b/old_docs/API_docs_v57/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v57/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v57/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_updateNotifySettings.md b/old_docs/API_docs_v57/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v57/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v57/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v57/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v57/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v57/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_updateProfile.md b/old_docs/API_docs_v57/methods/account_updateProfile.md index 531bbb028..a50eaea58 100644 --- a/old_docs/API_docs_v57/methods/account_updateProfile.md +++ b/old_docs/API_docs_v57/methods/account_updateProfile.md @@ -20,6 +20,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_updateStatus.md b/old_docs/API_docs_v57/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v57/methods/account_updateStatus.md +++ b/old_docs/API_docs_v57/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/account_updateUsername.md b/old_docs/API_docs_v57/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v57/methods/account_updateUsername.md +++ b/old_docs/API_docs_v57/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v57/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v57/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v57/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/auth_cancelCode.md b/old_docs/API_docs_v57/methods/auth_cancelCode.md index cc93fff5b..dc390329f 100644 --- a/old_docs/API_docs_v57/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v57/methods/auth_cancelCode.md @@ -19,6 +19,13 @@ description: auth.cancelCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/auth_checkPassword.md b/old_docs/API_docs_v57/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v57/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v57/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/auth_checkPhone.md b/old_docs/API_docs_v57/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v57/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v57/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/auth_exportAuthorization.md b/old_docs/API_docs_v57/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v57/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v57/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/auth_importAuthorization.md b/old_docs/API_docs_v57/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v57/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v57/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/auth_recoverPassword.md b/old_docs/API_docs_v57/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v57/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v57/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v57/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v57/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v57/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/auth_resendCode.md b/old_docs/API_docs_v57/methods/auth_resendCode.md index 92f7aa308..14d08ddd1 100644 --- a/old_docs/API_docs_v57/methods/auth_resendCode.md +++ b/old_docs/API_docs_v57/methods/auth_resendCode.md @@ -19,6 +19,13 @@ description: auth.resendCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v57/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v57/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v57/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/auth_sendInvites.md b/old_docs/API_docs_v57/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v57/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v57/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_checkUsername.md b/old_docs/API_docs_v57/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v57/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v57/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_createChannel.md b/old_docs/API_docs_v57/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v57/methods/channels_createChannel.md +++ b/old_docs/API_docs_v57/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_deleteChannel.md b/old_docs/API_docs_v57/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v57/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v57/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_deleteMessages.md b/old_docs/API_docs_v57/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v57/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v57/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v57/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v57/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v57/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_editAbout.md b/old_docs/API_docs_v57/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v57/methods/channels_editAbout.md +++ b/old_docs/API_docs_v57/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_editAdmin.md b/old_docs/API_docs_v57/methods/channels_editAdmin.md index cb8212977..7707bdfe7 100644 --- a/old_docs/API_docs_v57/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v57/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_editPhoto.md b/old_docs/API_docs_v57/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v57/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v57/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_editTitle.md b/old_docs/API_docs_v57/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v57/methods/channels_editTitle.md +++ b/old_docs/API_docs_v57/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_exportInvite.md b/old_docs/API_docs_v57/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v57/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v57/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_exportMessageLink.md b/old_docs/API_docs_v57/methods/channels_exportMessageLink.md index 9e7135ab8..9831c9c03 100644 --- a/old_docs/API_docs_v57/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v57/methods/channels_exportMessageLink.md @@ -19,6 +19,13 @@ description: channels.exportMessageLink parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_getChannels.md b/old_docs/API_docs_v57/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v57/methods/channels_getChannels.md +++ b/old_docs/API_docs_v57/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_getMessages.md b/old_docs/API_docs_v57/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v57/methods/channels_getMessages.md +++ b/old_docs/API_docs_v57/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_getParticipant.md b/old_docs/API_docs_v57/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v57/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v57/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_inviteToChannel.md b/old_docs/API_docs_v57/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v57/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v57/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_joinChannel.md b/old_docs/API_docs_v57/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v57/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v57/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_leaveChannel.md b/old_docs/API_docs_v57/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v57/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v57/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_readHistory.md b/old_docs/API_docs_v57/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v57/methods/channels_readHistory.md +++ b/old_docs/API_docs_v57/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_reportSpam.md b/old_docs/API_docs_v57/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v57/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v57/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_toggleInvites.md b/old_docs/API_docs_v57/methods/channels_toggleInvites.md index 0733d419f..c2715b323 100644 --- a/old_docs/API_docs_v57/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v57/methods/channels_toggleInvites.md @@ -19,6 +19,15 @@ description: channels.toggleInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_toggleSignatures.md b/old_docs/API_docs_v57/methods/channels_toggleSignatures.md index 3056eaee8..a214b8493 100644 --- a/old_docs/API_docs_v57/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v57/methods/channels_toggleSignatures.md @@ -19,6 +19,13 @@ description: channels.toggleSignatures parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v57/methods/channels_updatePinnedMessage.md index d2314d851..7376df10a 100644 --- a/old_docs/API_docs_v57/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v57/methods/channels_updatePinnedMessage.md @@ -20,6 +20,15 @@ description: channels.updatePinnedMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/channels_updateUsername.md b/old_docs/API_docs_v57/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v57/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v57/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/contacts_block.md b/old_docs/API_docs_v57/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v57/methods/contacts_block.md +++ b/old_docs/API_docs_v57/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/contacts_deleteContact.md b/old_docs/API_docs_v57/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v57/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v57/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/contacts_deleteContacts.md b/old_docs/API_docs_v57/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v57/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v57/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/contacts_getTopPeers.md b/old_docs/API_docs_v57/methods/contacts_getTopPeers.md index 60967d060..1caa1d779 100644 --- a/old_docs/API_docs_v57/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v57/methods/contacts_getTopPeers.md @@ -25,6 +25,13 @@ description: contacts.getTopPeers parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TYPES_EMPTY|The types field is empty| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/contacts_importCard.md b/old_docs/API_docs_v57/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v57/methods/contacts_importCard.md +++ b/old_docs/API_docs_v57/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v57/methods/contacts_resetTopPeerRating.md index 2f7841892..738494b2e 100644 --- a/old_docs/API_docs_v57/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v57/methods/contacts_resetTopPeerRating.md @@ -19,6 +19,13 @@ description: contacts.resetTopPeerRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/contacts_search.md b/old_docs/API_docs_v57/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v57/methods/contacts_search.md +++ b/old_docs/API_docs_v57/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/contacts_unblock.md b/old_docs/API_docs_v57/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v57/methods/contacts_unblock.md +++ b/old_docs/API_docs_v57/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/help_getConfig.md b/old_docs/API_docs_v57/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v57/methods/help_getConfig.md +++ b/old_docs/API_docs_v57/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/initConnection.md b/old_docs/API_docs_v57/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v57/methods/initConnection.md +++ b/old_docs/API_docs_v57/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/invokeWithLayer.md b/old_docs/API_docs_v57/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v57/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v57/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_addChatUser.md b/old_docs/API_docs_v57/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v57/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v57/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_checkChatInvite.md b/old_docs/API_docs_v57/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v57/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v57/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_createChat.md b/old_docs/API_docs_v57/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v57/methods/messages_createChat.md +++ b/old_docs/API_docs_v57/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_deleteChatUser.md b/old_docs/API_docs_v57/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v57/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v57/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_deleteHistory.md b/old_docs/API_docs_v57/methods/messages_deleteHistory.md index fb9b77639..ce6ba6e70 100644 --- a/old_docs/API_docs_v57/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v57/methods/messages_deleteHistory.md @@ -20,6 +20,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_deleteMessages.md b/old_docs/API_docs_v57/methods/messages_deleteMessages.md index 6ff68f5b3..65dbbc4ae 100644 --- a/old_docs/API_docs_v57/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v57/methods/messages_deleteMessages.md @@ -18,6 +18,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_editChatAdmin.md b/old_docs/API_docs_v57/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v57/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v57/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_editChatPhoto.md b/old_docs/API_docs_v57/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v57/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v57/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_editChatTitle.md b/old_docs/API_docs_v57/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v57/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v57/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v57/methods/messages_editInlineBotMessage.md index 083d4a61b..621c81a37 100644 --- a/old_docs/API_docs_v57/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v57/methods/messages_editInlineBotMessage.md @@ -23,6 +23,14 @@ description: messages.editInlineBotMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_editMessage.md b/old_docs/API_docs_v57/methods/messages_editMessage.md index a2766336e..b8cdda817 100644 --- a/old_docs/API_docs_v57/methods/messages_editMessage.md +++ b/old_docs/API_docs_v57/methods/messages_editMessage.md @@ -24,6 +24,22 @@ description: messages.editMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_exportChatInvite.md b/old_docs/API_docs_v57/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v57/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v57/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_forwardMessage.md b/old_docs/API_docs_v57/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v57/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v57/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_forwardMessages.md b/old_docs/API_docs_v57/methods/messages_forwardMessages.md index 8b91a2086..0f6492002 100644 --- a/old_docs/API_docs_v57/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v57/methods/messages_forwardMessages.md @@ -23,6 +23,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v57/methods/messages_getBotCallbackAnswer.md index 9d9470d05..433144c3d 100644 --- a/old_docs/API_docs_v57/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v57/methods/messages_getBotCallbackAnswer.md @@ -21,6 +21,16 @@ description: messages.getBotCallbackAnswer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getChats.md b/old_docs/API_docs_v57/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v57/methods/messages_getChats.md +++ b/old_docs/API_docs_v57/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getDhConfig.md b/old_docs/API_docs_v57/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v57/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v57/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getDialogs.md b/old_docs/API_docs_v57/methods/messages_getDialogs.md index d59c49555..4c278eae2 100644 --- a/old_docs/API_docs_v57/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v57/methods/messages_getDialogs.md @@ -21,6 +21,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v57/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/old_docs/API_docs_v57/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v57/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getGameHighScores.md b/old_docs/API_docs_v57/methods/messages_getGameHighScores.md index d558df8a6..935bb95a7 100644 --- a/old_docs/API_docs_v57/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v57/methods/messages_getGameHighScores.md @@ -20,6 +20,14 @@ description: messages.getGameHighScores parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getHistory.md b/old_docs/API_docs_v57/methods/messages_getHistory.md index 273eb6a91..a48a465eb 100644 --- a/old_docs/API_docs_v57/methods/messages_getHistory.md +++ b/old_docs/API_docs_v57/methods/messages_getHistory.md @@ -24,6 +24,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v57/methods/messages_getInlineBotResults.md index f5da1c5a0..61366580b 100644 --- a/old_docs/API_docs_v57/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v57/methods/messages_getInlineBotResults.md @@ -22,6 +22,16 @@ description: messages.getInlineBotResults parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INLINE_DISABLED|This bot can't be used in inline mode| +|BOT_INVALID|This is not a valid bot| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v57/methods/messages_getInlineGameHighScores.md index 24b512ca2..7cc04d0de 100644 --- a/old_docs/API_docs_v57/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v57/methods/messages_getInlineGameHighScores.md @@ -19,6 +19,14 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getMessageEditData.md b/old_docs/API_docs_v57/methods/messages_getMessageEditData.md index ee07fd74e..a8b135c67 100644 --- a/old_docs/API_docs_v57/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v57/methods/messages_getMessageEditData.md @@ -19,6 +19,14 @@ description: messages.getMessageEditData parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getMessagesViews.md b/old_docs/API_docs_v57/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v57/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v57/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v57/methods/messages_getPeerDialogs.md index e388e309c..3da60038f 100644 --- a/old_docs/API_docs_v57/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v57/methods/messages_getPeerDialogs.md @@ -18,6 +18,14 @@ description: messages.getPeerDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getPeerSettings.md b/old_docs/API_docs_v57/methods/messages_getPeerSettings.md index 26776c43b..d3e3cfc39 100644 --- a/old_docs/API_docs_v57/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v57/methods/messages_getPeerSettings.md @@ -18,6 +18,14 @@ description: messages.getPeerSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_getStickerSet.md b/old_docs/API_docs_v57/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v57/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v57/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_hideReportSpam.md b/old_docs/API_docs_v57/methods/messages_hideReportSpam.md index 20bc6f186..2dfe4dd7a 100644 --- a/old_docs/API_docs_v57/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v57/methods/messages_hideReportSpam.md @@ -18,6 +18,13 @@ description: messages.hideReportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_importChatInvite.md b/old_docs/API_docs_v57/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v57/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v57/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_installStickerSet.md b/old_docs/API_docs_v57/methods/messages_installStickerSet.md index 6073eb13b..3dde52a75 100644 --- a/old_docs/API_docs_v57/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v57/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_migrateChat.md b/old_docs/API_docs_v57/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v57/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v57/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v57/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v57/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v57/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_readHistory.md b/old_docs/API_docs_v57/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v57/methods/messages_readHistory.md +++ b/old_docs/API_docs_v57/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_receivedQueue.md b/old_docs/API_docs_v57/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v57/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v57/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_reportSpam.md b/old_docs/API_docs_v57/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v57/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v57/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_saveDraft.md b/old_docs/API_docs_v57/methods/messages_saveDraft.md index ef5e65c57..42308b46f 100644 --- a/old_docs/API_docs_v57/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v57/methods/messages_saveDraft.md @@ -23,6 +23,13 @@ description: messages.saveDraft parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_saveGif.md b/old_docs/API_docs_v57/methods/messages_saveGif.md index 2d41d5338..31e486320 100644 --- a/old_docs/API_docs_v57/methods/messages_saveGif.md +++ b/old_docs/API_docs_v57/methods/messages_saveGif.md @@ -19,6 +19,13 @@ description: messages.saveGif parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|GIF_ID_INVALID|The provided GIF ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v57/methods/messages_saveRecentSticker.md index cb4f98b35..8d45be5ef 100644 --- a/old_docs/API_docs_v57/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v57/methods/messages_saveRecentSticker.md @@ -20,6 +20,13 @@ description: messages.saveRecentSticker parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKER_ID_INVALID|The provided sticker ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_search.md b/old_docs/API_docs_v57/methods/messages_search.md index 01e4c6143..5f49d0163 100644 --- a/old_docs/API_docs_v57/methods/messages_search.md +++ b/old_docs/API_docs_v57/methods/messages_search.md @@ -25,6 +25,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_searchGifs.md b/old_docs/API_docs_v57/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/old_docs/API_docs_v57/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v57/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_searchGlobal.md b/old_docs/API_docs_v57/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v57/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v57/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_sendEncrypted.md b/old_docs/API_docs_v57/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v57/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v57/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v57/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v57/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v57/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v57/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v57/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v57/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v57/methods/messages_sendInlineBotResult.md index 6ab41f500..6aeeb67d5 100644 --- a/old_docs/API_docs_v57/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v57/methods/messages_sendInlineBotResult.md @@ -24,6 +24,16 @@ description: messages.sendInlineBotResult parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INLINE_RESULT_EXPIRED|The inline query expired| +|PEER_ID_INVALID|The provided peer id is invalid| +|QUERY_ID_EMPTY|The query ID is empty| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_sendMedia.md b/old_docs/API_docs_v57/methods/messages_sendMedia.md index 68e2c41be..8c22e1c9f 100644 --- a/old_docs/API_docs_v57/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v57/methods/messages_sendMedia.md @@ -24,6 +24,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_sendMessage.md b/old_docs/API_docs_v57/methods/messages_sendMessage.md index cabccdb33..60b50412f 100644 --- a/old_docs/API_docs_v57/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v57/methods/messages_sendMessage.md @@ -27,6 +27,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v57/methods/messages_setBotCallbackAnswer.md index cf6845b73..fb10afe1a 100644 --- a/old_docs/API_docs_v57/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v57/methods/messages_setBotCallbackAnswer.md @@ -21,6 +21,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v57/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v57/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v57/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_setGameScore.md b/old_docs/API_docs_v57/methods/messages_setGameScore.md index ffde63a4b..795974e96 100644 --- a/old_docs/API_docs_v57/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v57/methods/messages_setGameScore.md @@ -22,6 +22,14 @@ description: messages.setGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v57/methods/messages_setInlineBotResults.md index cf74e5e4b..8b5625f34 100644 --- a/old_docs/API_docs_v57/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v57/methods/messages_setInlineBotResults.md @@ -24,6 +24,23 @@ description: messages.setInlineBotResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ARTICLE_TITLE_EMPTY|The title of the article is empty| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|MESSAGE_EMPTY|The provided message is empty| +|QUERY_ID_INVALID|The query ID is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|RESULT_TYPE_INVALID|Result type invalid| +|SEND_MESSAGE_TYPE_INVALID|The message type is invalid| +|START_PARAM_INVALID|Start parameter invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v57/methods/messages_setInlineGameScore.md index fa7f1a55a..a91ad6a74 100644 --- a/old_docs/API_docs_v57/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v57/methods/messages_setInlineGameScore.md @@ -21,6 +21,14 @@ description: messages.setInlineGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_setTyping.md b/old_docs/API_docs_v57/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v57/methods/messages_setTyping.md +++ b/old_docs/API_docs_v57/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_startBot.md b/old_docs/API_docs_v57/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v57/methods/messages_startBot.md +++ b/old_docs/API_docs_v57/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v57/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v57/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v57/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v57/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v57/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v57/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/photos_getUserPhotos.md b/old_docs/API_docs_v57/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v57/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v57/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v57/methods/photos_uploadProfilePhoto.md index 6de32dae0..58541f235 100644 --- a/old_docs/API_docs_v57/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v57/methods/photos_uploadProfilePhoto.md @@ -18,6 +18,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v57/methods/users_getUsers.md b/old_docs/API_docs_v57/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v57/methods/users_getUsers.md +++ b/old_docs/API_docs_v57/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_changePhone.md b/old_docs/API_docs_v62/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v62/methods/account_changePhone.md +++ b/old_docs/API_docs_v62/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_checkUsername.md b/old_docs/API_docs_v62/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v62/methods/account_checkUsername.md +++ b/old_docs/API_docs_v62/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_confirmPhone.md b/old_docs/API_docs_v62/methods/account_confirmPhone.md index c2526b2ad..0d2dc5c64 100644 --- a/old_docs/API_docs_v62/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v62/methods/account_confirmPhone.md @@ -19,6 +19,14 @@ description: account.confirmPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_HASH_INVALID|Code hash invalid| +|PHONE_CODE_EMPTY|phone_code is missing| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_getNotifySettings.md b/old_docs/API_docs_v62/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v62/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v62/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_getPasswordSettings.md b/old_docs/API_docs_v62/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v62/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v62/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_getPrivacy.md b/old_docs/API_docs_v62/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v62/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v62/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_registerDevice.md b/old_docs/API_docs_v62/methods/account_registerDevice.md index 6865551ee..3cc7f98d4 100644 --- a/old_docs/API_docs_v62/methods/account_registerDevice.md +++ b/old_docs/API_docs_v62/methods/account_registerDevice.md @@ -19,6 +19,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_reportPeer.md b/old_docs/API_docs_v62/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v62/methods/account_reportPeer.md +++ b/old_docs/API_docs_v62/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_resetAuthorization.md b/old_docs/API_docs_v62/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v62/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v62/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v62/methods/account_sendChangePhoneCode.md index a1f49156d..4be218f24 100644 --- a/old_docs/API_docs_v62/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v62/methods/account_sendChangePhoneCode.md @@ -20,6 +20,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v62/methods/account_sendConfirmPhoneCode.md index 5ad44987b..009fcb09b 100644 --- a/old_docs/API_docs_v62/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v62/methods/account_sendConfirmPhoneCode.md @@ -20,6 +20,13 @@ description: account.sendConfirmPhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_setAccountTTL.md b/old_docs/API_docs_v62/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v62/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v62/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_setPrivacy.md b/old_docs/API_docs_v62/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v62/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v62/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_unregisterDevice.md b/old_docs/API_docs_v62/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v62/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v62/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_updateNotifySettings.md b/old_docs/API_docs_v62/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v62/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v62/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v62/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v62/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v62/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_updateProfile.md b/old_docs/API_docs_v62/methods/account_updateProfile.md index 531bbb028..a50eaea58 100644 --- a/old_docs/API_docs_v62/methods/account_updateProfile.md +++ b/old_docs/API_docs_v62/methods/account_updateProfile.md @@ -20,6 +20,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_updateStatus.md b/old_docs/API_docs_v62/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v62/methods/account_updateStatus.md +++ b/old_docs/API_docs_v62/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/account_updateUsername.md b/old_docs/API_docs_v62/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v62/methods/account_updateUsername.md +++ b/old_docs/API_docs_v62/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v62/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v62/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v62/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/auth_cancelCode.md b/old_docs/API_docs_v62/methods/auth_cancelCode.md index cc93fff5b..dc390329f 100644 --- a/old_docs/API_docs_v62/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v62/methods/auth_cancelCode.md @@ -19,6 +19,13 @@ description: auth.cancelCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/auth_checkPassword.md b/old_docs/API_docs_v62/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v62/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v62/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/auth_checkPhone.md b/old_docs/API_docs_v62/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v62/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v62/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/auth_exportAuthorization.md b/old_docs/API_docs_v62/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v62/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v62/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/auth_importAuthorization.md b/old_docs/API_docs_v62/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v62/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v62/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/auth_recoverPassword.md b/old_docs/API_docs_v62/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v62/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v62/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v62/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v62/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v62/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/auth_resendCode.md b/old_docs/API_docs_v62/methods/auth_resendCode.md index 92f7aa308..14d08ddd1 100644 --- a/old_docs/API_docs_v62/methods/auth_resendCode.md +++ b/old_docs/API_docs_v62/methods/auth_resendCode.md @@ -19,6 +19,13 @@ description: auth.resendCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v62/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v62/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v62/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/auth_sendInvites.md b/old_docs/API_docs_v62/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v62/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v62/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_checkUsername.md b/old_docs/API_docs_v62/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v62/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v62/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_createChannel.md b/old_docs/API_docs_v62/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v62/methods/channels_createChannel.md +++ b/old_docs/API_docs_v62/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_deleteChannel.md b/old_docs/API_docs_v62/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v62/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v62/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_deleteMessages.md b/old_docs/API_docs_v62/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v62/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v62/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v62/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v62/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v62/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_editAbout.md b/old_docs/API_docs_v62/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v62/methods/channels_editAbout.md +++ b/old_docs/API_docs_v62/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_editAdmin.md b/old_docs/API_docs_v62/methods/channels_editAdmin.md index cb8212977..7707bdfe7 100644 --- a/old_docs/API_docs_v62/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v62/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_editPhoto.md b/old_docs/API_docs_v62/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v62/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v62/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_editTitle.md b/old_docs/API_docs_v62/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v62/methods/channels_editTitle.md +++ b/old_docs/API_docs_v62/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_exportInvite.md b/old_docs/API_docs_v62/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v62/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v62/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_exportMessageLink.md b/old_docs/API_docs_v62/methods/channels_exportMessageLink.md index 9e7135ab8..9831c9c03 100644 --- a/old_docs/API_docs_v62/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v62/methods/channels_exportMessageLink.md @@ -19,6 +19,13 @@ description: channels.exportMessageLink parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_getChannels.md b/old_docs/API_docs_v62/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v62/methods/channels_getChannels.md +++ b/old_docs/API_docs_v62/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_getMessages.md b/old_docs/API_docs_v62/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v62/methods/channels_getMessages.md +++ b/old_docs/API_docs_v62/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_getParticipant.md b/old_docs/API_docs_v62/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v62/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v62/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_inviteToChannel.md b/old_docs/API_docs_v62/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v62/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v62/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_joinChannel.md b/old_docs/API_docs_v62/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v62/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v62/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_leaveChannel.md b/old_docs/API_docs_v62/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v62/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v62/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_readHistory.md b/old_docs/API_docs_v62/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v62/methods/channels_readHistory.md +++ b/old_docs/API_docs_v62/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_reportSpam.md b/old_docs/API_docs_v62/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v62/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v62/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_toggleInvites.md b/old_docs/API_docs_v62/methods/channels_toggleInvites.md index 0733d419f..c2715b323 100644 --- a/old_docs/API_docs_v62/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v62/methods/channels_toggleInvites.md @@ -19,6 +19,15 @@ description: channels.toggleInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_toggleSignatures.md b/old_docs/API_docs_v62/methods/channels_toggleSignatures.md index 3056eaee8..a214b8493 100644 --- a/old_docs/API_docs_v62/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v62/methods/channels_toggleSignatures.md @@ -19,6 +19,13 @@ description: channels.toggleSignatures parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v62/methods/channels_updatePinnedMessage.md index d2314d851..7376df10a 100644 --- a/old_docs/API_docs_v62/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v62/methods/channels_updatePinnedMessage.md @@ -20,6 +20,15 @@ description: channels.updatePinnedMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/channels_updateUsername.md b/old_docs/API_docs_v62/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v62/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v62/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/contacts_block.md b/old_docs/API_docs_v62/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v62/methods/contacts_block.md +++ b/old_docs/API_docs_v62/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/contacts_deleteContact.md b/old_docs/API_docs_v62/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v62/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v62/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/contacts_deleteContacts.md b/old_docs/API_docs_v62/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v62/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v62/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/contacts_getTopPeers.md b/old_docs/API_docs_v62/methods/contacts_getTopPeers.md index 60967d060..1caa1d779 100644 --- a/old_docs/API_docs_v62/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v62/methods/contacts_getTopPeers.md @@ -25,6 +25,13 @@ description: contacts.getTopPeers parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TYPES_EMPTY|The types field is empty| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/contacts_importCard.md b/old_docs/API_docs_v62/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v62/methods/contacts_importCard.md +++ b/old_docs/API_docs_v62/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v62/methods/contacts_resetTopPeerRating.md index 2f7841892..738494b2e 100644 --- a/old_docs/API_docs_v62/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v62/methods/contacts_resetTopPeerRating.md @@ -19,6 +19,13 @@ description: contacts.resetTopPeerRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/contacts_search.md b/old_docs/API_docs_v62/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v62/methods/contacts_search.md +++ b/old_docs/API_docs_v62/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/contacts_unblock.md b/old_docs/API_docs_v62/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v62/methods/contacts_unblock.md +++ b/old_docs/API_docs_v62/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/help_getConfig.md b/old_docs/API_docs_v62/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v62/methods/help_getConfig.md +++ b/old_docs/API_docs_v62/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/initConnection.md b/old_docs/API_docs_v62/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v62/methods/initConnection.md +++ b/old_docs/API_docs_v62/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/invokeWithLayer.md b/old_docs/API_docs_v62/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v62/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v62/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_addChatUser.md b/old_docs/API_docs_v62/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v62/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v62/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_checkChatInvite.md b/old_docs/API_docs_v62/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v62/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v62/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_createChat.md b/old_docs/API_docs_v62/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v62/methods/messages_createChat.md +++ b/old_docs/API_docs_v62/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_deleteChatUser.md b/old_docs/API_docs_v62/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v62/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v62/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_deleteHistory.md b/old_docs/API_docs_v62/methods/messages_deleteHistory.md index fb9b77639..ce6ba6e70 100644 --- a/old_docs/API_docs_v62/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v62/methods/messages_deleteHistory.md @@ -20,6 +20,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_deleteMessages.md b/old_docs/API_docs_v62/methods/messages_deleteMessages.md index 2949f64a4..2b88a73fc 100644 --- a/old_docs/API_docs_v62/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v62/methods/messages_deleteMessages.md @@ -19,6 +19,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_editChatAdmin.md b/old_docs/API_docs_v62/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v62/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v62/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_editChatPhoto.md b/old_docs/API_docs_v62/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v62/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v62/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_editChatTitle.md b/old_docs/API_docs_v62/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v62/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v62/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v62/methods/messages_editInlineBotMessage.md index 083d4a61b..621c81a37 100644 --- a/old_docs/API_docs_v62/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v62/methods/messages_editInlineBotMessage.md @@ -23,6 +23,14 @@ description: messages.editInlineBotMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_editMessage.md b/old_docs/API_docs_v62/methods/messages_editMessage.md index a2766336e..b8cdda817 100644 --- a/old_docs/API_docs_v62/methods/messages_editMessage.md +++ b/old_docs/API_docs_v62/methods/messages_editMessage.md @@ -24,6 +24,22 @@ description: messages.editMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_exportChatInvite.md b/old_docs/API_docs_v62/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v62/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v62/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_forwardMessage.md b/old_docs/API_docs_v62/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v62/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v62/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_forwardMessages.md b/old_docs/API_docs_v62/methods/messages_forwardMessages.md index 8b91a2086..0f6492002 100644 --- a/old_docs/API_docs_v62/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v62/methods/messages_forwardMessages.md @@ -23,6 +23,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v62/methods/messages_getBotCallbackAnswer.md index 9d9470d05..433144c3d 100644 --- a/old_docs/API_docs_v62/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v62/methods/messages_getBotCallbackAnswer.md @@ -21,6 +21,16 @@ description: messages.getBotCallbackAnswer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getChats.md b/old_docs/API_docs_v62/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v62/methods/messages_getChats.md +++ b/old_docs/API_docs_v62/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getCommonChats.md b/old_docs/API_docs_v62/methods/messages_getCommonChats.md index 985a52dff..0c601ca98 100644 --- a/old_docs/API_docs_v62/methods/messages_getCommonChats.md +++ b/old_docs/API_docs_v62/methods/messages_getCommonChats.md @@ -20,6 +20,13 @@ description: messages.getCommonChats parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getDhConfig.md b/old_docs/API_docs_v62/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v62/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v62/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getDialogs.md b/old_docs/API_docs_v62/methods/messages_getDialogs.md index e38aa9965..131b75b7a 100644 --- a/old_docs/API_docs_v62/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v62/methods/messages_getDialogs.md @@ -22,6 +22,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v62/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/old_docs/API_docs_v62/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v62/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getGameHighScores.md b/old_docs/API_docs_v62/methods/messages_getGameHighScores.md index d558df8a6..935bb95a7 100644 --- a/old_docs/API_docs_v62/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v62/methods/messages_getGameHighScores.md @@ -20,6 +20,14 @@ description: messages.getGameHighScores parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getHistory.md b/old_docs/API_docs_v62/methods/messages_getHistory.md index 273eb6a91..a48a465eb 100644 --- a/old_docs/API_docs_v62/methods/messages_getHistory.md +++ b/old_docs/API_docs_v62/methods/messages_getHistory.md @@ -24,6 +24,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v62/methods/messages_getInlineBotResults.md index f5da1c5a0..61366580b 100644 --- a/old_docs/API_docs_v62/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v62/methods/messages_getInlineBotResults.md @@ -22,6 +22,16 @@ description: messages.getInlineBotResults parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INLINE_DISABLED|This bot can't be used in inline mode| +|BOT_INVALID|This is not a valid bot| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v62/methods/messages_getInlineGameHighScores.md index 24b512ca2..7cc04d0de 100644 --- a/old_docs/API_docs_v62/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v62/methods/messages_getInlineGameHighScores.md @@ -19,6 +19,14 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getMessageEditData.md b/old_docs/API_docs_v62/methods/messages_getMessageEditData.md index ee07fd74e..a8b135c67 100644 --- a/old_docs/API_docs_v62/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v62/methods/messages_getMessageEditData.md @@ -19,6 +19,14 @@ description: messages.getMessageEditData parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getMessagesViews.md b/old_docs/API_docs_v62/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v62/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v62/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v62/methods/messages_getPeerDialogs.md index e388e309c..3da60038f 100644 --- a/old_docs/API_docs_v62/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v62/methods/messages_getPeerDialogs.md @@ -18,6 +18,14 @@ description: messages.getPeerDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getPeerSettings.md b/old_docs/API_docs_v62/methods/messages_getPeerSettings.md index 26776c43b..d3e3cfc39 100644 --- a/old_docs/API_docs_v62/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v62/methods/messages_getPeerSettings.md @@ -18,6 +18,14 @@ description: messages.getPeerSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getStickerSet.md b/old_docs/API_docs_v62/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v62/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v62/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_getWebPage.md b/old_docs/API_docs_v62/methods/messages_getWebPage.md index 81591daf5..35f6e5456 100644 --- a/old_docs/API_docs_v62/methods/messages_getWebPage.md +++ b/old_docs/API_docs_v62/methods/messages_getWebPage.md @@ -19,6 +19,13 @@ description: messages.getWebPage parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|WC_CONVERT_URL_INVALID|WC convert URL invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_hideReportSpam.md b/old_docs/API_docs_v62/methods/messages_hideReportSpam.md index 20bc6f186..2dfe4dd7a 100644 --- a/old_docs/API_docs_v62/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v62/methods/messages_hideReportSpam.md @@ -18,6 +18,13 @@ description: messages.hideReportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_importChatInvite.md b/old_docs/API_docs_v62/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v62/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v62/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_installStickerSet.md b/old_docs/API_docs_v62/methods/messages_installStickerSet.md index 6073eb13b..3dde52a75 100644 --- a/old_docs/API_docs_v62/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v62/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_migrateChat.md b/old_docs/API_docs_v62/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v62/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v62/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v62/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v62/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v62/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_readHistory.md b/old_docs/API_docs_v62/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v62/methods/messages_readHistory.md +++ b/old_docs/API_docs_v62/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_receivedQueue.md b/old_docs/API_docs_v62/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v62/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v62/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_reorderPinnedDialogs.md b/old_docs/API_docs_v62/methods/messages_reorderPinnedDialogs.md index 2660b3633..30102fd7a 100644 --- a/old_docs/API_docs_v62/methods/messages_reorderPinnedDialogs.md +++ b/old_docs/API_docs_v62/methods/messages_reorderPinnedDialogs.md @@ -19,6 +19,13 @@ description: messages.reorderPinnedDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_reportEncryptedSpam.md b/old_docs/API_docs_v62/methods/messages_reportEncryptedSpam.md index 5764b8486..30ef34732 100644 --- a/old_docs/API_docs_v62/methods/messages_reportEncryptedSpam.md +++ b/old_docs/API_docs_v62/methods/messages_reportEncryptedSpam.md @@ -18,6 +18,13 @@ description: messages.reportEncryptedSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_reportSpam.md b/old_docs/API_docs_v62/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v62/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v62/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_saveDraft.md b/old_docs/API_docs_v62/methods/messages_saveDraft.md index ef5e65c57..42308b46f 100644 --- a/old_docs/API_docs_v62/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v62/methods/messages_saveDraft.md @@ -23,6 +23,13 @@ description: messages.saveDraft parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_saveGif.md b/old_docs/API_docs_v62/methods/messages_saveGif.md index 2d41d5338..31e486320 100644 --- a/old_docs/API_docs_v62/methods/messages_saveGif.md +++ b/old_docs/API_docs_v62/methods/messages_saveGif.md @@ -19,6 +19,13 @@ description: messages.saveGif parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|GIF_ID_INVALID|The provided GIF ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v62/methods/messages_saveRecentSticker.md index cb4f98b35..8d45be5ef 100644 --- a/old_docs/API_docs_v62/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v62/methods/messages_saveRecentSticker.md @@ -20,6 +20,13 @@ description: messages.saveRecentSticker parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKER_ID_INVALID|The provided sticker ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_search.md b/old_docs/API_docs_v62/methods/messages_search.md index 01e4c6143..5f49d0163 100644 --- a/old_docs/API_docs_v62/methods/messages_search.md +++ b/old_docs/API_docs_v62/methods/messages_search.md @@ -25,6 +25,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_searchGifs.md b/old_docs/API_docs_v62/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/old_docs/API_docs_v62/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v62/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_searchGlobal.md b/old_docs/API_docs_v62/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v62/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v62/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_sendEncrypted.md b/old_docs/API_docs_v62/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v62/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v62/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v62/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v62/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v62/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v62/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v62/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v62/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v62/methods/messages_sendInlineBotResult.md index 6ab41f500..6aeeb67d5 100644 --- a/old_docs/API_docs_v62/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v62/methods/messages_sendInlineBotResult.md @@ -24,6 +24,16 @@ description: messages.sendInlineBotResult parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INLINE_RESULT_EXPIRED|The inline query expired| +|PEER_ID_INVALID|The provided peer id is invalid| +|QUERY_ID_EMPTY|The query ID is empty| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_sendMedia.md b/old_docs/API_docs_v62/methods/messages_sendMedia.md index 68e2c41be..8c22e1c9f 100644 --- a/old_docs/API_docs_v62/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v62/methods/messages_sendMedia.md @@ -24,6 +24,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_sendMessage.md b/old_docs/API_docs_v62/methods/messages_sendMessage.md index cabccdb33..60b50412f 100644 --- a/old_docs/API_docs_v62/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v62/methods/messages_sendMessage.md @@ -27,6 +27,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v62/methods/messages_setBotCallbackAnswer.md index ef9b8f7a8..2c51854ff 100644 --- a/old_docs/API_docs_v62/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v62/methods/messages_setBotCallbackAnswer.md @@ -22,6 +22,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v62/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v62/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v62/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_setGameScore.md b/old_docs/API_docs_v62/methods/messages_setGameScore.md index f16a7539c..3137f7c91 100644 --- a/old_docs/API_docs_v62/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v62/methods/messages_setGameScore.md @@ -23,6 +23,14 @@ description: messages.setGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v62/methods/messages_setInlineBotResults.md index cf74e5e4b..8b5625f34 100644 --- a/old_docs/API_docs_v62/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v62/methods/messages_setInlineBotResults.md @@ -24,6 +24,23 @@ description: messages.setInlineBotResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ARTICLE_TITLE_EMPTY|The title of the article is empty| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|MESSAGE_EMPTY|The provided message is empty| +|QUERY_ID_INVALID|The query ID is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|RESULT_TYPE_INVALID|Result type invalid| +|SEND_MESSAGE_TYPE_INVALID|The message type is invalid| +|START_PARAM_INVALID|Start parameter invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v62/methods/messages_setInlineGameScore.md index c922f937b..36752f351 100644 --- a/old_docs/API_docs_v62/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v62/methods/messages_setInlineGameScore.md @@ -22,6 +22,14 @@ description: messages.setInlineGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_setTyping.md b/old_docs/API_docs_v62/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v62/methods/messages_setTyping.md +++ b/old_docs/API_docs_v62/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_startBot.md b/old_docs/API_docs_v62/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v62/methods/messages_startBot.md +++ b/old_docs/API_docs_v62/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v62/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v62/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v62/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_toggleDialogPin.md b/old_docs/API_docs_v62/methods/messages_toggleDialogPin.md index f4506918c..f35f2f401 100644 --- a/old_docs/API_docs_v62/methods/messages_toggleDialogPin.md +++ b/old_docs/API_docs_v62/methods/messages_toggleDialogPin.md @@ -19,6 +19,13 @@ description: messages.toggleDialogPin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v62/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v62/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v62/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/phone_receivedCall.md b/old_docs/API_docs_v62/methods/phone_receivedCall.md index b06a90adc..9d59b1eae 100644 --- a/old_docs/API_docs_v62/methods/phone_receivedCall.md +++ b/old_docs/API_docs_v62/methods/phone_receivedCall.md @@ -18,6 +18,14 @@ description: phone.receivedCall parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_ALREADY_DECLINED|The call was already declined| +|CALL_PEER_INVALID|The provided call peer object is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/photos_getUserPhotos.md b/old_docs/API_docs_v62/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v62/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v62/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v62/methods/photos_uploadProfilePhoto.md index 6de32dae0..58541f235 100644 --- a/old_docs/API_docs_v62/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v62/methods/photos_uploadProfilePhoto.md @@ -18,6 +18,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v62/methods/users_getUsers.md b/old_docs/API_docs_v62/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v62/methods/users_getUsers.md +++ b/old_docs/API_docs_v62/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_changePhone.md b/old_docs/API_docs_v65/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v65/methods/account_changePhone.md +++ b/old_docs/API_docs_v65/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_checkUsername.md b/old_docs/API_docs_v65/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v65/methods/account_checkUsername.md +++ b/old_docs/API_docs_v65/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_confirmPhone.md b/old_docs/API_docs_v65/methods/account_confirmPhone.md index c2526b2ad..0d2dc5c64 100644 --- a/old_docs/API_docs_v65/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v65/methods/account_confirmPhone.md @@ -19,6 +19,14 @@ description: account.confirmPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_HASH_INVALID|Code hash invalid| +|PHONE_CODE_EMPTY|phone_code is missing| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_getNotifySettings.md b/old_docs/API_docs_v65/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v65/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v65/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_getPasswordSettings.md b/old_docs/API_docs_v65/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v65/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v65/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_getPrivacy.md b/old_docs/API_docs_v65/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v65/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v65/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_getTmpPassword.md b/old_docs/API_docs_v65/methods/account_getTmpPassword.md index c368baf7e..83ab09b16 100644 --- a/old_docs/API_docs_v65/methods/account_getTmpPassword.md +++ b/old_docs/API_docs_v65/methods/account_getTmpPassword.md @@ -19,6 +19,14 @@ description: account.getTmpPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| +|TMP_PASSWORD_DISABLED|The temporary password is disabled| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_registerDevice.md b/old_docs/API_docs_v65/methods/account_registerDevice.md index 6865551ee..3cc7f98d4 100644 --- a/old_docs/API_docs_v65/methods/account_registerDevice.md +++ b/old_docs/API_docs_v65/methods/account_registerDevice.md @@ -19,6 +19,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_reportPeer.md b/old_docs/API_docs_v65/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v65/methods/account_reportPeer.md +++ b/old_docs/API_docs_v65/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_resetAuthorization.md b/old_docs/API_docs_v65/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v65/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v65/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v65/methods/account_sendChangePhoneCode.md index a1f49156d..4be218f24 100644 --- a/old_docs/API_docs_v65/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v65/methods/account_sendChangePhoneCode.md @@ -20,6 +20,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v65/methods/account_sendConfirmPhoneCode.md index 5ad44987b..009fcb09b 100644 --- a/old_docs/API_docs_v65/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v65/methods/account_sendConfirmPhoneCode.md @@ -20,6 +20,13 @@ description: account.sendConfirmPhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_setAccountTTL.md b/old_docs/API_docs_v65/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v65/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v65/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_setPrivacy.md b/old_docs/API_docs_v65/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v65/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v65/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_unregisterDevice.md b/old_docs/API_docs_v65/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v65/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v65/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_updateNotifySettings.md b/old_docs/API_docs_v65/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v65/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v65/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v65/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v65/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v65/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_updateProfile.md b/old_docs/API_docs_v65/methods/account_updateProfile.md index 531bbb028..a50eaea58 100644 --- a/old_docs/API_docs_v65/methods/account_updateProfile.md +++ b/old_docs/API_docs_v65/methods/account_updateProfile.md @@ -20,6 +20,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_updateStatus.md b/old_docs/API_docs_v65/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v65/methods/account_updateStatus.md +++ b/old_docs/API_docs_v65/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/account_updateUsername.md b/old_docs/API_docs_v65/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v65/methods/account_updateUsername.md +++ b/old_docs/API_docs_v65/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v65/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v65/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v65/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/auth_cancelCode.md b/old_docs/API_docs_v65/methods/auth_cancelCode.md index cc93fff5b..dc390329f 100644 --- a/old_docs/API_docs_v65/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v65/methods/auth_cancelCode.md @@ -19,6 +19,13 @@ description: auth.cancelCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/auth_checkPassword.md b/old_docs/API_docs_v65/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v65/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v65/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/auth_checkPhone.md b/old_docs/API_docs_v65/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v65/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v65/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/auth_exportAuthorization.md b/old_docs/API_docs_v65/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v65/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v65/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/auth_importAuthorization.md b/old_docs/API_docs_v65/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v65/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v65/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/auth_recoverPassword.md b/old_docs/API_docs_v65/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v65/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v65/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v65/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v65/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v65/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/auth_resendCode.md b/old_docs/API_docs_v65/methods/auth_resendCode.md index 92f7aa308..14d08ddd1 100644 --- a/old_docs/API_docs_v65/methods/auth_resendCode.md +++ b/old_docs/API_docs_v65/methods/auth_resendCode.md @@ -19,6 +19,13 @@ description: auth.resendCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v65/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v65/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v65/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/auth_sendInvites.md b/old_docs/API_docs_v65/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v65/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v65/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/bots_answerWebhookJSONQuery.md b/old_docs/API_docs_v65/methods/bots_answerWebhookJSONQuery.md index 59c134d45..ae1efce3b 100644 --- a/old_docs/API_docs_v65/methods/bots_answerWebhookJSONQuery.md +++ b/old_docs/API_docs_v65/methods/bots_answerWebhookJSONQuery.md @@ -19,6 +19,14 @@ description: bots.answerWebhookJSONQuery parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/bots_sendCustomRequest.md b/old_docs/API_docs_v65/methods/bots_sendCustomRequest.md index 57a49e6e3..927f18c5a 100644 --- a/old_docs/API_docs_v65/methods/bots_sendCustomRequest.md +++ b/old_docs/API_docs_v65/methods/bots_sendCustomRequest.md @@ -19,6 +19,13 @@ description: bots.sendCustomRequest parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_checkUsername.md b/old_docs/API_docs_v65/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v65/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v65/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_createChannel.md b/old_docs/API_docs_v65/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v65/methods/channels_createChannel.md +++ b/old_docs/API_docs_v65/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_deleteChannel.md b/old_docs/API_docs_v65/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v65/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v65/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_deleteMessages.md b/old_docs/API_docs_v65/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v65/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v65/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v65/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v65/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v65/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_editAbout.md b/old_docs/API_docs_v65/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v65/methods/channels_editAbout.md +++ b/old_docs/API_docs_v65/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_editAdmin.md b/old_docs/API_docs_v65/methods/channels_editAdmin.md index cb8212977..7707bdfe7 100644 --- a/old_docs/API_docs_v65/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v65/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_editPhoto.md b/old_docs/API_docs_v65/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v65/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v65/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_editTitle.md b/old_docs/API_docs_v65/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v65/methods/channels_editTitle.md +++ b/old_docs/API_docs_v65/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_exportInvite.md b/old_docs/API_docs_v65/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v65/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v65/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_exportMessageLink.md b/old_docs/API_docs_v65/methods/channels_exportMessageLink.md index 9e7135ab8..9831c9c03 100644 --- a/old_docs/API_docs_v65/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v65/methods/channels_exportMessageLink.md @@ -19,6 +19,13 @@ description: channels.exportMessageLink parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_getChannels.md b/old_docs/API_docs_v65/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v65/methods/channels_getChannels.md +++ b/old_docs/API_docs_v65/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_getMessages.md b/old_docs/API_docs_v65/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v65/methods/channels_getMessages.md +++ b/old_docs/API_docs_v65/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_getParticipant.md b/old_docs/API_docs_v65/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v65/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v65/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_inviteToChannel.md b/old_docs/API_docs_v65/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v65/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v65/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_joinChannel.md b/old_docs/API_docs_v65/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v65/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v65/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_leaveChannel.md b/old_docs/API_docs_v65/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v65/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v65/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_readHistory.md b/old_docs/API_docs_v65/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v65/methods/channels_readHistory.md +++ b/old_docs/API_docs_v65/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_reportSpam.md b/old_docs/API_docs_v65/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v65/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v65/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_toggleInvites.md b/old_docs/API_docs_v65/methods/channels_toggleInvites.md index 0733d419f..c2715b323 100644 --- a/old_docs/API_docs_v65/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v65/methods/channels_toggleInvites.md @@ -19,6 +19,15 @@ description: channels.toggleInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_toggleSignatures.md b/old_docs/API_docs_v65/methods/channels_toggleSignatures.md index 3056eaee8..a214b8493 100644 --- a/old_docs/API_docs_v65/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v65/methods/channels_toggleSignatures.md @@ -19,6 +19,13 @@ description: channels.toggleSignatures parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v65/methods/channels_updatePinnedMessage.md index d2314d851..7376df10a 100644 --- a/old_docs/API_docs_v65/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v65/methods/channels_updatePinnedMessage.md @@ -20,6 +20,15 @@ description: channels.updatePinnedMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/channels_updateUsername.md b/old_docs/API_docs_v65/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v65/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v65/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/contacts_block.md b/old_docs/API_docs_v65/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v65/methods/contacts_block.md +++ b/old_docs/API_docs_v65/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/contacts_deleteContact.md b/old_docs/API_docs_v65/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v65/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v65/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/contacts_deleteContacts.md b/old_docs/API_docs_v65/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v65/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v65/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/contacts_getTopPeers.md b/old_docs/API_docs_v65/methods/contacts_getTopPeers.md index 60967d060..1caa1d779 100644 --- a/old_docs/API_docs_v65/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v65/methods/contacts_getTopPeers.md @@ -25,6 +25,13 @@ description: contacts.getTopPeers parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TYPES_EMPTY|The types field is empty| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/contacts_importCard.md b/old_docs/API_docs_v65/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v65/methods/contacts_importCard.md +++ b/old_docs/API_docs_v65/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v65/methods/contacts_resetTopPeerRating.md index 2f7841892..738494b2e 100644 --- a/old_docs/API_docs_v65/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v65/methods/contacts_resetTopPeerRating.md @@ -19,6 +19,13 @@ description: contacts.resetTopPeerRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/contacts_search.md b/old_docs/API_docs_v65/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v65/methods/contacts_search.md +++ b/old_docs/API_docs_v65/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/contacts_unblock.md b/old_docs/API_docs_v65/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v65/methods/contacts_unblock.md +++ b/old_docs/API_docs_v65/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/help_getConfig.md b/old_docs/API_docs_v65/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v65/methods/help_getConfig.md +++ b/old_docs/API_docs_v65/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/initConnection.md b/old_docs/API_docs_v65/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v65/methods/initConnection.md +++ b/old_docs/API_docs_v65/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/invokeWithLayer.md b/old_docs/API_docs_v65/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v65/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v65/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_addChatUser.md b/old_docs/API_docs_v65/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v65/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v65/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_checkChatInvite.md b/old_docs/API_docs_v65/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v65/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v65/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_createChat.md b/old_docs/API_docs_v65/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v65/methods/messages_createChat.md +++ b/old_docs/API_docs_v65/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_deleteChatUser.md b/old_docs/API_docs_v65/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v65/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v65/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_deleteHistory.md b/old_docs/API_docs_v65/methods/messages_deleteHistory.md index fb9b77639..ce6ba6e70 100644 --- a/old_docs/API_docs_v65/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v65/methods/messages_deleteHistory.md @@ -20,6 +20,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_deleteMessages.md b/old_docs/API_docs_v65/methods/messages_deleteMessages.md index 2949f64a4..2b88a73fc 100644 --- a/old_docs/API_docs_v65/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v65/methods/messages_deleteMessages.md @@ -19,6 +19,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_editChatAdmin.md b/old_docs/API_docs_v65/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v65/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v65/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_editChatPhoto.md b/old_docs/API_docs_v65/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v65/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v65/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_editChatTitle.md b/old_docs/API_docs_v65/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v65/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v65/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v65/methods/messages_editInlineBotMessage.md index 083d4a61b..621c81a37 100644 --- a/old_docs/API_docs_v65/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v65/methods/messages_editInlineBotMessage.md @@ -23,6 +23,14 @@ description: messages.editInlineBotMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_editMessage.md b/old_docs/API_docs_v65/methods/messages_editMessage.md index a2766336e..b8cdda817 100644 --- a/old_docs/API_docs_v65/methods/messages_editMessage.md +++ b/old_docs/API_docs_v65/methods/messages_editMessage.md @@ -24,6 +24,22 @@ description: messages.editMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_exportChatInvite.md b/old_docs/API_docs_v65/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v65/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v65/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_forwardMessage.md b/old_docs/API_docs_v65/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v65/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v65/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_forwardMessages.md b/old_docs/API_docs_v65/methods/messages_forwardMessages.md index 8b91a2086..0f6492002 100644 --- a/old_docs/API_docs_v65/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v65/methods/messages_forwardMessages.md @@ -23,6 +23,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v65/methods/messages_getBotCallbackAnswer.md index 9d9470d05..433144c3d 100644 --- a/old_docs/API_docs_v65/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v65/methods/messages_getBotCallbackAnswer.md @@ -21,6 +21,16 @@ description: messages.getBotCallbackAnswer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getChats.md b/old_docs/API_docs_v65/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v65/methods/messages_getChats.md +++ b/old_docs/API_docs_v65/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getCommonChats.md b/old_docs/API_docs_v65/methods/messages_getCommonChats.md index 985a52dff..0c601ca98 100644 --- a/old_docs/API_docs_v65/methods/messages_getCommonChats.md +++ b/old_docs/API_docs_v65/methods/messages_getCommonChats.md @@ -20,6 +20,13 @@ description: messages.getCommonChats parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getDhConfig.md b/old_docs/API_docs_v65/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v65/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v65/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getDialogs.md b/old_docs/API_docs_v65/methods/messages_getDialogs.md index e38aa9965..131b75b7a 100644 --- a/old_docs/API_docs_v65/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v65/methods/messages_getDialogs.md @@ -22,6 +22,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v65/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/old_docs/API_docs_v65/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v65/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getGameHighScores.md b/old_docs/API_docs_v65/methods/messages_getGameHighScores.md index d558df8a6..935bb95a7 100644 --- a/old_docs/API_docs_v65/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v65/methods/messages_getGameHighScores.md @@ -20,6 +20,14 @@ description: messages.getGameHighScores parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getHistory.md b/old_docs/API_docs_v65/methods/messages_getHistory.md index 273eb6a91..a48a465eb 100644 --- a/old_docs/API_docs_v65/methods/messages_getHistory.md +++ b/old_docs/API_docs_v65/methods/messages_getHistory.md @@ -24,6 +24,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v65/methods/messages_getInlineBotResults.md index f5da1c5a0..61366580b 100644 --- a/old_docs/API_docs_v65/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v65/methods/messages_getInlineBotResults.md @@ -22,6 +22,16 @@ description: messages.getInlineBotResults parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INLINE_DISABLED|This bot can't be used in inline mode| +|BOT_INVALID|This is not a valid bot| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v65/methods/messages_getInlineGameHighScores.md index 24b512ca2..7cc04d0de 100644 --- a/old_docs/API_docs_v65/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v65/methods/messages_getInlineGameHighScores.md @@ -19,6 +19,14 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getMessageEditData.md b/old_docs/API_docs_v65/methods/messages_getMessageEditData.md index ee07fd74e..a8b135c67 100644 --- a/old_docs/API_docs_v65/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v65/methods/messages_getMessageEditData.md @@ -19,6 +19,14 @@ description: messages.getMessageEditData parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getMessagesViews.md b/old_docs/API_docs_v65/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v65/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v65/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v65/methods/messages_getPeerDialogs.md index e388e309c..3da60038f 100644 --- a/old_docs/API_docs_v65/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v65/methods/messages_getPeerDialogs.md @@ -18,6 +18,14 @@ description: messages.getPeerDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getPeerSettings.md b/old_docs/API_docs_v65/methods/messages_getPeerSettings.md index 26776c43b..d3e3cfc39 100644 --- a/old_docs/API_docs_v65/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v65/methods/messages_getPeerSettings.md @@ -18,6 +18,14 @@ description: messages.getPeerSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getStickerSet.md b/old_docs/API_docs_v65/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v65/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v65/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_getWebPage.md b/old_docs/API_docs_v65/methods/messages_getWebPage.md index 81591daf5..35f6e5456 100644 --- a/old_docs/API_docs_v65/methods/messages_getWebPage.md +++ b/old_docs/API_docs_v65/methods/messages_getWebPage.md @@ -19,6 +19,13 @@ description: messages.getWebPage parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|WC_CONVERT_URL_INVALID|WC convert URL invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_hideReportSpam.md b/old_docs/API_docs_v65/methods/messages_hideReportSpam.md index 20bc6f186..2dfe4dd7a 100644 --- a/old_docs/API_docs_v65/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v65/methods/messages_hideReportSpam.md @@ -18,6 +18,13 @@ description: messages.hideReportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_importChatInvite.md b/old_docs/API_docs_v65/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v65/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v65/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_installStickerSet.md b/old_docs/API_docs_v65/methods/messages_installStickerSet.md index 6073eb13b..3dde52a75 100644 --- a/old_docs/API_docs_v65/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v65/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_migrateChat.md b/old_docs/API_docs_v65/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v65/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v65/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v65/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v65/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v65/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_readHistory.md b/old_docs/API_docs_v65/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v65/methods/messages_readHistory.md +++ b/old_docs/API_docs_v65/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_receivedQueue.md b/old_docs/API_docs_v65/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v65/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v65/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_reorderPinnedDialogs.md b/old_docs/API_docs_v65/methods/messages_reorderPinnedDialogs.md index 2660b3633..30102fd7a 100644 --- a/old_docs/API_docs_v65/methods/messages_reorderPinnedDialogs.md +++ b/old_docs/API_docs_v65/methods/messages_reorderPinnedDialogs.md @@ -19,6 +19,13 @@ description: messages.reorderPinnedDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_reportEncryptedSpam.md b/old_docs/API_docs_v65/methods/messages_reportEncryptedSpam.md index 5764b8486..30ef34732 100644 --- a/old_docs/API_docs_v65/methods/messages_reportEncryptedSpam.md +++ b/old_docs/API_docs_v65/methods/messages_reportEncryptedSpam.md @@ -18,6 +18,13 @@ description: messages.reportEncryptedSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_reportSpam.md b/old_docs/API_docs_v65/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v65/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v65/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_saveDraft.md b/old_docs/API_docs_v65/methods/messages_saveDraft.md index ef5e65c57..42308b46f 100644 --- a/old_docs/API_docs_v65/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v65/methods/messages_saveDraft.md @@ -23,6 +23,13 @@ description: messages.saveDraft parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_saveGif.md b/old_docs/API_docs_v65/methods/messages_saveGif.md index 2d41d5338..31e486320 100644 --- a/old_docs/API_docs_v65/methods/messages_saveGif.md +++ b/old_docs/API_docs_v65/methods/messages_saveGif.md @@ -19,6 +19,13 @@ description: messages.saveGif parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|GIF_ID_INVALID|The provided GIF ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v65/methods/messages_saveRecentSticker.md index cb4f98b35..8d45be5ef 100644 --- a/old_docs/API_docs_v65/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v65/methods/messages_saveRecentSticker.md @@ -20,6 +20,13 @@ description: messages.saveRecentSticker parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKER_ID_INVALID|The provided sticker ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_search.md b/old_docs/API_docs_v65/methods/messages_search.md index 01e4c6143..5f49d0163 100644 --- a/old_docs/API_docs_v65/methods/messages_search.md +++ b/old_docs/API_docs_v65/methods/messages_search.md @@ -25,6 +25,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_searchGifs.md b/old_docs/API_docs_v65/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/old_docs/API_docs_v65/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v65/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_searchGlobal.md b/old_docs/API_docs_v65/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v65/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v65/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_sendEncrypted.md b/old_docs/API_docs_v65/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v65/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v65/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v65/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v65/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v65/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v65/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v65/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v65/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v65/methods/messages_sendInlineBotResult.md index 6ab41f500..6aeeb67d5 100644 --- a/old_docs/API_docs_v65/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v65/methods/messages_sendInlineBotResult.md @@ -24,6 +24,16 @@ description: messages.sendInlineBotResult parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INLINE_RESULT_EXPIRED|The inline query expired| +|PEER_ID_INVALID|The provided peer id is invalid| +|QUERY_ID_EMPTY|The query ID is empty| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_sendMedia.md b/old_docs/API_docs_v65/methods/messages_sendMedia.md index 68e2c41be..8c22e1c9f 100644 --- a/old_docs/API_docs_v65/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v65/methods/messages_sendMedia.md @@ -24,6 +24,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_sendMessage.md b/old_docs/API_docs_v65/methods/messages_sendMessage.md index cabccdb33..60b50412f 100644 --- a/old_docs/API_docs_v65/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v65/methods/messages_sendMessage.md @@ -27,6 +27,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v65/methods/messages_setBotCallbackAnswer.md index ef9b8f7a8..2c51854ff 100644 --- a/old_docs/API_docs_v65/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v65/methods/messages_setBotCallbackAnswer.md @@ -22,6 +22,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_setBotPrecheckoutResults.md b/old_docs/API_docs_v65/methods/messages_setBotPrecheckoutResults.md index 92bdcb9e4..25ed5ed5e 100644 --- a/old_docs/API_docs_v65/methods/messages_setBotPrecheckoutResults.md +++ b/old_docs/API_docs_v65/methods/messages_setBotPrecheckoutResults.md @@ -20,6 +20,13 @@ description: messages.setBotPrecheckoutResults parameters, return type and examp ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ERROR_TEXT_EMPTY|The provided error message is empty| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_setBotShippingResults.md b/old_docs/API_docs_v65/methods/messages_setBotShippingResults.md index e2c7cd45b..49ac28967 100644 --- a/old_docs/API_docs_v65/methods/messages_setBotShippingResults.md +++ b/old_docs/API_docs_v65/methods/messages_setBotShippingResults.md @@ -20,6 +20,13 @@ description: messages.setBotShippingResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v65/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v65/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v65/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_setGameScore.md b/old_docs/API_docs_v65/methods/messages_setGameScore.md index f16a7539c..3137f7c91 100644 --- a/old_docs/API_docs_v65/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v65/methods/messages_setGameScore.md @@ -23,6 +23,14 @@ description: messages.setGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v65/methods/messages_setInlineBotResults.md index cf74e5e4b..8b5625f34 100644 --- a/old_docs/API_docs_v65/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v65/methods/messages_setInlineBotResults.md @@ -24,6 +24,23 @@ description: messages.setInlineBotResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ARTICLE_TITLE_EMPTY|The title of the article is empty| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|MESSAGE_EMPTY|The provided message is empty| +|QUERY_ID_INVALID|The query ID is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|RESULT_TYPE_INVALID|Result type invalid| +|SEND_MESSAGE_TYPE_INVALID|The message type is invalid| +|START_PARAM_INVALID|Start parameter invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v65/methods/messages_setInlineGameScore.md index c922f937b..36752f351 100644 --- a/old_docs/API_docs_v65/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v65/methods/messages_setInlineGameScore.md @@ -22,6 +22,14 @@ description: messages.setInlineGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_setTyping.md b/old_docs/API_docs_v65/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v65/methods/messages_setTyping.md +++ b/old_docs/API_docs_v65/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_startBot.md b/old_docs/API_docs_v65/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v65/methods/messages_startBot.md +++ b/old_docs/API_docs_v65/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v65/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v65/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v65/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_toggleDialogPin.md b/old_docs/API_docs_v65/methods/messages_toggleDialogPin.md index f4506918c..f35f2f401 100644 --- a/old_docs/API_docs_v65/methods/messages_toggleDialogPin.md +++ b/old_docs/API_docs_v65/methods/messages_toggleDialogPin.md @@ -19,6 +19,13 @@ description: messages.toggleDialogPin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v65/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v65/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v65/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/payments_getPaymentForm.md b/old_docs/API_docs_v65/methods/payments_getPaymentForm.md index fa82f22d6..15f6e26b9 100644 --- a/old_docs/API_docs_v65/methods/payments_getPaymentForm.md +++ b/old_docs/API_docs_v65/methods/payments_getPaymentForm.md @@ -18,6 +18,13 @@ description: payments.getPaymentForm parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/payments_getPaymentReceipt.md b/old_docs/API_docs_v65/methods/payments_getPaymentReceipt.md index d6b5f5d62..51433563a 100644 --- a/old_docs/API_docs_v65/methods/payments_getPaymentReceipt.md +++ b/old_docs/API_docs_v65/methods/payments_getPaymentReceipt.md @@ -18,6 +18,13 @@ description: payments.getPaymentReceipt parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/payments_sendPaymentForm.md b/old_docs/API_docs_v65/methods/payments_sendPaymentForm.md index 831516a32..a63a39805 100644 --- a/old_docs/API_docs_v65/methods/payments_sendPaymentForm.md +++ b/old_docs/API_docs_v65/methods/payments_sendPaymentForm.md @@ -21,6 +21,13 @@ description: payments.sendPaymentForm parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/payments_validateRequestedInfo.md b/old_docs/API_docs_v65/methods/payments_validateRequestedInfo.md index 4102a4739..d839a2dfd 100644 --- a/old_docs/API_docs_v65/methods/payments_validateRequestedInfo.md +++ b/old_docs/API_docs_v65/methods/payments_validateRequestedInfo.md @@ -20,6 +20,13 @@ description: payments.validateRequestedInfo parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/phone_receivedCall.md b/old_docs/API_docs_v65/methods/phone_receivedCall.md index b06a90adc..9d59b1eae 100644 --- a/old_docs/API_docs_v65/methods/phone_receivedCall.md +++ b/old_docs/API_docs_v65/methods/phone_receivedCall.md @@ -18,6 +18,14 @@ description: phone.receivedCall parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_ALREADY_DECLINED|The call was already declined| +|CALL_PEER_INVALID|The provided call peer object is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/phone_saveCallDebug.md b/old_docs/API_docs_v65/methods/phone_saveCallDebug.md index 589dc522e..4dee5c971 100644 --- a/old_docs/API_docs_v65/methods/phone_saveCallDebug.md +++ b/old_docs/API_docs_v65/methods/phone_saveCallDebug.md @@ -19,6 +19,14 @@ description: phone.saveCallDebug parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_PEER_INVALID|The provided call peer object is invalid| +|DATA_JSON_INVALID|The provided JSON data is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/phone_setCallRating.md b/old_docs/API_docs_v65/methods/phone_setCallRating.md index a2b2e27cd..fea236d10 100644 --- a/old_docs/API_docs_v65/methods/phone_setCallRating.md +++ b/old_docs/API_docs_v65/methods/phone_setCallRating.md @@ -20,6 +20,13 @@ description: phone.setCallRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_PEER_INVALID|The provided call peer object is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/photos_getUserPhotos.md b/old_docs/API_docs_v65/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v65/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v65/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v65/methods/photos_uploadProfilePhoto.md index 6de32dae0..58541f235 100644 --- a/old_docs/API_docs_v65/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v65/methods/photos_uploadProfilePhoto.md @@ -18,6 +18,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/upload_getWebFile.md b/old_docs/API_docs_v65/methods/upload_getWebFile.md index fab17a7fc..ec7c05b4a 100644 --- a/old_docs/API_docs_v65/methods/upload_getWebFile.md +++ b/old_docs/API_docs_v65/methods/upload_getWebFile.md @@ -20,6 +20,13 @@ description: upload.getWebFile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LOCATION_INVALID|The provided location is invalid| + + ### Example: diff --git a/old_docs/API_docs_v65/methods/users_getUsers.md b/old_docs/API_docs_v65/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v65/methods/users_getUsers.md +++ b/old_docs/API_docs_v65/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_changePhone.md b/old_docs/API_docs_v66/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v66/methods/account_changePhone.md +++ b/old_docs/API_docs_v66/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_checkUsername.md b/old_docs/API_docs_v66/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v66/methods/account_checkUsername.md +++ b/old_docs/API_docs_v66/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_confirmPhone.md b/old_docs/API_docs_v66/methods/account_confirmPhone.md index c2526b2ad..0d2dc5c64 100644 --- a/old_docs/API_docs_v66/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v66/methods/account_confirmPhone.md @@ -19,6 +19,14 @@ description: account.confirmPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_HASH_INVALID|Code hash invalid| +|PHONE_CODE_EMPTY|phone_code is missing| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_getNotifySettings.md b/old_docs/API_docs_v66/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v66/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v66/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_getPasswordSettings.md b/old_docs/API_docs_v66/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v66/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v66/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_getPrivacy.md b/old_docs/API_docs_v66/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v66/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v66/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_getTmpPassword.md b/old_docs/API_docs_v66/methods/account_getTmpPassword.md index c368baf7e..83ab09b16 100644 --- a/old_docs/API_docs_v66/methods/account_getTmpPassword.md +++ b/old_docs/API_docs_v66/methods/account_getTmpPassword.md @@ -19,6 +19,14 @@ description: account.getTmpPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| +|TMP_PASSWORD_DISABLED|The temporary password is disabled| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_registerDevice.md b/old_docs/API_docs_v66/methods/account_registerDevice.md index 6865551ee..3cc7f98d4 100644 --- a/old_docs/API_docs_v66/methods/account_registerDevice.md +++ b/old_docs/API_docs_v66/methods/account_registerDevice.md @@ -19,6 +19,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_reportPeer.md b/old_docs/API_docs_v66/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v66/methods/account_reportPeer.md +++ b/old_docs/API_docs_v66/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_resetAuthorization.md b/old_docs/API_docs_v66/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v66/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v66/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v66/methods/account_sendChangePhoneCode.md index a1f49156d..4be218f24 100644 --- a/old_docs/API_docs_v66/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v66/methods/account_sendChangePhoneCode.md @@ -20,6 +20,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v66/methods/account_sendConfirmPhoneCode.md index 5ad44987b..009fcb09b 100644 --- a/old_docs/API_docs_v66/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v66/methods/account_sendConfirmPhoneCode.md @@ -20,6 +20,13 @@ description: account.sendConfirmPhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_setAccountTTL.md b/old_docs/API_docs_v66/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v66/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v66/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_setPrivacy.md b/old_docs/API_docs_v66/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v66/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v66/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_unregisterDevice.md b/old_docs/API_docs_v66/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v66/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v66/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_updateNotifySettings.md b/old_docs/API_docs_v66/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v66/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v66/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v66/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v66/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v66/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_updateProfile.md b/old_docs/API_docs_v66/methods/account_updateProfile.md index 531bbb028..a50eaea58 100644 --- a/old_docs/API_docs_v66/methods/account_updateProfile.md +++ b/old_docs/API_docs_v66/methods/account_updateProfile.md @@ -20,6 +20,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_updateStatus.md b/old_docs/API_docs_v66/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v66/methods/account_updateStatus.md +++ b/old_docs/API_docs_v66/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/account_updateUsername.md b/old_docs/API_docs_v66/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v66/methods/account_updateUsername.md +++ b/old_docs/API_docs_v66/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v66/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v66/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v66/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/auth_cancelCode.md b/old_docs/API_docs_v66/methods/auth_cancelCode.md index cc93fff5b..dc390329f 100644 --- a/old_docs/API_docs_v66/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v66/methods/auth_cancelCode.md @@ -19,6 +19,13 @@ description: auth.cancelCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/auth_checkPassword.md b/old_docs/API_docs_v66/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v66/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v66/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/auth_checkPhone.md b/old_docs/API_docs_v66/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v66/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v66/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/auth_exportAuthorization.md b/old_docs/API_docs_v66/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v66/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v66/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/auth_importAuthorization.md b/old_docs/API_docs_v66/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v66/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v66/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/auth_recoverPassword.md b/old_docs/API_docs_v66/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v66/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v66/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v66/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v66/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v66/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/auth_resendCode.md b/old_docs/API_docs_v66/methods/auth_resendCode.md index 92f7aa308..14d08ddd1 100644 --- a/old_docs/API_docs_v66/methods/auth_resendCode.md +++ b/old_docs/API_docs_v66/methods/auth_resendCode.md @@ -19,6 +19,13 @@ description: auth.resendCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v66/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v66/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v66/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/auth_sendInvites.md b/old_docs/API_docs_v66/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v66/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v66/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/bots_answerWebhookJSONQuery.md b/old_docs/API_docs_v66/methods/bots_answerWebhookJSONQuery.md index 59c134d45..ae1efce3b 100644 --- a/old_docs/API_docs_v66/methods/bots_answerWebhookJSONQuery.md +++ b/old_docs/API_docs_v66/methods/bots_answerWebhookJSONQuery.md @@ -19,6 +19,14 @@ description: bots.answerWebhookJSONQuery parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/bots_sendCustomRequest.md b/old_docs/API_docs_v66/methods/bots_sendCustomRequest.md index 57a49e6e3..927f18c5a 100644 --- a/old_docs/API_docs_v66/methods/bots_sendCustomRequest.md +++ b/old_docs/API_docs_v66/methods/bots_sendCustomRequest.md @@ -19,6 +19,13 @@ description: bots.sendCustomRequest parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_checkUsername.md b/old_docs/API_docs_v66/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v66/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v66/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_createChannel.md b/old_docs/API_docs_v66/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v66/methods/channels_createChannel.md +++ b/old_docs/API_docs_v66/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_deleteChannel.md b/old_docs/API_docs_v66/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v66/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v66/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_deleteMessages.md b/old_docs/API_docs_v66/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v66/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v66/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v66/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v66/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v66/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_editAbout.md b/old_docs/API_docs_v66/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v66/methods/channels_editAbout.md +++ b/old_docs/API_docs_v66/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_editAdmin.md b/old_docs/API_docs_v66/methods/channels_editAdmin.md index cb8212977..7707bdfe7 100644 --- a/old_docs/API_docs_v66/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v66/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_editPhoto.md b/old_docs/API_docs_v66/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v66/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v66/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_editTitle.md b/old_docs/API_docs_v66/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v66/methods/channels_editTitle.md +++ b/old_docs/API_docs_v66/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_exportInvite.md b/old_docs/API_docs_v66/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v66/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v66/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_exportMessageLink.md b/old_docs/API_docs_v66/methods/channels_exportMessageLink.md index 9e7135ab8..9831c9c03 100644 --- a/old_docs/API_docs_v66/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v66/methods/channels_exportMessageLink.md @@ -19,6 +19,13 @@ description: channels.exportMessageLink parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_getChannels.md b/old_docs/API_docs_v66/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v66/methods/channels_getChannels.md +++ b/old_docs/API_docs_v66/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_getMessages.md b/old_docs/API_docs_v66/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v66/methods/channels_getMessages.md +++ b/old_docs/API_docs_v66/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_getParticipant.md b/old_docs/API_docs_v66/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v66/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v66/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_inviteToChannel.md b/old_docs/API_docs_v66/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v66/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v66/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_joinChannel.md b/old_docs/API_docs_v66/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v66/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v66/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_leaveChannel.md b/old_docs/API_docs_v66/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v66/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v66/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_readHistory.md b/old_docs/API_docs_v66/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v66/methods/channels_readHistory.md +++ b/old_docs/API_docs_v66/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_reportSpam.md b/old_docs/API_docs_v66/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v66/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v66/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_toggleInvites.md b/old_docs/API_docs_v66/methods/channels_toggleInvites.md index 0733d419f..c2715b323 100644 --- a/old_docs/API_docs_v66/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v66/methods/channels_toggleInvites.md @@ -19,6 +19,15 @@ description: channels.toggleInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_toggleSignatures.md b/old_docs/API_docs_v66/methods/channels_toggleSignatures.md index 3056eaee8..a214b8493 100644 --- a/old_docs/API_docs_v66/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v66/methods/channels_toggleSignatures.md @@ -19,6 +19,13 @@ description: channels.toggleSignatures parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v66/methods/channels_updatePinnedMessage.md index d2314d851..7376df10a 100644 --- a/old_docs/API_docs_v66/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v66/methods/channels_updatePinnedMessage.md @@ -20,6 +20,15 @@ description: channels.updatePinnedMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/channels_updateUsername.md b/old_docs/API_docs_v66/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v66/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v66/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/contacts_block.md b/old_docs/API_docs_v66/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v66/methods/contacts_block.md +++ b/old_docs/API_docs_v66/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/contacts_deleteContact.md b/old_docs/API_docs_v66/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v66/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v66/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/contacts_deleteContacts.md b/old_docs/API_docs_v66/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v66/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v66/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/contacts_getTopPeers.md b/old_docs/API_docs_v66/methods/contacts_getTopPeers.md index 60967d060..1caa1d779 100644 --- a/old_docs/API_docs_v66/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v66/methods/contacts_getTopPeers.md @@ -25,6 +25,13 @@ description: contacts.getTopPeers parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TYPES_EMPTY|The types field is empty| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/contacts_importCard.md b/old_docs/API_docs_v66/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v66/methods/contacts_importCard.md +++ b/old_docs/API_docs_v66/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v66/methods/contacts_resetTopPeerRating.md index 2f7841892..738494b2e 100644 --- a/old_docs/API_docs_v66/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v66/methods/contacts_resetTopPeerRating.md @@ -19,6 +19,13 @@ description: contacts.resetTopPeerRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/contacts_search.md b/old_docs/API_docs_v66/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v66/methods/contacts_search.md +++ b/old_docs/API_docs_v66/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/contacts_unblock.md b/old_docs/API_docs_v66/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v66/methods/contacts_unblock.md +++ b/old_docs/API_docs_v66/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/help_getCdnConfig.md b/old_docs/API_docs_v66/methods/help_getCdnConfig.md index 82b9421e5..da446958d 100644 --- a/old_docs/API_docs_v66/methods/help_getCdnConfig.md +++ b/old_docs/API_docs_v66/methods/help_getCdnConfig.md @@ -13,6 +13,13 @@ description: help.getCdnConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/help_getConfig.md b/old_docs/API_docs_v66/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v66/methods/help_getConfig.md +++ b/old_docs/API_docs_v66/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/initConnection.md b/old_docs/API_docs_v66/methods/initConnection.md index de94798bd..0d22a1cb7 100644 --- a/old_docs/API_docs_v66/methods/initConnection.md +++ b/old_docs/API_docs_v66/methods/initConnection.md @@ -23,6 +23,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/invokeWithLayer.md b/old_docs/API_docs_v66/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v66/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v66/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_addChatUser.md b/old_docs/API_docs_v66/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v66/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v66/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_checkChatInvite.md b/old_docs/API_docs_v66/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v66/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v66/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_createChat.md b/old_docs/API_docs_v66/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v66/methods/messages_createChat.md +++ b/old_docs/API_docs_v66/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_deleteChatUser.md b/old_docs/API_docs_v66/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v66/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v66/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_deleteHistory.md b/old_docs/API_docs_v66/methods/messages_deleteHistory.md index fb9b77639..ce6ba6e70 100644 --- a/old_docs/API_docs_v66/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v66/methods/messages_deleteHistory.md @@ -20,6 +20,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_deleteMessages.md b/old_docs/API_docs_v66/methods/messages_deleteMessages.md index 2949f64a4..2b88a73fc 100644 --- a/old_docs/API_docs_v66/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v66/methods/messages_deleteMessages.md @@ -19,6 +19,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_editChatAdmin.md b/old_docs/API_docs_v66/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v66/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v66/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_editChatPhoto.md b/old_docs/API_docs_v66/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v66/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v66/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_editChatTitle.md b/old_docs/API_docs_v66/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v66/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v66/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v66/methods/messages_editInlineBotMessage.md index 083d4a61b..621c81a37 100644 --- a/old_docs/API_docs_v66/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v66/methods/messages_editInlineBotMessage.md @@ -23,6 +23,14 @@ description: messages.editInlineBotMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_editMessage.md b/old_docs/API_docs_v66/methods/messages_editMessage.md index a2766336e..b8cdda817 100644 --- a/old_docs/API_docs_v66/methods/messages_editMessage.md +++ b/old_docs/API_docs_v66/methods/messages_editMessage.md @@ -24,6 +24,22 @@ description: messages.editMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_exportChatInvite.md b/old_docs/API_docs_v66/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v66/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v66/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_forwardMessage.md b/old_docs/API_docs_v66/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v66/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v66/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_forwardMessages.md b/old_docs/API_docs_v66/methods/messages_forwardMessages.md index 8b91a2086..0f6492002 100644 --- a/old_docs/API_docs_v66/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v66/methods/messages_forwardMessages.md @@ -23,6 +23,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v66/methods/messages_getBotCallbackAnswer.md index 9d9470d05..433144c3d 100644 --- a/old_docs/API_docs_v66/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v66/methods/messages_getBotCallbackAnswer.md @@ -21,6 +21,16 @@ description: messages.getBotCallbackAnswer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getChats.md b/old_docs/API_docs_v66/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v66/methods/messages_getChats.md +++ b/old_docs/API_docs_v66/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getCommonChats.md b/old_docs/API_docs_v66/methods/messages_getCommonChats.md index 985a52dff..0c601ca98 100644 --- a/old_docs/API_docs_v66/methods/messages_getCommonChats.md +++ b/old_docs/API_docs_v66/methods/messages_getCommonChats.md @@ -20,6 +20,13 @@ description: messages.getCommonChats parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getDhConfig.md b/old_docs/API_docs_v66/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v66/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v66/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getDialogs.md b/old_docs/API_docs_v66/methods/messages_getDialogs.md index e38aa9965..131b75b7a 100644 --- a/old_docs/API_docs_v66/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v66/methods/messages_getDialogs.md @@ -22,6 +22,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v66/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/old_docs/API_docs_v66/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v66/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getGameHighScores.md b/old_docs/API_docs_v66/methods/messages_getGameHighScores.md index d558df8a6..935bb95a7 100644 --- a/old_docs/API_docs_v66/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v66/methods/messages_getGameHighScores.md @@ -20,6 +20,14 @@ description: messages.getGameHighScores parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getHistory.md b/old_docs/API_docs_v66/methods/messages_getHistory.md index 273eb6a91..a48a465eb 100644 --- a/old_docs/API_docs_v66/methods/messages_getHistory.md +++ b/old_docs/API_docs_v66/methods/messages_getHistory.md @@ -24,6 +24,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v66/methods/messages_getInlineBotResults.md index f5da1c5a0..61366580b 100644 --- a/old_docs/API_docs_v66/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v66/methods/messages_getInlineBotResults.md @@ -22,6 +22,16 @@ description: messages.getInlineBotResults parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INLINE_DISABLED|This bot can't be used in inline mode| +|BOT_INVALID|This is not a valid bot| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v66/methods/messages_getInlineGameHighScores.md index 24b512ca2..7cc04d0de 100644 --- a/old_docs/API_docs_v66/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v66/methods/messages_getInlineGameHighScores.md @@ -19,6 +19,14 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getMessageEditData.md b/old_docs/API_docs_v66/methods/messages_getMessageEditData.md index ee07fd74e..a8b135c67 100644 --- a/old_docs/API_docs_v66/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v66/methods/messages_getMessageEditData.md @@ -19,6 +19,14 @@ description: messages.getMessageEditData parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getMessagesViews.md b/old_docs/API_docs_v66/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v66/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v66/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v66/methods/messages_getPeerDialogs.md index e388e309c..3da60038f 100644 --- a/old_docs/API_docs_v66/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v66/methods/messages_getPeerDialogs.md @@ -18,6 +18,14 @@ description: messages.getPeerDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getPeerSettings.md b/old_docs/API_docs_v66/methods/messages_getPeerSettings.md index 26776c43b..d3e3cfc39 100644 --- a/old_docs/API_docs_v66/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v66/methods/messages_getPeerSettings.md @@ -18,6 +18,14 @@ description: messages.getPeerSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getStickerSet.md b/old_docs/API_docs_v66/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v66/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v66/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_getWebPage.md b/old_docs/API_docs_v66/methods/messages_getWebPage.md index 81591daf5..35f6e5456 100644 --- a/old_docs/API_docs_v66/methods/messages_getWebPage.md +++ b/old_docs/API_docs_v66/methods/messages_getWebPage.md @@ -19,6 +19,13 @@ description: messages.getWebPage parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|WC_CONVERT_URL_INVALID|WC convert URL invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_hideReportSpam.md b/old_docs/API_docs_v66/methods/messages_hideReportSpam.md index 20bc6f186..2dfe4dd7a 100644 --- a/old_docs/API_docs_v66/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v66/methods/messages_hideReportSpam.md @@ -18,6 +18,13 @@ description: messages.hideReportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_importChatInvite.md b/old_docs/API_docs_v66/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v66/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v66/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_installStickerSet.md b/old_docs/API_docs_v66/methods/messages_installStickerSet.md index 6073eb13b..3dde52a75 100644 --- a/old_docs/API_docs_v66/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v66/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_migrateChat.md b/old_docs/API_docs_v66/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v66/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v66/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v66/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v66/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v66/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_readHistory.md b/old_docs/API_docs_v66/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v66/methods/messages_readHistory.md +++ b/old_docs/API_docs_v66/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_receivedQueue.md b/old_docs/API_docs_v66/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v66/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v66/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_reorderPinnedDialogs.md b/old_docs/API_docs_v66/methods/messages_reorderPinnedDialogs.md index 2660b3633..30102fd7a 100644 --- a/old_docs/API_docs_v66/methods/messages_reorderPinnedDialogs.md +++ b/old_docs/API_docs_v66/methods/messages_reorderPinnedDialogs.md @@ -19,6 +19,13 @@ description: messages.reorderPinnedDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_reportEncryptedSpam.md b/old_docs/API_docs_v66/methods/messages_reportEncryptedSpam.md index 5764b8486..30ef34732 100644 --- a/old_docs/API_docs_v66/methods/messages_reportEncryptedSpam.md +++ b/old_docs/API_docs_v66/methods/messages_reportEncryptedSpam.md @@ -18,6 +18,13 @@ description: messages.reportEncryptedSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_reportSpam.md b/old_docs/API_docs_v66/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v66/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v66/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_saveDraft.md b/old_docs/API_docs_v66/methods/messages_saveDraft.md index ef5e65c57..42308b46f 100644 --- a/old_docs/API_docs_v66/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v66/methods/messages_saveDraft.md @@ -23,6 +23,13 @@ description: messages.saveDraft parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_saveGif.md b/old_docs/API_docs_v66/methods/messages_saveGif.md index 2d41d5338..31e486320 100644 --- a/old_docs/API_docs_v66/methods/messages_saveGif.md +++ b/old_docs/API_docs_v66/methods/messages_saveGif.md @@ -19,6 +19,13 @@ description: messages.saveGif parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|GIF_ID_INVALID|The provided GIF ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v66/methods/messages_saveRecentSticker.md index cb4f98b35..8d45be5ef 100644 --- a/old_docs/API_docs_v66/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v66/methods/messages_saveRecentSticker.md @@ -20,6 +20,13 @@ description: messages.saveRecentSticker parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKER_ID_INVALID|The provided sticker ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_search.md b/old_docs/API_docs_v66/methods/messages_search.md index 01e4c6143..5f49d0163 100644 --- a/old_docs/API_docs_v66/methods/messages_search.md +++ b/old_docs/API_docs_v66/methods/messages_search.md @@ -25,6 +25,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_searchGifs.md b/old_docs/API_docs_v66/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/old_docs/API_docs_v66/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v66/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_searchGlobal.md b/old_docs/API_docs_v66/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v66/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v66/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_sendEncrypted.md b/old_docs/API_docs_v66/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v66/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v66/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v66/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v66/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v66/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v66/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v66/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v66/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v66/methods/messages_sendInlineBotResult.md index 6ab41f500..6aeeb67d5 100644 --- a/old_docs/API_docs_v66/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v66/methods/messages_sendInlineBotResult.md @@ -24,6 +24,16 @@ description: messages.sendInlineBotResult parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INLINE_RESULT_EXPIRED|The inline query expired| +|PEER_ID_INVALID|The provided peer id is invalid| +|QUERY_ID_EMPTY|The query ID is empty| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_sendMedia.md b/old_docs/API_docs_v66/methods/messages_sendMedia.md index 68e2c41be..8c22e1c9f 100644 --- a/old_docs/API_docs_v66/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v66/methods/messages_sendMedia.md @@ -24,6 +24,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_sendMessage.md b/old_docs/API_docs_v66/methods/messages_sendMessage.md index cabccdb33..60b50412f 100644 --- a/old_docs/API_docs_v66/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v66/methods/messages_sendMessage.md @@ -27,6 +27,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v66/methods/messages_setBotCallbackAnswer.md index ef9b8f7a8..2c51854ff 100644 --- a/old_docs/API_docs_v66/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v66/methods/messages_setBotCallbackAnswer.md @@ -22,6 +22,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_setBotPrecheckoutResults.md b/old_docs/API_docs_v66/methods/messages_setBotPrecheckoutResults.md index 92bdcb9e4..25ed5ed5e 100644 --- a/old_docs/API_docs_v66/methods/messages_setBotPrecheckoutResults.md +++ b/old_docs/API_docs_v66/methods/messages_setBotPrecheckoutResults.md @@ -20,6 +20,13 @@ description: messages.setBotPrecheckoutResults parameters, return type and examp ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ERROR_TEXT_EMPTY|The provided error message is empty| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_setBotShippingResults.md b/old_docs/API_docs_v66/methods/messages_setBotShippingResults.md index e2c7cd45b..49ac28967 100644 --- a/old_docs/API_docs_v66/methods/messages_setBotShippingResults.md +++ b/old_docs/API_docs_v66/methods/messages_setBotShippingResults.md @@ -20,6 +20,13 @@ description: messages.setBotShippingResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v66/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v66/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v66/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_setGameScore.md b/old_docs/API_docs_v66/methods/messages_setGameScore.md index f16a7539c..3137f7c91 100644 --- a/old_docs/API_docs_v66/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v66/methods/messages_setGameScore.md @@ -23,6 +23,14 @@ description: messages.setGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v66/methods/messages_setInlineBotResults.md index cf74e5e4b..8b5625f34 100644 --- a/old_docs/API_docs_v66/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v66/methods/messages_setInlineBotResults.md @@ -24,6 +24,23 @@ description: messages.setInlineBotResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ARTICLE_TITLE_EMPTY|The title of the article is empty| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|MESSAGE_EMPTY|The provided message is empty| +|QUERY_ID_INVALID|The query ID is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|RESULT_TYPE_INVALID|Result type invalid| +|SEND_MESSAGE_TYPE_INVALID|The message type is invalid| +|START_PARAM_INVALID|Start parameter invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v66/methods/messages_setInlineGameScore.md index c922f937b..36752f351 100644 --- a/old_docs/API_docs_v66/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v66/methods/messages_setInlineGameScore.md @@ -22,6 +22,14 @@ description: messages.setInlineGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_setTyping.md b/old_docs/API_docs_v66/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v66/methods/messages_setTyping.md +++ b/old_docs/API_docs_v66/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_startBot.md b/old_docs/API_docs_v66/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v66/methods/messages_startBot.md +++ b/old_docs/API_docs_v66/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v66/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v66/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v66/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_toggleDialogPin.md b/old_docs/API_docs_v66/methods/messages_toggleDialogPin.md index f4506918c..f35f2f401 100644 --- a/old_docs/API_docs_v66/methods/messages_toggleDialogPin.md +++ b/old_docs/API_docs_v66/methods/messages_toggleDialogPin.md @@ -19,6 +19,13 @@ description: messages.toggleDialogPin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v66/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v66/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v66/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/payments_getPaymentForm.md b/old_docs/API_docs_v66/methods/payments_getPaymentForm.md index fa82f22d6..15f6e26b9 100644 --- a/old_docs/API_docs_v66/methods/payments_getPaymentForm.md +++ b/old_docs/API_docs_v66/methods/payments_getPaymentForm.md @@ -18,6 +18,13 @@ description: payments.getPaymentForm parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/payments_getPaymentReceipt.md b/old_docs/API_docs_v66/methods/payments_getPaymentReceipt.md index d6b5f5d62..51433563a 100644 --- a/old_docs/API_docs_v66/methods/payments_getPaymentReceipt.md +++ b/old_docs/API_docs_v66/methods/payments_getPaymentReceipt.md @@ -18,6 +18,13 @@ description: payments.getPaymentReceipt parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/payments_sendPaymentForm.md b/old_docs/API_docs_v66/methods/payments_sendPaymentForm.md index 831516a32..a63a39805 100644 --- a/old_docs/API_docs_v66/methods/payments_sendPaymentForm.md +++ b/old_docs/API_docs_v66/methods/payments_sendPaymentForm.md @@ -21,6 +21,13 @@ description: payments.sendPaymentForm parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/payments_validateRequestedInfo.md b/old_docs/API_docs_v66/methods/payments_validateRequestedInfo.md index 4102a4739..d839a2dfd 100644 --- a/old_docs/API_docs_v66/methods/payments_validateRequestedInfo.md +++ b/old_docs/API_docs_v66/methods/payments_validateRequestedInfo.md @@ -20,6 +20,13 @@ description: payments.validateRequestedInfo parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/phone_receivedCall.md b/old_docs/API_docs_v66/methods/phone_receivedCall.md index b06a90adc..9d59b1eae 100644 --- a/old_docs/API_docs_v66/methods/phone_receivedCall.md +++ b/old_docs/API_docs_v66/methods/phone_receivedCall.md @@ -18,6 +18,14 @@ description: phone.receivedCall parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_ALREADY_DECLINED|The call was already declined| +|CALL_PEER_INVALID|The provided call peer object is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/phone_saveCallDebug.md b/old_docs/API_docs_v66/methods/phone_saveCallDebug.md index 589dc522e..4dee5c971 100644 --- a/old_docs/API_docs_v66/methods/phone_saveCallDebug.md +++ b/old_docs/API_docs_v66/methods/phone_saveCallDebug.md @@ -19,6 +19,14 @@ description: phone.saveCallDebug parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_PEER_INVALID|The provided call peer object is invalid| +|DATA_JSON_INVALID|The provided JSON data is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/phone_setCallRating.md b/old_docs/API_docs_v66/methods/phone_setCallRating.md index a2b2e27cd..fea236d10 100644 --- a/old_docs/API_docs_v66/methods/phone_setCallRating.md +++ b/old_docs/API_docs_v66/methods/phone_setCallRating.md @@ -20,6 +20,13 @@ description: phone.setCallRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_PEER_INVALID|The provided call peer object is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/photos_getUserPhotos.md b/old_docs/API_docs_v66/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v66/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v66/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v66/methods/photos_uploadProfilePhoto.md index 6de32dae0..58541f235 100644 --- a/old_docs/API_docs_v66/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v66/methods/photos_uploadProfilePhoto.md @@ -18,6 +18,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/upload_getWebFile.md b/old_docs/API_docs_v66/methods/upload_getWebFile.md index fab17a7fc..ec7c05b4a 100644 --- a/old_docs/API_docs_v66/methods/upload_getWebFile.md +++ b/old_docs/API_docs_v66/methods/upload_getWebFile.md @@ -20,6 +20,13 @@ description: upload.getWebFile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LOCATION_INVALID|The provided location is invalid| + + ### Example: diff --git a/old_docs/API_docs_v66/methods/users_getUsers.md b/old_docs/API_docs_v66/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v66/methods/users_getUsers.md +++ b/old_docs/API_docs_v66/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_changePhone.md b/old_docs/API_docs_v68/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v68/methods/account_changePhone.md +++ b/old_docs/API_docs_v68/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_checkUsername.md b/old_docs/API_docs_v68/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v68/methods/account_checkUsername.md +++ b/old_docs/API_docs_v68/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_confirmPhone.md b/old_docs/API_docs_v68/methods/account_confirmPhone.md index c2526b2ad..0d2dc5c64 100644 --- a/old_docs/API_docs_v68/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v68/methods/account_confirmPhone.md @@ -19,6 +19,14 @@ description: account.confirmPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_HASH_INVALID|Code hash invalid| +|PHONE_CODE_EMPTY|phone_code is missing| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_getNotifySettings.md b/old_docs/API_docs_v68/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v68/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v68/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_getPasswordSettings.md b/old_docs/API_docs_v68/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v68/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v68/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_getPrivacy.md b/old_docs/API_docs_v68/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v68/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v68/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_getTmpPassword.md b/old_docs/API_docs_v68/methods/account_getTmpPassword.md index c368baf7e..83ab09b16 100644 --- a/old_docs/API_docs_v68/methods/account_getTmpPassword.md +++ b/old_docs/API_docs_v68/methods/account_getTmpPassword.md @@ -19,6 +19,14 @@ description: account.getTmpPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| +|TMP_PASSWORD_DISABLED|The temporary password is disabled| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_registerDevice.md b/old_docs/API_docs_v68/methods/account_registerDevice.md index 6865551ee..3cc7f98d4 100644 --- a/old_docs/API_docs_v68/methods/account_registerDevice.md +++ b/old_docs/API_docs_v68/methods/account_registerDevice.md @@ -19,6 +19,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_reportPeer.md b/old_docs/API_docs_v68/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v68/methods/account_reportPeer.md +++ b/old_docs/API_docs_v68/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_resetAuthorization.md b/old_docs/API_docs_v68/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v68/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v68/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v68/methods/account_sendChangePhoneCode.md index a1f49156d..4be218f24 100644 --- a/old_docs/API_docs_v68/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v68/methods/account_sendChangePhoneCode.md @@ -20,6 +20,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v68/methods/account_sendConfirmPhoneCode.md index 5ad44987b..009fcb09b 100644 --- a/old_docs/API_docs_v68/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v68/methods/account_sendConfirmPhoneCode.md @@ -20,6 +20,13 @@ description: account.sendConfirmPhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_setAccountTTL.md b/old_docs/API_docs_v68/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v68/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v68/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_setPrivacy.md b/old_docs/API_docs_v68/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v68/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v68/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_unregisterDevice.md b/old_docs/API_docs_v68/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v68/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v68/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_updateNotifySettings.md b/old_docs/API_docs_v68/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v68/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v68/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v68/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v68/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v68/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_updateProfile.md b/old_docs/API_docs_v68/methods/account_updateProfile.md index 531bbb028..a50eaea58 100644 --- a/old_docs/API_docs_v68/methods/account_updateProfile.md +++ b/old_docs/API_docs_v68/methods/account_updateProfile.md @@ -20,6 +20,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_updateStatus.md b/old_docs/API_docs_v68/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v68/methods/account_updateStatus.md +++ b/old_docs/API_docs_v68/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/account_updateUsername.md b/old_docs/API_docs_v68/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v68/methods/account_updateUsername.md +++ b/old_docs/API_docs_v68/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v68/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v68/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v68/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/auth_cancelCode.md b/old_docs/API_docs_v68/methods/auth_cancelCode.md index cc93fff5b..dc390329f 100644 --- a/old_docs/API_docs_v68/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v68/methods/auth_cancelCode.md @@ -19,6 +19,13 @@ description: auth.cancelCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/auth_checkPassword.md b/old_docs/API_docs_v68/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v68/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v68/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/auth_checkPhone.md b/old_docs/API_docs_v68/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v68/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v68/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/auth_exportAuthorization.md b/old_docs/API_docs_v68/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v68/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v68/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/auth_importAuthorization.md b/old_docs/API_docs_v68/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v68/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v68/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/auth_recoverPassword.md b/old_docs/API_docs_v68/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v68/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v68/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v68/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v68/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v68/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/auth_resendCode.md b/old_docs/API_docs_v68/methods/auth_resendCode.md index 92f7aa308..14d08ddd1 100644 --- a/old_docs/API_docs_v68/methods/auth_resendCode.md +++ b/old_docs/API_docs_v68/methods/auth_resendCode.md @@ -19,6 +19,13 @@ description: auth.resendCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v68/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v68/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v68/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/auth_sendInvites.md b/old_docs/API_docs_v68/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v68/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v68/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/bots_answerWebhookJSONQuery.md b/old_docs/API_docs_v68/methods/bots_answerWebhookJSONQuery.md index 59c134d45..ae1efce3b 100644 --- a/old_docs/API_docs_v68/methods/bots_answerWebhookJSONQuery.md +++ b/old_docs/API_docs_v68/methods/bots_answerWebhookJSONQuery.md @@ -19,6 +19,14 @@ description: bots.answerWebhookJSONQuery parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/bots_sendCustomRequest.md b/old_docs/API_docs_v68/methods/bots_sendCustomRequest.md index 57a49e6e3..927f18c5a 100644 --- a/old_docs/API_docs_v68/methods/bots_sendCustomRequest.md +++ b/old_docs/API_docs_v68/methods/bots_sendCustomRequest.md @@ -19,6 +19,13 @@ description: bots.sendCustomRequest parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_checkUsername.md b/old_docs/API_docs_v68/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v68/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v68/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_createChannel.md b/old_docs/API_docs_v68/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v68/methods/channels_createChannel.md +++ b/old_docs/API_docs_v68/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_deleteChannel.md b/old_docs/API_docs_v68/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v68/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v68/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_deleteMessages.md b/old_docs/API_docs_v68/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v68/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v68/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v68/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v68/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v68/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_editAbout.md b/old_docs/API_docs_v68/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v68/methods/channels_editAbout.md +++ b/old_docs/API_docs_v68/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_editAdmin.md b/old_docs/API_docs_v68/methods/channels_editAdmin.md index 242496ab1..e68ba7eaf 100644 --- a/old_docs/API_docs_v68/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v68/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_editBanned.md b/old_docs/API_docs_v68/methods/channels_editBanned.md index 7d3fc1d08..7fb904b9a 100644 --- a/old_docs/API_docs_v68/methods/channels_editBanned.md +++ b/old_docs/API_docs_v68/methods/channels_editBanned.md @@ -20,6 +20,17 @@ description: channels.editBanned parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ADMIN_INVALID|You're not an admin| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_editPhoto.md b/old_docs/API_docs_v68/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v68/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v68/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_editTitle.md b/old_docs/API_docs_v68/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v68/methods/channels_editTitle.md +++ b/old_docs/API_docs_v68/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_exportInvite.md b/old_docs/API_docs_v68/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v68/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v68/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_exportMessageLink.md b/old_docs/API_docs_v68/methods/channels_exportMessageLink.md index 9e7135ab8..9831c9c03 100644 --- a/old_docs/API_docs_v68/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v68/methods/channels_exportMessageLink.md @@ -19,6 +19,13 @@ description: channels.exportMessageLink parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_getAdminLog.md b/old_docs/API_docs_v68/methods/channels_getAdminLog.md index 4775c872a..5283563d4 100644 --- a/old_docs/API_docs_v68/methods/channels_getAdminLog.md +++ b/old_docs/API_docs_v68/methods/channels_getAdminLog.md @@ -24,6 +24,15 @@ description: channels.getAdminLog parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_getChannels.md b/old_docs/API_docs_v68/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v68/methods/channels_getChannels.md +++ b/old_docs/API_docs_v68/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_getMessages.md b/old_docs/API_docs_v68/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v68/methods/channels_getMessages.md +++ b/old_docs/API_docs_v68/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_getParticipant.md b/old_docs/API_docs_v68/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v68/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v68/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_inviteToChannel.md b/old_docs/API_docs_v68/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v68/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v68/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_joinChannel.md b/old_docs/API_docs_v68/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v68/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v68/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_leaveChannel.md b/old_docs/API_docs_v68/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v68/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v68/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_readHistory.md b/old_docs/API_docs_v68/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v68/methods/channels_readHistory.md +++ b/old_docs/API_docs_v68/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_reportSpam.md b/old_docs/API_docs_v68/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v68/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v68/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_toggleInvites.md b/old_docs/API_docs_v68/methods/channels_toggleInvites.md index 0733d419f..c2715b323 100644 --- a/old_docs/API_docs_v68/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v68/methods/channels_toggleInvites.md @@ -19,6 +19,15 @@ description: channels.toggleInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_toggleSignatures.md b/old_docs/API_docs_v68/methods/channels_toggleSignatures.md index 3056eaee8..a214b8493 100644 --- a/old_docs/API_docs_v68/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v68/methods/channels_toggleSignatures.md @@ -19,6 +19,13 @@ description: channels.toggleSignatures parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v68/methods/channels_updatePinnedMessage.md index d2314d851..7376df10a 100644 --- a/old_docs/API_docs_v68/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v68/methods/channels_updatePinnedMessage.md @@ -20,6 +20,15 @@ description: channels.updatePinnedMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/channels_updateUsername.md b/old_docs/API_docs_v68/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v68/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v68/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/contacts_block.md b/old_docs/API_docs_v68/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v68/methods/contacts_block.md +++ b/old_docs/API_docs_v68/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/contacts_deleteContact.md b/old_docs/API_docs_v68/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v68/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v68/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/contacts_deleteContacts.md b/old_docs/API_docs_v68/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v68/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v68/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/contacts_getTopPeers.md b/old_docs/API_docs_v68/methods/contacts_getTopPeers.md index a1c85ce0e..cbd64cc04 100644 --- a/old_docs/API_docs_v68/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v68/methods/contacts_getTopPeers.md @@ -26,6 +26,13 @@ description: contacts.getTopPeers parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TYPES_EMPTY|The types field is empty| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/contacts_importCard.md b/old_docs/API_docs_v68/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v68/methods/contacts_importCard.md +++ b/old_docs/API_docs_v68/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v68/methods/contacts_resetTopPeerRating.md index 2f7841892..738494b2e 100644 --- a/old_docs/API_docs_v68/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v68/methods/contacts_resetTopPeerRating.md @@ -19,6 +19,13 @@ description: contacts.resetTopPeerRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/contacts_search.md b/old_docs/API_docs_v68/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v68/methods/contacts_search.md +++ b/old_docs/API_docs_v68/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/contacts_unblock.md b/old_docs/API_docs_v68/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v68/methods/contacts_unblock.md +++ b/old_docs/API_docs_v68/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/help_getCdnConfig.md b/old_docs/API_docs_v68/methods/help_getCdnConfig.md index 82b9421e5..da446958d 100644 --- a/old_docs/API_docs_v68/methods/help_getCdnConfig.md +++ b/old_docs/API_docs_v68/methods/help_getCdnConfig.md @@ -13,6 +13,13 @@ description: help.getCdnConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/help_getConfig.md b/old_docs/API_docs_v68/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v68/methods/help_getConfig.md +++ b/old_docs/API_docs_v68/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/initConnection.md b/old_docs/API_docs_v68/methods/initConnection.md index c34dd3d01..b66ab859e 100644 --- a/old_docs/API_docs_v68/methods/initConnection.md +++ b/old_docs/API_docs_v68/methods/initConnection.md @@ -25,6 +25,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/invokeWithLayer.md b/old_docs/API_docs_v68/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v68/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v68/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/langpack_getDifference.md b/old_docs/API_docs_v68/methods/langpack_getDifference.md index 422a3b558..2e77cc3b3 100644 --- a/old_docs/API_docs_v68/methods/langpack_getDifference.md +++ b/old_docs/API_docs_v68/methods/langpack_getDifference.md @@ -18,6 +18,13 @@ description: langpack.getDifference parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/langpack_getLangPack.md b/old_docs/API_docs_v68/methods/langpack_getLangPack.md index de1e01ed6..5d4d0b810 100644 --- a/old_docs/API_docs_v68/methods/langpack_getLangPack.md +++ b/old_docs/API_docs_v68/methods/langpack_getLangPack.md @@ -18,6 +18,13 @@ description: langpack.getLangPack parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/langpack_getLanguages.md b/old_docs/API_docs_v68/methods/langpack_getLanguages.md index 4fccd7075..abaa0de32 100644 --- a/old_docs/API_docs_v68/methods/langpack_getLanguages.md +++ b/old_docs/API_docs_v68/methods/langpack_getLanguages.md @@ -13,6 +13,13 @@ description: langpack.getLanguages parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/langpack_getStrings.md b/old_docs/API_docs_v68/methods/langpack_getStrings.md index fd1e05341..9bb740dcd 100644 --- a/old_docs/API_docs_v68/methods/langpack_getStrings.md +++ b/old_docs/API_docs_v68/methods/langpack_getStrings.md @@ -19,6 +19,13 @@ description: langpack.getStrings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_addChatUser.md b/old_docs/API_docs_v68/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v68/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v68/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_checkChatInvite.md b/old_docs/API_docs_v68/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v68/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v68/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_createChat.md b/old_docs/API_docs_v68/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v68/methods/messages_createChat.md +++ b/old_docs/API_docs_v68/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_deleteChatUser.md b/old_docs/API_docs_v68/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v68/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v68/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_deleteHistory.md b/old_docs/API_docs_v68/methods/messages_deleteHistory.md index fb9b77639..ce6ba6e70 100644 --- a/old_docs/API_docs_v68/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v68/methods/messages_deleteHistory.md @@ -20,6 +20,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_deleteMessages.md b/old_docs/API_docs_v68/methods/messages_deleteMessages.md index 2949f64a4..2b88a73fc 100644 --- a/old_docs/API_docs_v68/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v68/methods/messages_deleteMessages.md @@ -19,6 +19,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_editChatAdmin.md b/old_docs/API_docs_v68/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v68/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v68/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_editChatPhoto.md b/old_docs/API_docs_v68/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v68/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v68/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_editChatTitle.md b/old_docs/API_docs_v68/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v68/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v68/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v68/methods/messages_editInlineBotMessage.md index 083d4a61b..621c81a37 100644 --- a/old_docs/API_docs_v68/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v68/methods/messages_editInlineBotMessage.md @@ -23,6 +23,14 @@ description: messages.editInlineBotMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_editMessage.md b/old_docs/API_docs_v68/methods/messages_editMessage.md index a2766336e..b8cdda817 100644 --- a/old_docs/API_docs_v68/methods/messages_editMessage.md +++ b/old_docs/API_docs_v68/methods/messages_editMessage.md @@ -24,6 +24,22 @@ description: messages.editMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_exportChatInvite.md b/old_docs/API_docs_v68/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v68/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v68/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_forwardMessage.md b/old_docs/API_docs_v68/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v68/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v68/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_forwardMessages.md b/old_docs/API_docs_v68/methods/messages_forwardMessages.md index 8b91a2086..0f6492002 100644 --- a/old_docs/API_docs_v68/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v68/methods/messages_forwardMessages.md @@ -23,6 +23,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v68/methods/messages_getBotCallbackAnswer.md index 9d9470d05..433144c3d 100644 --- a/old_docs/API_docs_v68/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v68/methods/messages_getBotCallbackAnswer.md @@ -21,6 +21,16 @@ description: messages.getBotCallbackAnswer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getChats.md b/old_docs/API_docs_v68/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v68/methods/messages_getChats.md +++ b/old_docs/API_docs_v68/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getCommonChats.md b/old_docs/API_docs_v68/methods/messages_getCommonChats.md index 985a52dff..0c601ca98 100644 --- a/old_docs/API_docs_v68/methods/messages_getCommonChats.md +++ b/old_docs/API_docs_v68/methods/messages_getCommonChats.md @@ -20,6 +20,13 @@ description: messages.getCommonChats parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getDhConfig.md b/old_docs/API_docs_v68/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v68/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v68/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getDialogs.md b/old_docs/API_docs_v68/methods/messages_getDialogs.md index e38aa9965..131b75b7a 100644 --- a/old_docs/API_docs_v68/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v68/methods/messages_getDialogs.md @@ -22,6 +22,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v68/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/old_docs/API_docs_v68/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v68/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getGameHighScores.md b/old_docs/API_docs_v68/methods/messages_getGameHighScores.md index d558df8a6..935bb95a7 100644 --- a/old_docs/API_docs_v68/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v68/methods/messages_getGameHighScores.md @@ -20,6 +20,14 @@ description: messages.getGameHighScores parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getHistory.md b/old_docs/API_docs_v68/methods/messages_getHistory.md index 273eb6a91..a48a465eb 100644 --- a/old_docs/API_docs_v68/methods/messages_getHistory.md +++ b/old_docs/API_docs_v68/methods/messages_getHistory.md @@ -24,6 +24,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v68/methods/messages_getInlineBotResults.md index f5da1c5a0..61366580b 100644 --- a/old_docs/API_docs_v68/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v68/methods/messages_getInlineBotResults.md @@ -22,6 +22,16 @@ description: messages.getInlineBotResults parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INLINE_DISABLED|This bot can't be used in inline mode| +|BOT_INVALID|This is not a valid bot| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v68/methods/messages_getInlineGameHighScores.md index 24b512ca2..7cc04d0de 100644 --- a/old_docs/API_docs_v68/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v68/methods/messages_getInlineGameHighScores.md @@ -19,6 +19,14 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getMessageEditData.md b/old_docs/API_docs_v68/methods/messages_getMessageEditData.md index ee07fd74e..a8b135c67 100644 --- a/old_docs/API_docs_v68/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v68/methods/messages_getMessageEditData.md @@ -19,6 +19,14 @@ description: messages.getMessageEditData parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getMessagesViews.md b/old_docs/API_docs_v68/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v68/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v68/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v68/methods/messages_getPeerDialogs.md index e388e309c..3da60038f 100644 --- a/old_docs/API_docs_v68/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v68/methods/messages_getPeerDialogs.md @@ -18,6 +18,14 @@ description: messages.getPeerDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getPeerSettings.md b/old_docs/API_docs_v68/methods/messages_getPeerSettings.md index 26776c43b..d3e3cfc39 100644 --- a/old_docs/API_docs_v68/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v68/methods/messages_getPeerSettings.md @@ -18,6 +18,14 @@ description: messages.getPeerSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getStickerSet.md b/old_docs/API_docs_v68/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v68/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v68/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_getWebPage.md b/old_docs/API_docs_v68/methods/messages_getWebPage.md index 81591daf5..35f6e5456 100644 --- a/old_docs/API_docs_v68/methods/messages_getWebPage.md +++ b/old_docs/API_docs_v68/methods/messages_getWebPage.md @@ -19,6 +19,13 @@ description: messages.getWebPage parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|WC_CONVERT_URL_INVALID|WC convert URL invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_hideReportSpam.md b/old_docs/API_docs_v68/methods/messages_hideReportSpam.md index 20bc6f186..2dfe4dd7a 100644 --- a/old_docs/API_docs_v68/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v68/methods/messages_hideReportSpam.md @@ -18,6 +18,13 @@ description: messages.hideReportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_importChatInvite.md b/old_docs/API_docs_v68/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v68/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v68/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_installStickerSet.md b/old_docs/API_docs_v68/methods/messages_installStickerSet.md index 6073eb13b..3dde52a75 100644 --- a/old_docs/API_docs_v68/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v68/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_migrateChat.md b/old_docs/API_docs_v68/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v68/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v68/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v68/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v68/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v68/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_readHistory.md b/old_docs/API_docs_v68/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v68/methods/messages_readHistory.md +++ b/old_docs/API_docs_v68/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_receivedQueue.md b/old_docs/API_docs_v68/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v68/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v68/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_reorderPinnedDialogs.md b/old_docs/API_docs_v68/methods/messages_reorderPinnedDialogs.md index 2660b3633..30102fd7a 100644 --- a/old_docs/API_docs_v68/methods/messages_reorderPinnedDialogs.md +++ b/old_docs/API_docs_v68/methods/messages_reorderPinnedDialogs.md @@ -19,6 +19,13 @@ description: messages.reorderPinnedDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_reportEncryptedSpam.md b/old_docs/API_docs_v68/methods/messages_reportEncryptedSpam.md index 5764b8486..30ef34732 100644 --- a/old_docs/API_docs_v68/methods/messages_reportEncryptedSpam.md +++ b/old_docs/API_docs_v68/methods/messages_reportEncryptedSpam.md @@ -18,6 +18,13 @@ description: messages.reportEncryptedSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_reportSpam.md b/old_docs/API_docs_v68/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v68/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v68/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_saveDraft.md b/old_docs/API_docs_v68/methods/messages_saveDraft.md index ef5e65c57..42308b46f 100644 --- a/old_docs/API_docs_v68/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v68/methods/messages_saveDraft.md @@ -23,6 +23,13 @@ description: messages.saveDraft parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_saveGif.md b/old_docs/API_docs_v68/methods/messages_saveGif.md index 2d41d5338..31e486320 100644 --- a/old_docs/API_docs_v68/methods/messages_saveGif.md +++ b/old_docs/API_docs_v68/methods/messages_saveGif.md @@ -19,6 +19,13 @@ description: messages.saveGif parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|GIF_ID_INVALID|The provided GIF ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v68/methods/messages_saveRecentSticker.md index cb4f98b35..8d45be5ef 100644 --- a/old_docs/API_docs_v68/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v68/methods/messages_saveRecentSticker.md @@ -20,6 +20,13 @@ description: messages.saveRecentSticker parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKER_ID_INVALID|The provided sticker ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_search.md b/old_docs/API_docs_v68/methods/messages_search.md index dfdb24f76..0ae797ca4 100644 --- a/old_docs/API_docs_v68/methods/messages_search.md +++ b/old_docs/API_docs_v68/methods/messages_search.md @@ -26,6 +26,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_searchGifs.md b/old_docs/API_docs_v68/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/old_docs/API_docs_v68/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v68/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_searchGlobal.md b/old_docs/API_docs_v68/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v68/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v68/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_sendEncrypted.md b/old_docs/API_docs_v68/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v68/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v68/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v68/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v68/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v68/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v68/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v68/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v68/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v68/methods/messages_sendInlineBotResult.md index 6ab41f500..6aeeb67d5 100644 --- a/old_docs/API_docs_v68/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v68/methods/messages_sendInlineBotResult.md @@ -24,6 +24,16 @@ description: messages.sendInlineBotResult parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INLINE_RESULT_EXPIRED|The inline query expired| +|PEER_ID_INVALID|The provided peer id is invalid| +|QUERY_ID_EMPTY|The query ID is empty| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_sendMedia.md b/old_docs/API_docs_v68/methods/messages_sendMedia.md index 68e2c41be..8c22e1c9f 100644 --- a/old_docs/API_docs_v68/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v68/methods/messages_sendMedia.md @@ -24,6 +24,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_sendMessage.md b/old_docs/API_docs_v68/methods/messages_sendMessage.md index cabccdb33..60b50412f 100644 --- a/old_docs/API_docs_v68/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v68/methods/messages_sendMessage.md @@ -27,6 +27,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v68/methods/messages_setBotCallbackAnswer.md index ef9b8f7a8..2c51854ff 100644 --- a/old_docs/API_docs_v68/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v68/methods/messages_setBotCallbackAnswer.md @@ -22,6 +22,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_setBotPrecheckoutResults.md b/old_docs/API_docs_v68/methods/messages_setBotPrecheckoutResults.md index 92bdcb9e4..25ed5ed5e 100644 --- a/old_docs/API_docs_v68/methods/messages_setBotPrecheckoutResults.md +++ b/old_docs/API_docs_v68/methods/messages_setBotPrecheckoutResults.md @@ -20,6 +20,13 @@ description: messages.setBotPrecheckoutResults parameters, return type and examp ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ERROR_TEXT_EMPTY|The provided error message is empty| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_setBotShippingResults.md b/old_docs/API_docs_v68/methods/messages_setBotShippingResults.md index e2c7cd45b..49ac28967 100644 --- a/old_docs/API_docs_v68/methods/messages_setBotShippingResults.md +++ b/old_docs/API_docs_v68/methods/messages_setBotShippingResults.md @@ -20,6 +20,13 @@ description: messages.setBotShippingResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v68/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v68/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v68/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_setGameScore.md b/old_docs/API_docs_v68/methods/messages_setGameScore.md index f16a7539c..3137f7c91 100644 --- a/old_docs/API_docs_v68/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v68/methods/messages_setGameScore.md @@ -23,6 +23,14 @@ description: messages.setGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v68/methods/messages_setInlineBotResults.md index cf74e5e4b..8b5625f34 100644 --- a/old_docs/API_docs_v68/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v68/methods/messages_setInlineBotResults.md @@ -24,6 +24,23 @@ description: messages.setInlineBotResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ARTICLE_TITLE_EMPTY|The title of the article is empty| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|MESSAGE_EMPTY|The provided message is empty| +|QUERY_ID_INVALID|The query ID is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|RESULT_TYPE_INVALID|Result type invalid| +|SEND_MESSAGE_TYPE_INVALID|The message type is invalid| +|START_PARAM_INVALID|Start parameter invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v68/methods/messages_setInlineGameScore.md index c922f937b..36752f351 100644 --- a/old_docs/API_docs_v68/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v68/methods/messages_setInlineGameScore.md @@ -22,6 +22,14 @@ description: messages.setInlineGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_setTyping.md b/old_docs/API_docs_v68/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v68/methods/messages_setTyping.md +++ b/old_docs/API_docs_v68/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_startBot.md b/old_docs/API_docs_v68/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v68/methods/messages_startBot.md +++ b/old_docs/API_docs_v68/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v68/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v68/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v68/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_toggleDialogPin.md b/old_docs/API_docs_v68/methods/messages_toggleDialogPin.md index f4506918c..f35f2f401 100644 --- a/old_docs/API_docs_v68/methods/messages_toggleDialogPin.md +++ b/old_docs/API_docs_v68/methods/messages_toggleDialogPin.md @@ -19,6 +19,13 @@ description: messages.toggleDialogPin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v68/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v68/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v68/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/messages_uploadMedia.md b/old_docs/API_docs_v68/methods/messages_uploadMedia.md index 64fd8372b..03f07c26e 100644 --- a/old_docs/API_docs_v68/methods/messages_uploadMedia.md +++ b/old_docs/API_docs_v68/methods/messages_uploadMedia.md @@ -19,6 +19,15 @@ description: messages.uploadMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|MEDIA_INVALID|Media invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/payments_getPaymentForm.md b/old_docs/API_docs_v68/methods/payments_getPaymentForm.md index fa82f22d6..15f6e26b9 100644 --- a/old_docs/API_docs_v68/methods/payments_getPaymentForm.md +++ b/old_docs/API_docs_v68/methods/payments_getPaymentForm.md @@ -18,6 +18,13 @@ description: payments.getPaymentForm parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/payments_getPaymentReceipt.md b/old_docs/API_docs_v68/methods/payments_getPaymentReceipt.md index d6b5f5d62..51433563a 100644 --- a/old_docs/API_docs_v68/methods/payments_getPaymentReceipt.md +++ b/old_docs/API_docs_v68/methods/payments_getPaymentReceipt.md @@ -18,6 +18,13 @@ description: payments.getPaymentReceipt parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/payments_sendPaymentForm.md b/old_docs/API_docs_v68/methods/payments_sendPaymentForm.md index 831516a32..a63a39805 100644 --- a/old_docs/API_docs_v68/methods/payments_sendPaymentForm.md +++ b/old_docs/API_docs_v68/methods/payments_sendPaymentForm.md @@ -21,6 +21,13 @@ description: payments.sendPaymentForm parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/payments_validateRequestedInfo.md b/old_docs/API_docs_v68/methods/payments_validateRequestedInfo.md index 4102a4739..d839a2dfd 100644 --- a/old_docs/API_docs_v68/methods/payments_validateRequestedInfo.md +++ b/old_docs/API_docs_v68/methods/payments_validateRequestedInfo.md @@ -20,6 +20,13 @@ description: payments.validateRequestedInfo parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/phone_receivedCall.md b/old_docs/API_docs_v68/methods/phone_receivedCall.md index b06a90adc..9d59b1eae 100644 --- a/old_docs/API_docs_v68/methods/phone_receivedCall.md +++ b/old_docs/API_docs_v68/methods/phone_receivedCall.md @@ -18,6 +18,14 @@ description: phone.receivedCall parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_ALREADY_DECLINED|The call was already declined| +|CALL_PEER_INVALID|The provided call peer object is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/phone_saveCallDebug.md b/old_docs/API_docs_v68/methods/phone_saveCallDebug.md index 589dc522e..4dee5c971 100644 --- a/old_docs/API_docs_v68/methods/phone_saveCallDebug.md +++ b/old_docs/API_docs_v68/methods/phone_saveCallDebug.md @@ -19,6 +19,14 @@ description: phone.saveCallDebug parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_PEER_INVALID|The provided call peer object is invalid| +|DATA_JSON_INVALID|The provided JSON data is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/phone_setCallRating.md b/old_docs/API_docs_v68/methods/phone_setCallRating.md index a2b2e27cd..fea236d10 100644 --- a/old_docs/API_docs_v68/methods/phone_setCallRating.md +++ b/old_docs/API_docs_v68/methods/phone_setCallRating.md @@ -20,6 +20,13 @@ description: phone.setCallRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_PEER_INVALID|The provided call peer object is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/photos_getUserPhotos.md b/old_docs/API_docs_v68/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v68/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v68/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v68/methods/photos_uploadProfilePhoto.md index 6de32dae0..58541f235 100644 --- a/old_docs/API_docs_v68/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v68/methods/photos_uploadProfilePhoto.md @@ -18,6 +18,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/stickers_addStickerToSet.md b/old_docs/API_docs_v68/methods/stickers_addStickerToSet.md index 620e773ae..bf62fa090 100644 --- a/old_docs/API_docs_v68/methods/stickers_addStickerToSet.md +++ b/old_docs/API_docs_v68/methods/stickers_addStickerToSet.md @@ -19,6 +19,14 @@ description: stickers.addStickerToSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/stickers_changeStickerPosition.md b/old_docs/API_docs_v68/methods/stickers_changeStickerPosition.md index b7f38ec34..a5784b3aa 100644 --- a/old_docs/API_docs_v68/methods/stickers_changeStickerPosition.md +++ b/old_docs/API_docs_v68/methods/stickers_changeStickerPosition.md @@ -19,6 +19,14 @@ description: stickers.changeStickerPosition parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|STICKER_INVALID|The provided sticker is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/stickers_createStickerSet.md b/old_docs/API_docs_v68/methods/stickers_createStickerSet.md index cacdd73a7..02ec673bd 100644 --- a/old_docs/API_docs_v68/methods/stickers_createStickerSet.md +++ b/old_docs/API_docs_v68/methods/stickers_createStickerSet.md @@ -22,6 +22,17 @@ description: stickers.createStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|PACK_SHORT_NAME_INVALID|Short pack name invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|STICKERS_EMPTY|No sticker provided| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/stickers_removeStickerFromSet.md b/old_docs/API_docs_v68/methods/stickers_removeStickerFromSet.md index 7edd4b438..d485db145 100644 --- a/old_docs/API_docs_v68/methods/stickers_removeStickerFromSet.md +++ b/old_docs/API_docs_v68/methods/stickers_removeStickerFromSet.md @@ -18,6 +18,14 @@ description: stickers.removeStickerFromSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|STICKER_INVALID|The provided sticker is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/upload_getWebFile.md b/old_docs/API_docs_v68/methods/upload_getWebFile.md index fab17a7fc..ec7c05b4a 100644 --- a/old_docs/API_docs_v68/methods/upload_getWebFile.md +++ b/old_docs/API_docs_v68/methods/upload_getWebFile.md @@ -20,6 +20,13 @@ description: upload.getWebFile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LOCATION_INVALID|The provided location is invalid| + + ### Example: diff --git a/old_docs/API_docs_v68/methods/users_getUsers.md b/old_docs/API_docs_v68/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v68/methods/users_getUsers.md +++ b/old_docs/API_docs_v68/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_changePhone.md b/old_docs/API_docs_v70/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v70/methods/account_changePhone.md +++ b/old_docs/API_docs_v70/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_checkUsername.md b/old_docs/API_docs_v70/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v70/methods/account_checkUsername.md +++ b/old_docs/API_docs_v70/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_confirmPhone.md b/old_docs/API_docs_v70/methods/account_confirmPhone.md index c2526b2ad..0d2dc5c64 100644 --- a/old_docs/API_docs_v70/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v70/methods/account_confirmPhone.md @@ -19,6 +19,14 @@ description: account.confirmPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_HASH_INVALID|Code hash invalid| +|PHONE_CODE_EMPTY|phone_code is missing| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_getNotifySettings.md b/old_docs/API_docs_v70/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v70/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v70/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_getPasswordSettings.md b/old_docs/API_docs_v70/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v70/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v70/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_getPrivacy.md b/old_docs/API_docs_v70/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v70/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v70/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_getTmpPassword.md b/old_docs/API_docs_v70/methods/account_getTmpPassword.md index c368baf7e..83ab09b16 100644 --- a/old_docs/API_docs_v70/methods/account_getTmpPassword.md +++ b/old_docs/API_docs_v70/methods/account_getTmpPassword.md @@ -19,6 +19,14 @@ description: account.getTmpPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| +|TMP_PASSWORD_DISABLED|The temporary password is disabled| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_registerDevice.md b/old_docs/API_docs_v70/methods/account_registerDevice.md index 6865551ee..3cc7f98d4 100644 --- a/old_docs/API_docs_v70/methods/account_registerDevice.md +++ b/old_docs/API_docs_v70/methods/account_registerDevice.md @@ -19,6 +19,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_reportPeer.md b/old_docs/API_docs_v70/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v70/methods/account_reportPeer.md +++ b/old_docs/API_docs_v70/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_resetAuthorization.md b/old_docs/API_docs_v70/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v70/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v70/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v70/methods/account_sendChangePhoneCode.md index a1f49156d..4be218f24 100644 --- a/old_docs/API_docs_v70/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v70/methods/account_sendChangePhoneCode.md @@ -20,6 +20,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v70/methods/account_sendConfirmPhoneCode.md index 5ad44987b..009fcb09b 100644 --- a/old_docs/API_docs_v70/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v70/methods/account_sendConfirmPhoneCode.md @@ -20,6 +20,13 @@ description: account.sendConfirmPhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_setAccountTTL.md b/old_docs/API_docs_v70/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v70/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v70/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_setPrivacy.md b/old_docs/API_docs_v70/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v70/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v70/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_unregisterDevice.md b/old_docs/API_docs_v70/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v70/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v70/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_updateNotifySettings.md b/old_docs/API_docs_v70/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v70/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v70/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v70/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v70/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v70/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_updateProfile.md b/old_docs/API_docs_v70/methods/account_updateProfile.md index 531bbb028..a50eaea58 100644 --- a/old_docs/API_docs_v70/methods/account_updateProfile.md +++ b/old_docs/API_docs_v70/methods/account_updateProfile.md @@ -20,6 +20,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_updateStatus.md b/old_docs/API_docs_v70/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v70/methods/account_updateStatus.md +++ b/old_docs/API_docs_v70/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/account_updateUsername.md b/old_docs/API_docs_v70/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v70/methods/account_updateUsername.md +++ b/old_docs/API_docs_v70/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v70/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v70/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v70/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/auth_cancelCode.md b/old_docs/API_docs_v70/methods/auth_cancelCode.md index cc93fff5b..dc390329f 100644 --- a/old_docs/API_docs_v70/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v70/methods/auth_cancelCode.md @@ -19,6 +19,13 @@ description: auth.cancelCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/auth_checkPassword.md b/old_docs/API_docs_v70/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v70/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v70/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/auth_checkPhone.md b/old_docs/API_docs_v70/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v70/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v70/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/auth_exportAuthorization.md b/old_docs/API_docs_v70/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v70/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v70/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/auth_importAuthorization.md b/old_docs/API_docs_v70/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v70/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v70/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/auth_recoverPassword.md b/old_docs/API_docs_v70/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v70/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v70/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v70/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v70/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v70/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/auth_resendCode.md b/old_docs/API_docs_v70/methods/auth_resendCode.md index 92f7aa308..14d08ddd1 100644 --- a/old_docs/API_docs_v70/methods/auth_resendCode.md +++ b/old_docs/API_docs_v70/methods/auth_resendCode.md @@ -19,6 +19,13 @@ description: auth.resendCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v70/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v70/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v70/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/auth_sendInvites.md b/old_docs/API_docs_v70/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v70/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v70/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/bots_answerWebhookJSONQuery.md b/old_docs/API_docs_v70/methods/bots_answerWebhookJSONQuery.md index 59c134d45..ae1efce3b 100644 --- a/old_docs/API_docs_v70/methods/bots_answerWebhookJSONQuery.md +++ b/old_docs/API_docs_v70/methods/bots_answerWebhookJSONQuery.md @@ -19,6 +19,14 @@ description: bots.answerWebhookJSONQuery parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/bots_sendCustomRequest.md b/old_docs/API_docs_v70/methods/bots_sendCustomRequest.md index 57a49e6e3..927f18c5a 100644 --- a/old_docs/API_docs_v70/methods/bots_sendCustomRequest.md +++ b/old_docs/API_docs_v70/methods/bots_sendCustomRequest.md @@ -19,6 +19,13 @@ description: bots.sendCustomRequest parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_checkUsername.md b/old_docs/API_docs_v70/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v70/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v70/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_createChannel.md b/old_docs/API_docs_v70/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v70/methods/channels_createChannel.md +++ b/old_docs/API_docs_v70/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_deleteChannel.md b/old_docs/API_docs_v70/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v70/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v70/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_deleteMessages.md b/old_docs/API_docs_v70/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v70/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v70/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v70/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v70/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v70/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_editAbout.md b/old_docs/API_docs_v70/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v70/methods/channels_editAbout.md +++ b/old_docs/API_docs_v70/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_editAdmin.md b/old_docs/API_docs_v70/methods/channels_editAdmin.md index 242496ab1..e68ba7eaf 100644 --- a/old_docs/API_docs_v70/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v70/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_editBanned.md b/old_docs/API_docs_v70/methods/channels_editBanned.md index 7d3fc1d08..7fb904b9a 100644 --- a/old_docs/API_docs_v70/methods/channels_editBanned.md +++ b/old_docs/API_docs_v70/methods/channels_editBanned.md @@ -20,6 +20,17 @@ description: channels.editBanned parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ADMIN_INVALID|You're not an admin| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_editPhoto.md b/old_docs/API_docs_v70/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v70/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v70/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_editTitle.md b/old_docs/API_docs_v70/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v70/methods/channels_editTitle.md +++ b/old_docs/API_docs_v70/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_exportInvite.md b/old_docs/API_docs_v70/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v70/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v70/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_exportMessageLink.md b/old_docs/API_docs_v70/methods/channels_exportMessageLink.md index 9e7135ab8..9831c9c03 100644 --- a/old_docs/API_docs_v70/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v70/methods/channels_exportMessageLink.md @@ -19,6 +19,13 @@ description: channels.exportMessageLink parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_getAdminLog.md b/old_docs/API_docs_v70/methods/channels_getAdminLog.md index 4775c872a..5283563d4 100644 --- a/old_docs/API_docs_v70/methods/channels_getAdminLog.md +++ b/old_docs/API_docs_v70/methods/channels_getAdminLog.md @@ -24,6 +24,15 @@ description: channels.getAdminLog parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_getChannels.md b/old_docs/API_docs_v70/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v70/methods/channels_getChannels.md +++ b/old_docs/API_docs_v70/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_getMessages.md b/old_docs/API_docs_v70/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v70/methods/channels_getMessages.md +++ b/old_docs/API_docs_v70/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_getParticipant.md b/old_docs/API_docs_v70/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v70/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v70/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_inviteToChannel.md b/old_docs/API_docs_v70/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v70/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v70/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_joinChannel.md b/old_docs/API_docs_v70/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v70/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v70/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_leaveChannel.md b/old_docs/API_docs_v70/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v70/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v70/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_readHistory.md b/old_docs/API_docs_v70/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v70/methods/channels_readHistory.md +++ b/old_docs/API_docs_v70/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_reportSpam.md b/old_docs/API_docs_v70/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v70/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v70/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_toggleInvites.md b/old_docs/API_docs_v70/methods/channels_toggleInvites.md index 0733d419f..c2715b323 100644 --- a/old_docs/API_docs_v70/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v70/methods/channels_toggleInvites.md @@ -19,6 +19,15 @@ description: channels.toggleInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_toggleSignatures.md b/old_docs/API_docs_v70/methods/channels_toggleSignatures.md index 3056eaee8..a214b8493 100644 --- a/old_docs/API_docs_v70/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v70/methods/channels_toggleSignatures.md @@ -19,6 +19,13 @@ description: channels.toggleSignatures parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v70/methods/channels_updatePinnedMessage.md index d2314d851..7376df10a 100644 --- a/old_docs/API_docs_v70/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v70/methods/channels_updatePinnedMessage.md @@ -20,6 +20,15 @@ description: channels.updatePinnedMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/channels_updateUsername.md b/old_docs/API_docs_v70/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v70/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v70/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/contacts_block.md b/old_docs/API_docs_v70/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v70/methods/contacts_block.md +++ b/old_docs/API_docs_v70/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/contacts_deleteContact.md b/old_docs/API_docs_v70/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v70/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v70/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/contacts_deleteContacts.md b/old_docs/API_docs_v70/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v70/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v70/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/contacts_getTopPeers.md b/old_docs/API_docs_v70/methods/contacts_getTopPeers.md index a1c85ce0e..cbd64cc04 100644 --- a/old_docs/API_docs_v70/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v70/methods/contacts_getTopPeers.md @@ -26,6 +26,13 @@ description: contacts.getTopPeers parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TYPES_EMPTY|The types field is empty| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/contacts_importCard.md b/old_docs/API_docs_v70/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v70/methods/contacts_importCard.md +++ b/old_docs/API_docs_v70/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v70/methods/contacts_resetTopPeerRating.md index 2f7841892..738494b2e 100644 --- a/old_docs/API_docs_v70/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v70/methods/contacts_resetTopPeerRating.md @@ -19,6 +19,13 @@ description: contacts.resetTopPeerRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/contacts_search.md b/old_docs/API_docs_v70/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v70/methods/contacts_search.md +++ b/old_docs/API_docs_v70/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/contacts_unblock.md b/old_docs/API_docs_v70/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v70/methods/contacts_unblock.md +++ b/old_docs/API_docs_v70/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/help_getCdnConfig.md b/old_docs/API_docs_v70/methods/help_getCdnConfig.md index 82b9421e5..da446958d 100644 --- a/old_docs/API_docs_v70/methods/help_getCdnConfig.md +++ b/old_docs/API_docs_v70/methods/help_getCdnConfig.md @@ -13,6 +13,13 @@ description: help.getCdnConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/help_getConfig.md b/old_docs/API_docs_v70/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v70/methods/help_getConfig.md +++ b/old_docs/API_docs_v70/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/initConnection.md b/old_docs/API_docs_v70/methods/initConnection.md index c34dd3d01..b66ab859e 100644 --- a/old_docs/API_docs_v70/methods/initConnection.md +++ b/old_docs/API_docs_v70/methods/initConnection.md @@ -25,6 +25,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/invokeWithLayer.md b/old_docs/API_docs_v70/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v70/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v70/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/langpack_getDifference.md b/old_docs/API_docs_v70/methods/langpack_getDifference.md index 422a3b558..2e77cc3b3 100644 --- a/old_docs/API_docs_v70/methods/langpack_getDifference.md +++ b/old_docs/API_docs_v70/methods/langpack_getDifference.md @@ -18,6 +18,13 @@ description: langpack.getDifference parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/langpack_getLangPack.md b/old_docs/API_docs_v70/methods/langpack_getLangPack.md index de1e01ed6..5d4d0b810 100644 --- a/old_docs/API_docs_v70/methods/langpack_getLangPack.md +++ b/old_docs/API_docs_v70/methods/langpack_getLangPack.md @@ -18,6 +18,13 @@ description: langpack.getLangPack parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/langpack_getLanguages.md b/old_docs/API_docs_v70/methods/langpack_getLanguages.md index 4fccd7075..abaa0de32 100644 --- a/old_docs/API_docs_v70/methods/langpack_getLanguages.md +++ b/old_docs/API_docs_v70/methods/langpack_getLanguages.md @@ -13,6 +13,13 @@ description: langpack.getLanguages parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/langpack_getStrings.md b/old_docs/API_docs_v70/methods/langpack_getStrings.md index fd1e05341..9bb740dcd 100644 --- a/old_docs/API_docs_v70/methods/langpack_getStrings.md +++ b/old_docs/API_docs_v70/methods/langpack_getStrings.md @@ -19,6 +19,13 @@ description: langpack.getStrings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_addChatUser.md b/old_docs/API_docs_v70/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v70/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v70/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_checkChatInvite.md b/old_docs/API_docs_v70/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v70/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v70/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_createChat.md b/old_docs/API_docs_v70/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v70/methods/messages_createChat.md +++ b/old_docs/API_docs_v70/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_deleteChatUser.md b/old_docs/API_docs_v70/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v70/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v70/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_deleteHistory.md b/old_docs/API_docs_v70/methods/messages_deleteHistory.md index fb9b77639..ce6ba6e70 100644 --- a/old_docs/API_docs_v70/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v70/methods/messages_deleteHistory.md @@ -20,6 +20,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_deleteMessages.md b/old_docs/API_docs_v70/methods/messages_deleteMessages.md index 2949f64a4..2b88a73fc 100644 --- a/old_docs/API_docs_v70/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v70/methods/messages_deleteMessages.md @@ -19,6 +19,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_editChatAdmin.md b/old_docs/API_docs_v70/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v70/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v70/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_editChatPhoto.md b/old_docs/API_docs_v70/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v70/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v70/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_editChatTitle.md b/old_docs/API_docs_v70/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v70/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v70/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v70/methods/messages_editInlineBotMessage.md index 083d4a61b..621c81a37 100644 --- a/old_docs/API_docs_v70/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v70/methods/messages_editInlineBotMessage.md @@ -23,6 +23,14 @@ description: messages.editInlineBotMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_editMessage.md b/old_docs/API_docs_v70/methods/messages_editMessage.md index a2766336e..b8cdda817 100644 --- a/old_docs/API_docs_v70/methods/messages_editMessage.md +++ b/old_docs/API_docs_v70/methods/messages_editMessage.md @@ -24,6 +24,22 @@ description: messages.editMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_exportChatInvite.md b/old_docs/API_docs_v70/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v70/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v70/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_forwardMessage.md b/old_docs/API_docs_v70/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v70/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v70/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_forwardMessages.md b/old_docs/API_docs_v70/methods/messages_forwardMessages.md index 8b91a2086..0f6492002 100644 --- a/old_docs/API_docs_v70/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v70/methods/messages_forwardMessages.md @@ -23,6 +23,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v70/methods/messages_getBotCallbackAnswer.md index 9d9470d05..433144c3d 100644 --- a/old_docs/API_docs_v70/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v70/methods/messages_getBotCallbackAnswer.md @@ -21,6 +21,16 @@ description: messages.getBotCallbackAnswer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getChats.md b/old_docs/API_docs_v70/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v70/methods/messages_getChats.md +++ b/old_docs/API_docs_v70/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getCommonChats.md b/old_docs/API_docs_v70/methods/messages_getCommonChats.md index 985a52dff..0c601ca98 100644 --- a/old_docs/API_docs_v70/methods/messages_getCommonChats.md +++ b/old_docs/API_docs_v70/methods/messages_getCommonChats.md @@ -20,6 +20,13 @@ description: messages.getCommonChats parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getDhConfig.md b/old_docs/API_docs_v70/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v70/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v70/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getDialogs.md b/old_docs/API_docs_v70/methods/messages_getDialogs.md index e38aa9965..131b75b7a 100644 --- a/old_docs/API_docs_v70/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v70/methods/messages_getDialogs.md @@ -22,6 +22,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v70/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/old_docs/API_docs_v70/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v70/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getGameHighScores.md b/old_docs/API_docs_v70/methods/messages_getGameHighScores.md index d558df8a6..935bb95a7 100644 --- a/old_docs/API_docs_v70/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v70/methods/messages_getGameHighScores.md @@ -20,6 +20,14 @@ description: messages.getGameHighScores parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getHistory.md b/old_docs/API_docs_v70/methods/messages_getHistory.md index 273eb6a91..a48a465eb 100644 --- a/old_docs/API_docs_v70/methods/messages_getHistory.md +++ b/old_docs/API_docs_v70/methods/messages_getHistory.md @@ -24,6 +24,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v70/methods/messages_getInlineBotResults.md index f5da1c5a0..61366580b 100644 --- a/old_docs/API_docs_v70/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v70/methods/messages_getInlineBotResults.md @@ -22,6 +22,16 @@ description: messages.getInlineBotResults parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INLINE_DISABLED|This bot can't be used in inline mode| +|BOT_INVALID|This is not a valid bot| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v70/methods/messages_getInlineGameHighScores.md index 24b512ca2..7cc04d0de 100644 --- a/old_docs/API_docs_v70/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v70/methods/messages_getInlineGameHighScores.md @@ -19,6 +19,14 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getMessageEditData.md b/old_docs/API_docs_v70/methods/messages_getMessageEditData.md index ee07fd74e..a8b135c67 100644 --- a/old_docs/API_docs_v70/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v70/methods/messages_getMessageEditData.md @@ -19,6 +19,14 @@ description: messages.getMessageEditData parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getMessagesViews.md b/old_docs/API_docs_v70/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v70/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v70/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v70/methods/messages_getPeerDialogs.md index e388e309c..3da60038f 100644 --- a/old_docs/API_docs_v70/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v70/methods/messages_getPeerDialogs.md @@ -18,6 +18,14 @@ description: messages.getPeerDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getPeerSettings.md b/old_docs/API_docs_v70/methods/messages_getPeerSettings.md index 26776c43b..d3e3cfc39 100644 --- a/old_docs/API_docs_v70/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v70/methods/messages_getPeerSettings.md @@ -18,6 +18,14 @@ description: messages.getPeerSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getStickerSet.md b/old_docs/API_docs_v70/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v70/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v70/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_getWebPage.md b/old_docs/API_docs_v70/methods/messages_getWebPage.md index 81591daf5..35f6e5456 100644 --- a/old_docs/API_docs_v70/methods/messages_getWebPage.md +++ b/old_docs/API_docs_v70/methods/messages_getWebPage.md @@ -19,6 +19,13 @@ description: messages.getWebPage parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|WC_CONVERT_URL_INVALID|WC convert URL invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_hideReportSpam.md b/old_docs/API_docs_v70/methods/messages_hideReportSpam.md index 20bc6f186..2dfe4dd7a 100644 --- a/old_docs/API_docs_v70/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v70/methods/messages_hideReportSpam.md @@ -18,6 +18,13 @@ description: messages.hideReportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_importChatInvite.md b/old_docs/API_docs_v70/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v70/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v70/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_installStickerSet.md b/old_docs/API_docs_v70/methods/messages_installStickerSet.md index 6073eb13b..3dde52a75 100644 --- a/old_docs/API_docs_v70/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v70/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_migrateChat.md b/old_docs/API_docs_v70/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v70/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v70/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v70/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v70/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v70/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_readHistory.md b/old_docs/API_docs_v70/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v70/methods/messages_readHistory.md +++ b/old_docs/API_docs_v70/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_receivedQueue.md b/old_docs/API_docs_v70/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v70/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v70/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_reorderPinnedDialogs.md b/old_docs/API_docs_v70/methods/messages_reorderPinnedDialogs.md index 2660b3633..30102fd7a 100644 --- a/old_docs/API_docs_v70/methods/messages_reorderPinnedDialogs.md +++ b/old_docs/API_docs_v70/methods/messages_reorderPinnedDialogs.md @@ -19,6 +19,13 @@ description: messages.reorderPinnedDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_reportEncryptedSpam.md b/old_docs/API_docs_v70/methods/messages_reportEncryptedSpam.md index 5764b8486..30ef34732 100644 --- a/old_docs/API_docs_v70/methods/messages_reportEncryptedSpam.md +++ b/old_docs/API_docs_v70/methods/messages_reportEncryptedSpam.md @@ -18,6 +18,13 @@ description: messages.reportEncryptedSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_reportSpam.md b/old_docs/API_docs_v70/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v70/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v70/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_saveDraft.md b/old_docs/API_docs_v70/methods/messages_saveDraft.md index ef5e65c57..42308b46f 100644 --- a/old_docs/API_docs_v70/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v70/methods/messages_saveDraft.md @@ -23,6 +23,13 @@ description: messages.saveDraft parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_saveGif.md b/old_docs/API_docs_v70/methods/messages_saveGif.md index 2d41d5338..31e486320 100644 --- a/old_docs/API_docs_v70/methods/messages_saveGif.md +++ b/old_docs/API_docs_v70/methods/messages_saveGif.md @@ -19,6 +19,13 @@ description: messages.saveGif parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|GIF_ID_INVALID|The provided GIF ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v70/methods/messages_saveRecentSticker.md index cb4f98b35..8d45be5ef 100644 --- a/old_docs/API_docs_v70/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v70/methods/messages_saveRecentSticker.md @@ -20,6 +20,13 @@ description: messages.saveRecentSticker parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKER_ID_INVALID|The provided sticker ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_search.md b/old_docs/API_docs_v70/methods/messages_search.md index dfdb24f76..0ae797ca4 100644 --- a/old_docs/API_docs_v70/methods/messages_search.md +++ b/old_docs/API_docs_v70/methods/messages_search.md @@ -26,6 +26,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_searchGifs.md b/old_docs/API_docs_v70/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/old_docs/API_docs_v70/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v70/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_searchGlobal.md b/old_docs/API_docs_v70/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v70/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v70/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_sendEncrypted.md b/old_docs/API_docs_v70/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v70/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v70/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v70/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v70/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v70/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v70/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v70/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v70/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v70/methods/messages_sendInlineBotResult.md index 6ab41f500..6aeeb67d5 100644 --- a/old_docs/API_docs_v70/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v70/methods/messages_sendInlineBotResult.md @@ -24,6 +24,16 @@ description: messages.sendInlineBotResult parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INLINE_RESULT_EXPIRED|The inline query expired| +|PEER_ID_INVALID|The provided peer id is invalid| +|QUERY_ID_EMPTY|The query ID is empty| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_sendMedia.md b/old_docs/API_docs_v70/methods/messages_sendMedia.md index 68e2c41be..8c22e1c9f 100644 --- a/old_docs/API_docs_v70/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v70/methods/messages_sendMedia.md @@ -24,6 +24,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_sendMessage.md b/old_docs/API_docs_v70/methods/messages_sendMessage.md index cabccdb33..60b50412f 100644 --- a/old_docs/API_docs_v70/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v70/methods/messages_sendMessage.md @@ -27,6 +27,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_sendScreenshotNotification.md b/old_docs/API_docs_v70/methods/messages_sendScreenshotNotification.md index 7c8957389..a725a12bb 100644 --- a/old_docs/API_docs_v70/methods/messages_sendScreenshotNotification.md +++ b/old_docs/API_docs_v70/methods/messages_sendScreenshotNotification.md @@ -19,6 +19,13 @@ description: messages.sendScreenshotNotification parameters, return type and exa ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v70/methods/messages_setBotCallbackAnswer.md index ef9b8f7a8..2c51854ff 100644 --- a/old_docs/API_docs_v70/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v70/methods/messages_setBotCallbackAnswer.md @@ -22,6 +22,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_setBotPrecheckoutResults.md b/old_docs/API_docs_v70/methods/messages_setBotPrecheckoutResults.md index 92bdcb9e4..25ed5ed5e 100644 --- a/old_docs/API_docs_v70/methods/messages_setBotPrecheckoutResults.md +++ b/old_docs/API_docs_v70/methods/messages_setBotPrecheckoutResults.md @@ -20,6 +20,13 @@ description: messages.setBotPrecheckoutResults parameters, return type and examp ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ERROR_TEXT_EMPTY|The provided error message is empty| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_setBotShippingResults.md b/old_docs/API_docs_v70/methods/messages_setBotShippingResults.md index e2c7cd45b..49ac28967 100644 --- a/old_docs/API_docs_v70/methods/messages_setBotShippingResults.md +++ b/old_docs/API_docs_v70/methods/messages_setBotShippingResults.md @@ -20,6 +20,13 @@ description: messages.setBotShippingResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v70/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v70/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v70/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_setGameScore.md b/old_docs/API_docs_v70/methods/messages_setGameScore.md index f16a7539c..3137f7c91 100644 --- a/old_docs/API_docs_v70/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v70/methods/messages_setGameScore.md @@ -23,6 +23,14 @@ description: messages.setGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v70/methods/messages_setInlineBotResults.md index cf74e5e4b..8b5625f34 100644 --- a/old_docs/API_docs_v70/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v70/methods/messages_setInlineBotResults.md @@ -24,6 +24,23 @@ description: messages.setInlineBotResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ARTICLE_TITLE_EMPTY|The title of the article is empty| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|MESSAGE_EMPTY|The provided message is empty| +|QUERY_ID_INVALID|The query ID is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|RESULT_TYPE_INVALID|Result type invalid| +|SEND_MESSAGE_TYPE_INVALID|The message type is invalid| +|START_PARAM_INVALID|Start parameter invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v70/methods/messages_setInlineGameScore.md index c922f937b..36752f351 100644 --- a/old_docs/API_docs_v70/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v70/methods/messages_setInlineGameScore.md @@ -22,6 +22,14 @@ description: messages.setInlineGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_setTyping.md b/old_docs/API_docs_v70/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v70/methods/messages_setTyping.md +++ b/old_docs/API_docs_v70/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_startBot.md b/old_docs/API_docs_v70/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v70/methods/messages_startBot.md +++ b/old_docs/API_docs_v70/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v70/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v70/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v70/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_toggleDialogPin.md b/old_docs/API_docs_v70/methods/messages_toggleDialogPin.md index f4506918c..f35f2f401 100644 --- a/old_docs/API_docs_v70/methods/messages_toggleDialogPin.md +++ b/old_docs/API_docs_v70/methods/messages_toggleDialogPin.md @@ -19,6 +19,13 @@ description: messages.toggleDialogPin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v70/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v70/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v70/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/messages_uploadMedia.md b/old_docs/API_docs_v70/methods/messages_uploadMedia.md index 64fd8372b..03f07c26e 100644 --- a/old_docs/API_docs_v70/methods/messages_uploadMedia.md +++ b/old_docs/API_docs_v70/methods/messages_uploadMedia.md @@ -19,6 +19,15 @@ description: messages.uploadMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|MEDIA_INVALID|Media invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/payments_getPaymentForm.md b/old_docs/API_docs_v70/methods/payments_getPaymentForm.md index fa82f22d6..15f6e26b9 100644 --- a/old_docs/API_docs_v70/methods/payments_getPaymentForm.md +++ b/old_docs/API_docs_v70/methods/payments_getPaymentForm.md @@ -18,6 +18,13 @@ description: payments.getPaymentForm parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/payments_getPaymentReceipt.md b/old_docs/API_docs_v70/methods/payments_getPaymentReceipt.md index d6b5f5d62..51433563a 100644 --- a/old_docs/API_docs_v70/methods/payments_getPaymentReceipt.md +++ b/old_docs/API_docs_v70/methods/payments_getPaymentReceipt.md @@ -18,6 +18,13 @@ description: payments.getPaymentReceipt parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/payments_sendPaymentForm.md b/old_docs/API_docs_v70/methods/payments_sendPaymentForm.md index 831516a32..a63a39805 100644 --- a/old_docs/API_docs_v70/methods/payments_sendPaymentForm.md +++ b/old_docs/API_docs_v70/methods/payments_sendPaymentForm.md @@ -21,6 +21,13 @@ description: payments.sendPaymentForm parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/payments_validateRequestedInfo.md b/old_docs/API_docs_v70/methods/payments_validateRequestedInfo.md index 4102a4739..d839a2dfd 100644 --- a/old_docs/API_docs_v70/methods/payments_validateRequestedInfo.md +++ b/old_docs/API_docs_v70/methods/payments_validateRequestedInfo.md @@ -20,6 +20,13 @@ description: payments.validateRequestedInfo parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/phone_receivedCall.md b/old_docs/API_docs_v70/methods/phone_receivedCall.md index b06a90adc..9d59b1eae 100644 --- a/old_docs/API_docs_v70/methods/phone_receivedCall.md +++ b/old_docs/API_docs_v70/methods/phone_receivedCall.md @@ -18,6 +18,14 @@ description: phone.receivedCall parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_ALREADY_DECLINED|The call was already declined| +|CALL_PEER_INVALID|The provided call peer object is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/phone_saveCallDebug.md b/old_docs/API_docs_v70/methods/phone_saveCallDebug.md index 589dc522e..4dee5c971 100644 --- a/old_docs/API_docs_v70/methods/phone_saveCallDebug.md +++ b/old_docs/API_docs_v70/methods/phone_saveCallDebug.md @@ -19,6 +19,14 @@ description: phone.saveCallDebug parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_PEER_INVALID|The provided call peer object is invalid| +|DATA_JSON_INVALID|The provided JSON data is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/phone_setCallRating.md b/old_docs/API_docs_v70/methods/phone_setCallRating.md index a2b2e27cd..fea236d10 100644 --- a/old_docs/API_docs_v70/methods/phone_setCallRating.md +++ b/old_docs/API_docs_v70/methods/phone_setCallRating.md @@ -20,6 +20,13 @@ description: phone.setCallRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_PEER_INVALID|The provided call peer object is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/photos_getUserPhotos.md b/old_docs/API_docs_v70/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v70/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v70/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v70/methods/photos_uploadProfilePhoto.md index 6de32dae0..58541f235 100644 --- a/old_docs/API_docs_v70/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v70/methods/photos_uploadProfilePhoto.md @@ -18,6 +18,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/stickers_addStickerToSet.md b/old_docs/API_docs_v70/methods/stickers_addStickerToSet.md index 620e773ae..bf62fa090 100644 --- a/old_docs/API_docs_v70/methods/stickers_addStickerToSet.md +++ b/old_docs/API_docs_v70/methods/stickers_addStickerToSet.md @@ -19,6 +19,14 @@ description: stickers.addStickerToSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/stickers_changeStickerPosition.md b/old_docs/API_docs_v70/methods/stickers_changeStickerPosition.md index 6b517d4c2..942d3a33e 100644 --- a/old_docs/API_docs_v70/methods/stickers_changeStickerPosition.md +++ b/old_docs/API_docs_v70/methods/stickers_changeStickerPosition.md @@ -19,6 +19,14 @@ description: stickers.changeStickerPosition parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|STICKER_INVALID|The provided sticker is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/stickers_createStickerSet.md b/old_docs/API_docs_v70/methods/stickers_createStickerSet.md index cacdd73a7..02ec673bd 100644 --- a/old_docs/API_docs_v70/methods/stickers_createStickerSet.md +++ b/old_docs/API_docs_v70/methods/stickers_createStickerSet.md @@ -22,6 +22,17 @@ description: stickers.createStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|PACK_SHORT_NAME_INVALID|Short pack name invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|STICKERS_EMPTY|No sticker provided| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/stickers_removeStickerFromSet.md b/old_docs/API_docs_v70/methods/stickers_removeStickerFromSet.md index 941b24f40..51e52f958 100644 --- a/old_docs/API_docs_v70/methods/stickers_removeStickerFromSet.md +++ b/old_docs/API_docs_v70/methods/stickers_removeStickerFromSet.md @@ -18,6 +18,14 @@ description: stickers.removeStickerFromSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|STICKER_INVALID|The provided sticker is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/upload_getWebFile.md b/old_docs/API_docs_v70/methods/upload_getWebFile.md index fab17a7fc..ec7c05b4a 100644 --- a/old_docs/API_docs_v70/methods/upload_getWebFile.md +++ b/old_docs/API_docs_v70/methods/upload_getWebFile.md @@ -20,6 +20,13 @@ description: upload.getWebFile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LOCATION_INVALID|The provided location is invalid| + + ### Example: diff --git a/old_docs/API_docs_v70/methods/users_getUsers.md b/old_docs/API_docs_v70/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v70/methods/users_getUsers.md +++ b/old_docs/API_docs_v70/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_changePhone.md b/old_docs/API_docs_v71/methods/account_changePhone.md index fd6593650..5d1801d06 100644 --- a/old_docs/API_docs_v71/methods/account_changePhone.md +++ b/old_docs/API_docs_v71/methods/account_changePhone.md @@ -20,6 +20,13 @@ description: account.changePhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_checkUsername.md b/old_docs/API_docs_v71/methods/account_checkUsername.md index 3d8746b5b..afc59b6c3 100644 --- a/old_docs/API_docs_v71/methods/account_checkUsername.md +++ b/old_docs/API_docs_v71/methods/account_checkUsername.md @@ -18,6 +18,13 @@ description: account.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_confirmPhone.md b/old_docs/API_docs_v71/methods/account_confirmPhone.md index c2526b2ad..0d2dc5c64 100644 --- a/old_docs/API_docs_v71/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v71/methods/account_confirmPhone.md @@ -19,6 +19,14 @@ description: account.confirmPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_HASH_INVALID|Code hash invalid| +|PHONE_CODE_EMPTY|phone_code is missing| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_getNotifySettings.md b/old_docs/API_docs_v71/methods/account_getNotifySettings.md index a00cb68bb..8ee710d86 100644 --- a/old_docs/API_docs_v71/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v71/methods/account_getNotifySettings.md @@ -18,6 +18,13 @@ description: account.getNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_getPasswordSettings.md b/old_docs/API_docs_v71/methods/account_getPasswordSettings.md index 623cdd168..02cb77f7c 100644 --- a/old_docs/API_docs_v71/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v71/methods/account_getPasswordSettings.md @@ -18,6 +18,13 @@ description: account.getPasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_getPrivacy.md b/old_docs/API_docs_v71/methods/account_getPrivacy.md index 1197b79ff..52786b79e 100644 --- a/old_docs/API_docs_v71/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v71/methods/account_getPrivacy.md @@ -18,6 +18,13 @@ description: account.getPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_getTmpPassword.md b/old_docs/API_docs_v71/methods/account_getTmpPassword.md index c368baf7e..83ab09b16 100644 --- a/old_docs/API_docs_v71/methods/account_getTmpPassword.md +++ b/old_docs/API_docs_v71/methods/account_getTmpPassword.md @@ -19,6 +19,14 @@ description: account.getTmpPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| +|TMP_PASSWORD_DISABLED|The temporary password is disabled| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_registerDevice.md b/old_docs/API_docs_v71/methods/account_registerDevice.md index 6865551ee..3cc7f98d4 100644 --- a/old_docs/API_docs_v71/methods/account_registerDevice.md +++ b/old_docs/API_docs_v71/methods/account_registerDevice.md @@ -19,6 +19,13 @@ description: account.registerDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_reportPeer.md b/old_docs/API_docs_v71/methods/account_reportPeer.md index a23458df2..1545c3b87 100644 --- a/old_docs/API_docs_v71/methods/account_reportPeer.md +++ b/old_docs/API_docs_v71/methods/account_reportPeer.md @@ -19,6 +19,13 @@ description: account.reportPeer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_resetAuthorization.md b/old_docs/API_docs_v71/methods/account_resetAuthorization.md index 41940ac05..e44334f2a 100644 --- a/old_docs/API_docs_v71/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v71/methods/account_resetAuthorization.md @@ -18,6 +18,13 @@ description: account.resetAuthorization parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v71/methods/account_sendChangePhoneCode.md index a1f49156d..4be218f24 100644 --- a/old_docs/API_docs_v71/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v71/methods/account_sendChangePhoneCode.md @@ -20,6 +20,13 @@ description: account.sendChangePhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v71/methods/account_sendConfirmPhoneCode.md index 5ad44987b..009fcb09b 100644 --- a/old_docs/API_docs_v71/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v71/methods/account_sendConfirmPhoneCode.md @@ -20,6 +20,13 @@ description: account.sendConfirmPhoneCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|HASH_INVALID|The provided hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_setAccountTTL.md b/old_docs/API_docs_v71/methods/account_setAccountTTL.md index 035b5584a..f06eb6765 100644 --- a/old_docs/API_docs_v71/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v71/methods/account_setAccountTTL.md @@ -18,6 +18,13 @@ description: account.setAccountTTL parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TTL_DAYS_INVALID|The provided TTL is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_setPrivacy.md b/old_docs/API_docs_v71/methods/account_setPrivacy.md index 768f1c1a7..56aebbcc8 100644 --- a/old_docs/API_docs_v71/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v71/methods/account_setPrivacy.md @@ -19,6 +19,13 @@ description: account.setPrivacy parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PRIVACY_KEY_INVALID|The privacy key is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_unregisterDevice.md b/old_docs/API_docs_v71/methods/account_unregisterDevice.md index ebdcd2221..41899b6e5 100644 --- a/old_docs/API_docs_v71/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v71/methods/account_unregisterDevice.md @@ -19,6 +19,13 @@ description: account.unregisterDevice parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TOKEN_INVALID|The provided token is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_updateNotifySettings.md b/old_docs/API_docs_v71/methods/account_updateNotifySettings.md index 4e45415b3..8389b5c27 100644 --- a/old_docs/API_docs_v71/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v71/methods/account_updateNotifySettings.md @@ -19,6 +19,13 @@ description: account.updateNotifySettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v71/methods/account_updatePasswordSettings.md index 6a3b6e3f6..b7c8da4b2 100644 --- a/old_docs/API_docs_v71/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v71/methods/account_updatePasswordSettings.md @@ -19,6 +19,16 @@ description: account.updatePasswordSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EMAIL_UNCONFIRMED|Email unconfirmed| +|NEW_SALT_INVALID|The new salt is invalid| +|NEW_SETTINGS_INVALID|The new settings are invalid| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_updateProfile.md b/old_docs/API_docs_v71/methods/account_updateProfile.md index 531bbb028..a50eaea58 100644 --- a/old_docs/API_docs_v71/methods/account_updateProfile.md +++ b/old_docs/API_docs_v71/methods/account_updateProfile.md @@ -20,6 +20,14 @@ description: account.updateProfile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ABOUT_TOO_LONG|The provided bio is too long| +|FIRSTNAME_INVALID|The first name is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_updateStatus.md b/old_docs/API_docs_v71/methods/account_updateStatus.md index f25870370..7204e582c 100644 --- a/old_docs/API_docs_v71/methods/account_updateStatus.md +++ b/old_docs/API_docs_v71/methods/account_updateStatus.md @@ -18,6 +18,13 @@ description: account.updateStatus parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/account_updateUsername.md b/old_docs/API_docs_v71/methods/account_updateUsername.md index ec677a83b..22be2fd4f 100644 --- a/old_docs/API_docs_v71/methods/account_updateUsername.md +++ b/old_docs/API_docs_v71/methods/account_updateUsername.md @@ -18,6 +18,15 @@ description: account.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_NOT_MODIFIED|The username was not modified| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v71/methods/auth_bindTempAuthKey.md index 4c4fb2284..e3d72dd58 100644 --- a/old_docs/API_docs_v71/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v71/methods/auth_bindTempAuthKey.md @@ -21,6 +21,15 @@ description: auth.bindTempAuthKey parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid| +|INPUT_REQUEST_TOO_LONG|The request is too big| +|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/auth_cancelCode.md b/old_docs/API_docs_v71/methods/auth_cancelCode.md index cc93fff5b..dc390329f 100644 --- a/old_docs/API_docs_v71/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v71/methods/auth_cancelCode.md @@ -19,6 +19,13 @@ description: auth.cancelCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/auth_checkPassword.md b/old_docs/API_docs_v71/methods/auth_checkPassword.md index 9456c29ea..d55591865 100644 --- a/old_docs/API_docs_v71/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v71/methods/auth_checkPassword.md @@ -18,6 +18,13 @@ description: auth.checkPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_HASH_INVALID|The provided password hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/auth_checkPhone.md b/old_docs/API_docs_v71/methods/auth_checkPhone.md index 9acbe605d..3455904d8 100644 --- a/old_docs/API_docs_v71/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v71/methods/auth_checkPhone.md @@ -18,6 +18,15 @@ description: auth.checkPhone parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram| +|PHONE_NUMBER_INVALID|The phone number is invalid| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/auth_exportAuthorization.md b/old_docs/API_docs_v71/methods/auth_exportAuthorization.md index 63a9f0589..44c45b707 100644 --- a/old_docs/API_docs_v71/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v71/methods/auth_exportAuthorization.md @@ -18,6 +18,13 @@ description: auth.exportAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DC_ID_INVALID|The provided DC ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/auth_importAuthorization.md b/old_docs/API_docs_v71/methods/auth_importAuthorization.md index 83c50cb8a..e0fd534f0 100644 --- a/old_docs/API_docs_v71/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v71/methods/auth_importAuthorization.md @@ -19,6 +19,14 @@ description: auth.importAuthorization parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/auth_recoverPassword.md b/old_docs/API_docs_v71/methods/auth_recoverPassword.md index 113638eb7..c2ce3fed4 100644 --- a/old_docs/API_docs_v71/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v71/methods/auth_recoverPassword.md @@ -18,6 +18,13 @@ description: auth.recoverPassword parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CODE_EMPTY|The provided code is empty| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v71/methods/auth_requestPasswordRecovery.md index 043420f0e..101b1cf70 100644 --- a/old_docs/API_docs_v71/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v71/methods/auth_requestPasswordRecovery.md @@ -13,6 +13,13 @@ description: auth.requestPasswordRecovery parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PASSWORD_EMPTY|The provided password is empty| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/auth_resendCode.md b/old_docs/API_docs_v71/methods/auth_resendCode.md index 92f7aa308..14d08ddd1 100644 --- a/old_docs/API_docs_v71/methods/auth_resendCode.md +++ b/old_docs/API_docs_v71/methods/auth_resendCode.md @@ -19,6 +19,13 @@ description: auth.resendCode parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PHONE_NUMBER_INVALID|The phone number is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v71/methods/auth_resetAuthorizations.md index d0e4582d4..87a39a225 100644 --- a/old_docs/API_docs_v71/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v71/methods/auth_resetAuthorizations.md @@ -13,6 +13,13 @@ description: auth.resetAuthorizations parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/auth_sendInvites.md b/old_docs/API_docs_v71/methods/auth_sendInvites.md index 8141275d4..604fc65df 100644 --- a/old_docs/API_docs_v71/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v71/methods/auth_sendInvites.md @@ -19,6 +19,13 @@ description: auth.sendInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_EMPTY|The provided message is empty| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/bots_answerWebhookJSONQuery.md b/old_docs/API_docs_v71/methods/bots_answerWebhookJSONQuery.md index 59c134d45..ae1efce3b 100644 --- a/old_docs/API_docs_v71/methods/bots_answerWebhookJSONQuery.md +++ b/old_docs/API_docs_v71/methods/bots_answerWebhookJSONQuery.md @@ -19,6 +19,14 @@ description: bots.answerWebhookJSONQuery parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/bots_sendCustomRequest.md b/old_docs/API_docs_v71/methods/bots_sendCustomRequest.md index 57a49e6e3..927f18c5a 100644 --- a/old_docs/API_docs_v71/methods/bots_sendCustomRequest.md +++ b/old_docs/API_docs_v71/methods/bots_sendCustomRequest.md @@ -19,6 +19,13 @@ description: bots.sendCustomRequest parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_checkUsername.md b/old_docs/API_docs_v71/methods/channels_checkUsername.md index 988585457..d6ea876d9 100644 --- a/old_docs/API_docs_v71/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v71/methods/channels_checkUsername.md @@ -19,6 +19,15 @@ description: channels.checkUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ID_INVALID|The provided chat id is invalid| +|USERNAME_INVALID|The provided username is not valid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_createChannel.md b/old_docs/API_docs_v71/methods/channels_createChannel.md index b87fb840d..9ba02e9e6 100644 --- a/old_docs/API_docs_v71/methods/channels_createChannel.md +++ b/old_docs/API_docs_v71/methods/channels_createChannel.md @@ -21,6 +21,14 @@ description: channels.createChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_TITLE_EMPTY|No chat title provided| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_deleteChannel.md b/old_docs/API_docs_v71/methods/channels_deleteChannel.md index 09c2458d6..912ab0804 100644 --- a/old_docs/API_docs_v71/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v71/methods/channels_deleteChannel.md @@ -18,6 +18,14 @@ description: channels.deleteChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_deleteMessages.md b/old_docs/API_docs_v71/methods/channels_deleteMessages.md index ef6264f77..b3481294d 100644 --- a/old_docs/API_docs_v71/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v71/methods/channels_deleteMessages.md @@ -19,6 +19,15 @@ description: channels.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v71/methods/channels_deleteUserHistory.md index 7bf7bcdd9..668432699 100644 --- a/old_docs/API_docs_v71/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v71/methods/channels_deleteUserHistory.md @@ -19,6 +19,14 @@ description: channels.deleteUserHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_editAbout.md b/old_docs/API_docs_v71/methods/channels_editAbout.md index f5d7c9f0e..4c759a8a0 100644 --- a/old_docs/API_docs_v71/methods/channels_editAbout.md +++ b/old_docs/API_docs_v71/methods/channels_editAbout.md @@ -19,6 +19,16 @@ description: channels.editAbout parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ABOUT_NOT_MODIFIED|About text has not changed| +|CHAT_ABOUT_TOO_LONG|Chat about too long| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_editAdmin.md b/old_docs/API_docs_v71/methods/channels_editAdmin.md index 242496ab1..e68ba7eaf 100644 --- a/old_docs/API_docs_v71/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v71/methods/channels_editAdmin.md @@ -20,6 +20,22 @@ description: channels.editAdmin parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ADMINS_TOO_MUCH|Too many admins| +|BOT_CHANNELS_NA|Bots can't edit admin privileges| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this| +|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_editBanned.md b/old_docs/API_docs_v71/methods/channels_editBanned.md index 7d3fc1d08..7fb904b9a 100644 --- a/old_docs/API_docs_v71/methods/channels_editBanned.md +++ b/old_docs/API_docs_v71/methods/channels_editBanned.md @@ -20,6 +20,17 @@ description: channels.editBanned parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ADMIN_INVALID|You're not an admin| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_editPhoto.md b/old_docs/API_docs_v71/methods/channels_editPhoto.md index c5b823167..be2acd333 100644 --- a/old_docs/API_docs_v71/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v71/methods/channels_editPhoto.md @@ -19,6 +19,14 @@ description: channels.editPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PHOTO_INVALID|Photo invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_editTitle.md b/old_docs/API_docs_v71/methods/channels_editTitle.md index 8c023c9e7..04e8ce120 100644 --- a/old_docs/API_docs_v71/methods/channels_editTitle.md +++ b/old_docs/API_docs_v71/methods/channels_editTitle.md @@ -19,6 +19,15 @@ description: channels.editTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_exportInvite.md b/old_docs/API_docs_v71/methods/channels_exportInvite.md index 9bc223cda..2ed80f6c9 100644 --- a/old_docs/API_docs_v71/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v71/methods/channels_exportInvite.md @@ -18,6 +18,15 @@ description: channels.exportInvite parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INVITE_HASH_EXPIRED|The invite link has expired| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_exportMessageLink.md b/old_docs/API_docs_v71/methods/channels_exportMessageLink.md index 9e7135ab8..9831c9c03 100644 --- a/old_docs/API_docs_v71/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v71/methods/channels_exportMessageLink.md @@ -19,6 +19,13 @@ description: channels.exportMessageLink parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_getAdminLog.md b/old_docs/API_docs_v71/methods/channels_getAdminLog.md index 4775c872a..5283563d4 100644 --- a/old_docs/API_docs_v71/methods/channels_getAdminLog.md +++ b/old_docs/API_docs_v71/methods/channels_getAdminLog.md @@ -24,6 +24,15 @@ description: channels.getAdminLog parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_getChannels.md b/old_docs/API_docs_v71/methods/channels_getChannels.md index aec66fd50..133049382 100644 --- a/old_docs/API_docs_v71/methods/channels_getChannels.md +++ b/old_docs/API_docs_v71/methods/channels_getChannels.md @@ -18,6 +18,15 @@ description: channels.getChannels parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_getMessages.md b/old_docs/API_docs_v71/methods/channels_getMessages.md index 40ece8182..5480dd863 100644 --- a/old_docs/API_docs_v71/methods/channels_getMessages.md +++ b/old_docs/API_docs_v71/methods/channels_getMessages.md @@ -19,6 +19,15 @@ description: channels.getMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|MESSAGE_IDS_EMPTY|No message ids were provided| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_getParticipant.md b/old_docs/API_docs_v71/methods/channels_getParticipant.md index ea3b8635c..d2c787461 100644 --- a/old_docs/API_docs_v71/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v71/methods/channels_getParticipant.md @@ -19,6 +19,16 @@ description: channels.getParticipant parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_inviteToChannel.md b/old_docs/API_docs_v71/methods/channels_inviteToChannel.md index 8ac2c9e36..cf5480e03 100644 --- a/old_docs/API_docs_v71/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v71/methods/channels_inviteToChannel.md @@ -19,6 +19,28 @@ description: channels.inviteToChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_GROUPS_BLOCKED|This bot can't be added to groups| +|BOTS_TOO_MUCH|There are too many bots in this chat/channel| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_BLOCKED|User blocked| +|USER_BOT|Bots can only be admins in channels.| +|USER_ID_INVALID|The provided user ID is invalid| +|USER_KICKED|This user was kicked from this supergroup/channel| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_joinChannel.md b/old_docs/API_docs_v71/methods/channels_joinChannel.md index a3e0965b8..f31730a11 100644 --- a/old_docs/API_docs_v71/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v71/methods/channels_joinChannel.md @@ -18,6 +18,15 @@ description: channels.joinChannel parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_leaveChannel.md b/old_docs/API_docs_v71/methods/channels_leaveChannel.md index 4f76ab9aa..dcb11a212 100644 --- a/old_docs/API_docs_v71/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v71/methods/channels_leaveChannel.md @@ -18,6 +18,16 @@ description: channels.leaveChannel parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|USER_CREATOR|You can't leave this channel, because you're its creator| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_readHistory.md b/old_docs/API_docs_v71/methods/channels_readHistory.md index 838e748e1..be9791010 100644 --- a/old_docs/API_docs_v71/methods/channels_readHistory.md +++ b/old_docs/API_docs_v71/methods/channels_readHistory.md @@ -19,6 +19,14 @@ description: channels.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_readMessageContents.md b/old_docs/API_docs_v71/methods/channels_readMessageContents.md index ac9986161..902775934 100644 --- a/old_docs/API_docs_v71/methods/channels_readMessageContents.md +++ b/old_docs/API_docs_v71/methods/channels_readMessageContents.md @@ -19,6 +19,14 @@ description: channels.readMessageContents parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_reportSpam.md b/old_docs/API_docs_v71/methods/channels_reportSpam.md index e08d51710..22f34443f 100644 --- a/old_docs/API_docs_v71/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v71/methods/channels_reportSpam.md @@ -20,6 +20,14 @@ description: channels.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_setStickers.md b/old_docs/API_docs_v71/methods/channels_setStickers.md index ddc4d566e..6712ada06 100644 --- a/old_docs/API_docs_v71/methods/channels_setStickers.md +++ b/old_docs/API_docs_v71/methods/channels_setStickers.md @@ -19,6 +19,14 @@ description: channels.setStickers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PARTICIPANTS_TOO_FEW|Not enough participants| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_toggleInvites.md b/old_docs/API_docs_v71/methods/channels_toggleInvites.md index 0733d419f..c2715b323 100644 --- a/old_docs/API_docs_v71/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v71/methods/channels_toggleInvites.md @@ -19,6 +19,15 @@ description: channels.toggleInvites parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_toggleSignatures.md b/old_docs/API_docs_v71/methods/channels_toggleSignatures.md index 3056eaee8..a214b8493 100644 --- a/old_docs/API_docs_v71/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v71/methods/channels_toggleSignatures.md @@ -19,6 +19,13 @@ description: channels.toggleSignatures parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v71/methods/channels_updatePinnedMessage.md index d2314d851..7376df10a 100644 --- a/old_docs/API_docs_v71/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v71/methods/channels_updatePinnedMessage.md @@ -20,6 +20,15 @@ description: channels.updatePinnedMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/channels_updateUsername.md b/old_docs/API_docs_v71/methods/channels_updateUsername.md index f9691e5ec..4e0b9053a 100644 --- a/old_docs/API_docs_v71/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v71/methods/channels_updateUsername.md @@ -19,6 +19,16 @@ description: channels.updateUsername parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|USERNAME_INVALID|The provided username is not valid| +|USERNAME_OCCUPIED|The provided username is already occupied| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/contacts_block.md b/old_docs/API_docs_v71/methods/contacts_block.md index 6a9ec42e2..d9d58e379 100644 --- a/old_docs/API_docs_v71/methods/contacts_block.md +++ b/old_docs/API_docs_v71/methods/contacts_block.md @@ -18,6 +18,13 @@ description: contacts.block parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/contacts_deleteContact.md b/old_docs/API_docs_v71/methods/contacts_deleteContact.md index 04446ed8a..cd8c17ad2 100644 --- a/old_docs/API_docs_v71/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v71/methods/contacts_deleteContact.md @@ -18,6 +18,13 @@ description: contacts.deleteContact parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/contacts_deleteContacts.md b/old_docs/API_docs_v71/methods/contacts_deleteContacts.md index c45d7ac14..fc65880d1 100644 --- a/old_docs/API_docs_v71/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v71/methods/contacts_deleteContacts.md @@ -18,6 +18,14 @@ description: contacts.deleteContacts parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/contacts_getTopPeers.md b/old_docs/API_docs_v71/methods/contacts_getTopPeers.md index a1c85ce0e..cbd64cc04 100644 --- a/old_docs/API_docs_v71/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v71/methods/contacts_getTopPeers.md @@ -26,6 +26,13 @@ description: contacts.getTopPeers parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|TYPES_EMPTY|The types field is empty| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/contacts_importCard.md b/old_docs/API_docs_v71/methods/contacts_importCard.md index 1e9ea489d..a6abf56d0 100644 --- a/old_docs/API_docs_v71/methods/contacts_importCard.md +++ b/old_docs/API_docs_v71/methods/contacts_importCard.md @@ -18,6 +18,14 @@ description: contacts.importCard parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|EXPORT_CARD_INVALID|Provided card is invalid| +|NEED_MEMBER_INVALID|The provided member is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v71/methods/contacts_resetTopPeerRating.md index 2f7841892..738494b2e 100644 --- a/old_docs/API_docs_v71/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v71/methods/contacts_resetTopPeerRating.md @@ -19,6 +19,13 @@ description: contacts.resetTopPeerRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/contacts_search.md b/old_docs/API_docs_v71/methods/contacts_search.md index de0ad6fa2..0203b1604 100644 --- a/old_docs/API_docs_v71/methods/contacts_search.md +++ b/old_docs/API_docs_v71/methods/contacts_search.md @@ -19,6 +19,15 @@ description: contacts.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_TOO_SHORT|The query string is too short| +|SEARCH_QUERY_EMPTY|The search query is empty| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/contacts_unblock.md b/old_docs/API_docs_v71/methods/contacts_unblock.md index 578859417..a1977c249 100644 --- a/old_docs/API_docs_v71/methods/contacts_unblock.md +++ b/old_docs/API_docs_v71/methods/contacts_unblock.md @@ -18,6 +18,13 @@ description: contacts.unblock parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONTACT_ID_INVALID|The provided contact ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/help_getCdnConfig.md b/old_docs/API_docs_v71/methods/help_getCdnConfig.md index 82b9421e5..da446958d 100644 --- a/old_docs/API_docs_v71/methods/help_getCdnConfig.md +++ b/old_docs/API_docs_v71/methods/help_getCdnConfig.md @@ -13,6 +13,13 @@ description: help.getCdnConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/help_getConfig.md b/old_docs/API_docs_v71/methods/help_getConfig.md index b22f204a5..e3648b5aa 100644 --- a/old_docs/API_docs_v71/methods/help_getConfig.md +++ b/old_docs/API_docs_v71/methods/help_getConfig.md @@ -13,6 +13,13 @@ description: help.getConfig parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/initConnection.md b/old_docs/API_docs_v71/methods/initConnection.md index c34dd3d01..b66ab859e 100644 --- a/old_docs/API_docs_v71/methods/initConnection.md +++ b/old_docs/API_docs_v71/methods/initConnection.md @@ -25,6 +25,14 @@ description: initConnection parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CONNECTION_LAYER_INVALID|Layer invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/invokeWithLayer.md b/old_docs/API_docs_v71/methods/invokeWithLayer.md index 140736eee..b56a7b577 100644 --- a/old_docs/API_docs_v71/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v71/methods/invokeWithLayer.md @@ -19,6 +19,17 @@ description: invokeWithLayer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|AUTH_BYTES_INVALID|The provided authorization is invalid| +|CDN_METHOD_INVALID|You can't call this method in a CDN DC| +|CONNECTION_API_ID_INVALID|The provided API id is invalid| +|CONNECTION_LANG_PACK_INVALID|Language pack invalid| +|INPUT_LAYER_INVALID|The provided layer is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/langpack_getDifference.md b/old_docs/API_docs_v71/methods/langpack_getDifference.md index 422a3b558..2e77cc3b3 100644 --- a/old_docs/API_docs_v71/methods/langpack_getDifference.md +++ b/old_docs/API_docs_v71/methods/langpack_getDifference.md @@ -18,6 +18,13 @@ description: langpack.getDifference parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/langpack_getLangPack.md b/old_docs/API_docs_v71/methods/langpack_getLangPack.md index de1e01ed6..5d4d0b810 100644 --- a/old_docs/API_docs_v71/methods/langpack_getLangPack.md +++ b/old_docs/API_docs_v71/methods/langpack_getLangPack.md @@ -18,6 +18,13 @@ description: langpack.getLangPack parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/langpack_getLanguages.md b/old_docs/API_docs_v71/methods/langpack_getLanguages.md index 4fccd7075..abaa0de32 100644 --- a/old_docs/API_docs_v71/methods/langpack_getLanguages.md +++ b/old_docs/API_docs_v71/methods/langpack_getLanguages.md @@ -13,6 +13,13 @@ description: langpack.getLanguages parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/langpack_getStrings.md b/old_docs/API_docs_v71/methods/langpack_getStrings.md index fd1e05341..9bb740dcd 100644 --- a/old_docs/API_docs_v71/methods/langpack_getStrings.md +++ b/old_docs/API_docs_v71/methods/langpack_getStrings.md @@ -19,6 +19,13 @@ description: langpack.getStrings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LANG_PACK_INVALID|The provided language pack is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_addChatUser.md b/old_docs/API_docs_v71/methods/messages_addChatUser.md index 90bd397f3..00da5a615 100644 --- a/old_docs/API_docs_v71/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v71/methods/messages_addChatUser.md @@ -20,6 +20,21 @@ description: messages.addChatUser parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USER_ID_INVALID|The provided user ID is invalid| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact| +|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_checkChatInvite.md b/old_docs/API_docs_v71/methods/messages_checkChatInvite.md index f7c45e592..c5eb1c06f 100644 --- a/old_docs/API_docs_v71/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v71/methods/messages_checkChatInvite.md @@ -18,6 +18,15 @@ description: messages.checkChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_createChat.md b/old_docs/API_docs_v71/methods/messages_createChat.md index c355273de..c643a0226 100644 --- a/old_docs/API_docs_v71/methods/messages_createChat.md +++ b/old_docs/API_docs_v71/methods/messages_createChat.md @@ -19,6 +19,14 @@ description: messages.createChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USERS_TOO_FEW|Not enough users (to create a chat, for example)| +|USER_RESTRICTED|You're spamreported, you can't create channels or chats.| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_deleteChatUser.md b/old_docs/API_docs_v71/methods/messages_deleteChatUser.md index f4f1f9c0b..3d75d9cf2 100644 --- a/old_docs/API_docs_v71/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v71/methods/messages_deleteChatUser.md @@ -19,6 +19,15 @@ description: messages.deleteChatUser parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_deleteHistory.md b/old_docs/API_docs_v71/methods/messages_deleteHistory.md index fb9b77639..ce6ba6e70 100644 --- a/old_docs/API_docs_v71/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v71/methods/messages_deleteHistory.md @@ -20,6 +20,13 @@ description: messages.deleteHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_deleteMessages.md b/old_docs/API_docs_v71/methods/messages_deleteMessages.md index 2949f64a4..2b88a73fc 100644 --- a/old_docs/API_docs_v71/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v71/methods/messages_deleteMessages.md @@ -19,6 +19,13 @@ description: messages.deleteMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_editChatAdmin.md b/old_docs/API_docs_v71/methods/messages_editChatAdmin.md index 63a4a0135..e64d9da53 100644 --- a/old_docs/API_docs_v71/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v71/methods/messages_editChatAdmin.md @@ -20,6 +20,13 @@ description: messages.editChatAdmin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_editChatPhoto.md b/old_docs/API_docs_v71/methods/messages_editChatPhoto.md index c05accf6f..d225962d6 100644 --- a/old_docs/API_docs_v71/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v71/methods/messages_editChatPhoto.md @@ -19,6 +19,17 @@ description: messages.editChatPhoto parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_FETCH_FAIL|Failed deserializing TL payload| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_editChatTitle.md b/old_docs/API_docs_v71/methods/messages_editChatTitle.md index 4242c6082..5cb1c6d72 100644 --- a/old_docs/API_docs_v71/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v71/methods/messages_editChatTitle.md @@ -19,6 +19,14 @@ description: messages.editChatTitle parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|NEED_CHAT_INVALID|The provided chat is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v71/methods/messages_editInlineBotMessage.md index 083d4a61b..621c81a37 100644 --- a/old_docs/API_docs_v71/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v71/methods/messages_editInlineBotMessage.md @@ -23,6 +23,14 @@ description: messages.editInlineBotMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_editMessage.md b/old_docs/API_docs_v71/methods/messages_editMessage.md index a2766336e..b8cdda817 100644 --- a/old_docs/API_docs_v71/methods/messages_editMessage.md +++ b/old_docs/API_docs_v71/methods/messages_editMessage.md @@ -24,6 +24,22 @@ description: messages.editMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_NOT_MODIFIED|The message text has not changed| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_exportChatInvite.md b/old_docs/API_docs_v71/methods/messages_exportChatInvite.md index 88f946ff3..4a6e28ff9 100644 --- a/old_docs/API_docs_v71/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v71/methods/messages_exportChatInvite.md @@ -18,6 +18,13 @@ description: messages.exportChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_faveSticker.md b/old_docs/API_docs_v71/methods/messages_faveSticker.md index 161324a35..4ac9d019a 100644 --- a/old_docs/API_docs_v71/methods/messages_faveSticker.md +++ b/old_docs/API_docs_v71/methods/messages_faveSticker.md @@ -19,6 +19,13 @@ description: messages.faveSticker parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKER_ID_INVALID|The provided sticker ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_forwardMessage.md b/old_docs/API_docs_v71/methods/messages_forwardMessage.md index 1d4f18a16..4e2362db9 100644 --- a/old_docs/API_docs_v71/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v71/methods/messages_forwardMessage.md @@ -19,6 +19,16 @@ description: messages.forwardMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|YOU_BLOCKED_USER|You blocked this user| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_forwardMessages.md b/old_docs/API_docs_v71/methods/messages_forwardMessages.md index 8b91a2086..0f6492002 100644 --- a/old_docs/API_docs_v71/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v71/methods/messages_forwardMessages.md @@ -23,6 +23,33 @@ description: messages.forwardMessages parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_EMPTY|The provided media object is invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|MESSAGE_IDS_EMPTY|No message ids were provided| +|PEER_ID_INVALID|The provided peer id is invalid| +|RANDOM_ID_INVALID|A provided random ID is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|PTS_CHANGE_EMPTY|No PTS change| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat| +|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat| +|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v71/methods/messages_getBotCallbackAnswer.md index 9d9470d05..433144c3d 100644 --- a/old_docs/API_docs_v71/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v71/methods/messages_getBotCallbackAnswer.md @@ -21,6 +21,16 @@ description: messages.getBotCallbackAnswer parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getChats.md b/old_docs/API_docs_v71/methods/messages_getChats.md index 8b86c1953..6fa30cbdf 100644 --- a/old_docs/API_docs_v71/methods/messages_getChats.md +++ b/old_docs/API_docs_v71/methods/messages_getChats.md @@ -18,6 +18,14 @@ description: messages.getChats parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getCommonChats.md b/old_docs/API_docs_v71/methods/messages_getCommonChats.md index 985a52dff..0c601ca98 100644 --- a/old_docs/API_docs_v71/methods/messages_getCommonChats.md +++ b/old_docs/API_docs_v71/methods/messages_getCommonChats.md @@ -20,6 +20,13 @@ description: messages.getCommonChats parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getDhConfig.md b/old_docs/API_docs_v71/methods/messages_getDhConfig.md index 95c994c85..aac3354d2 100644 --- a/old_docs/API_docs_v71/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v71/methods/messages_getDhConfig.md @@ -19,6 +19,13 @@ description: messages.getDhConfig parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|RANDOM_LENGTH_INVALID|Random length invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getDialogs.md b/old_docs/API_docs_v71/methods/messages_getDialogs.md index e38aa9965..131b75b7a 100644 --- a/old_docs/API_docs_v71/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v71/methods/messages_getDialogs.md @@ -22,6 +22,16 @@ description: messages.getDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|OFFSET_PEER_ID_INVALID|The provided offset peer is invalid| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v71/methods/messages_getDocumentByHash.md index 7387d26de..dda54bddd 100644 --- a/old_docs/API_docs_v71/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v71/methods/messages_getDocumentByHash.md @@ -20,6 +20,13 @@ description: messages.getDocumentByHash parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SHA256_HASH_INVALID|The provided SHA256 hash is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getGameHighScores.md b/old_docs/API_docs_v71/methods/messages_getGameHighScores.md index d558df8a6..935bb95a7 100644 --- a/old_docs/API_docs_v71/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v71/methods/messages_getGameHighScores.md @@ -20,6 +20,14 @@ description: messages.getGameHighScores parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getHistory.md b/old_docs/API_docs_v71/methods/messages_getHistory.md index 273eb6a91..a48a465eb 100644 --- a/old_docs/API_docs_v71/methods/messages_getHistory.md +++ b/old_docs/API_docs_v71/methods/messages_getHistory.md @@ -24,6 +24,18 @@ description: messages.getHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v71/methods/messages_getInlineBotResults.md index f5da1c5a0..61366580b 100644 --- a/old_docs/API_docs_v71/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v71/methods/messages_getInlineBotResults.md @@ -22,6 +22,16 @@ description: messages.getInlineBotResults parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INLINE_DISABLED|This bot can't be used in inline mode| +|BOT_INVALID|This is not a valid bot| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v71/methods/messages_getInlineGameHighScores.md index 24b512ca2..7cc04d0de 100644 --- a/old_docs/API_docs_v71/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v71/methods/messages_getInlineGameHighScores.md @@ -19,6 +19,14 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getMessageEditData.md b/old_docs/API_docs_v71/methods/messages_getMessageEditData.md index ee07fd74e..a8b135c67 100644 --- a/old_docs/API_docs_v71/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v71/methods/messages_getMessageEditData.md @@ -19,6 +19,14 @@ description: messages.getMessageEditData parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|MESSAGE_AUTHOR_REQUIRED|Message author required| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getMessagesViews.md b/old_docs/API_docs_v71/methods/messages_getMessagesViews.md index fef96ce55..263f3f957 100644 --- a/old_docs/API_docs_v71/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v71/methods/messages_getMessagesViews.md @@ -20,6 +20,15 @@ description: messages.getMessagesViews parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v71/methods/messages_getPeerDialogs.md index e388e309c..3da60038f 100644 --- a/old_docs/API_docs_v71/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v71/methods/messages_getPeerDialogs.md @@ -18,6 +18,14 @@ description: messages.getPeerDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getPeerSettings.md b/old_docs/API_docs_v71/methods/messages_getPeerSettings.md index 26776c43b..d3e3cfc39 100644 --- a/old_docs/API_docs_v71/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v71/methods/messages_getPeerSettings.md @@ -18,6 +18,14 @@ description: messages.getPeerSettings parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getStickerSet.md b/old_docs/API_docs_v71/methods/messages_getStickerSet.md index 61f81c281..59f339166 100644 --- a/old_docs/API_docs_v71/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v71/methods/messages_getStickerSet.md @@ -18,6 +18,13 @@ description: messages.getStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getUnreadMentions.md b/old_docs/API_docs_v71/methods/messages_getUnreadMentions.md index fadbca813..54e8cabf4 100644 --- a/old_docs/API_docs_v71/methods/messages_getUnreadMentions.md +++ b/old_docs/API_docs_v71/methods/messages_getUnreadMentions.md @@ -23,6 +23,13 @@ description: messages.getUnreadMentions parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_getWebPage.md b/old_docs/API_docs_v71/methods/messages_getWebPage.md index 81591daf5..35f6e5456 100644 --- a/old_docs/API_docs_v71/methods/messages_getWebPage.md +++ b/old_docs/API_docs_v71/methods/messages_getWebPage.md @@ -19,6 +19,13 @@ description: messages.getWebPage parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|WC_CONVERT_URL_INVALID|WC convert URL invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_hideReportSpam.md b/old_docs/API_docs_v71/methods/messages_hideReportSpam.md index 20bc6f186..2dfe4dd7a 100644 --- a/old_docs/API_docs_v71/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v71/methods/messages_hideReportSpam.md @@ -18,6 +18,13 @@ description: messages.hideReportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_importChatInvite.md b/old_docs/API_docs_v71/methods/messages_importChatInvite.md index 537fd08da..9d77304d6 100644 --- a/old_docs/API_docs_v71/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v71/methods/messages_importChatInvite.md @@ -18,6 +18,19 @@ description: messages.importChatInvite parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups| +|INVITE_HASH_EMPTY|The invite hash is empty| +|INVITE_HASH_EXPIRED|The invite link has expired| +|INVITE_HASH_INVALID|The invite hash is invalid| +|USER_ALREADY_PARTICIPANT|The user is already in the group| +|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_installStickerSet.md b/old_docs/API_docs_v71/methods/messages_installStickerSet.md index 6073eb13b..3dde52a75 100644 --- a/old_docs/API_docs_v71/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v71/methods/messages_installStickerSet.md @@ -19,6 +19,13 @@ description: messages.installStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_migrateChat.md b/old_docs/API_docs_v71/methods/messages_migrateChat.md index c038ad922..22d2fbf00 100644 --- a/old_docs/API_docs_v71/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v71/methods/messages_migrateChat.md @@ -18,6 +18,15 @@ description: messages.migrateChat parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v71/methods/messages_readEncryptedHistory.md index d1200ec58..766ee07db 100644 --- a/old_docs/API_docs_v71/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v71/methods/messages_readEncryptedHistory.md @@ -19,6 +19,13 @@ description: messages.readEncryptedHistory parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_readHistory.md b/old_docs/API_docs_v71/methods/messages_readHistory.md index 3fb26f56e..3c1da8369 100644 --- a/old_docs/API_docs_v71/methods/messages_readHistory.md +++ b/old_docs/API_docs_v71/methods/messages_readHistory.md @@ -19,6 +19,13 @@ description: messages.readHistory parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_receivedQueue.md b/old_docs/API_docs_v71/methods/messages_receivedQueue.md index 65b3eb36c..3c7f1d4f7 100644 --- a/old_docs/API_docs_v71/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v71/methods/messages_receivedQueue.md @@ -18,6 +18,13 @@ description: messages.receivedQueue parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_reorderPinnedDialogs.md b/old_docs/API_docs_v71/methods/messages_reorderPinnedDialogs.md index 2660b3633..30102fd7a 100644 --- a/old_docs/API_docs_v71/methods/messages_reorderPinnedDialogs.md +++ b/old_docs/API_docs_v71/methods/messages_reorderPinnedDialogs.md @@ -19,6 +19,13 @@ description: messages.reorderPinnedDialogs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_reportEncryptedSpam.md b/old_docs/API_docs_v71/methods/messages_reportEncryptedSpam.md index 5764b8486..30ef34732 100644 --- a/old_docs/API_docs_v71/methods/messages_reportEncryptedSpam.md +++ b/old_docs/API_docs_v71/methods/messages_reportEncryptedSpam.md @@ -18,6 +18,13 @@ description: messages.reportEncryptedSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_reportSpam.md b/old_docs/API_docs_v71/methods/messages_reportSpam.md index a9f1da731..bfadb9ab2 100644 --- a/old_docs/API_docs_v71/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v71/methods/messages_reportSpam.md @@ -18,6 +18,13 @@ description: messages.reportSpam parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_saveDraft.md b/old_docs/API_docs_v71/methods/messages_saveDraft.md index ef5e65c57..42308b46f 100644 --- a/old_docs/API_docs_v71/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v71/methods/messages_saveDraft.md @@ -23,6 +23,13 @@ description: messages.saveDraft parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_saveGif.md b/old_docs/API_docs_v71/methods/messages_saveGif.md index 2d41d5338..31e486320 100644 --- a/old_docs/API_docs_v71/methods/messages_saveGif.md +++ b/old_docs/API_docs_v71/methods/messages_saveGif.md @@ -19,6 +19,13 @@ description: messages.saveGif parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|GIF_ID_INVALID|The provided GIF ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v71/methods/messages_saveRecentSticker.md index cb4f98b35..8d45be5ef 100644 --- a/old_docs/API_docs_v71/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v71/methods/messages_saveRecentSticker.md @@ -20,6 +20,13 @@ description: messages.saveRecentSticker parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKER_ID_INVALID|The provided sticker ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_search.md b/old_docs/API_docs_v71/methods/messages_search.md index 0d9521934..ca82742c0 100644 --- a/old_docs/API_docs_v71/methods/messages_search.md +++ b/old_docs/API_docs_v71/methods/messages_search.md @@ -28,6 +28,18 @@ description: messages.search parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|PEER_ID_INVALID|The provided peer id is invalid| +|PEER_ID_NOT_SUPPORTED|The provided peer ID is not supported| +|SEARCH_QUERY_EMPTY|The search query is empty| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_searchGifs.md b/old_docs/API_docs_v71/methods/messages_searchGifs.md index 76a539037..3f4c48384 100644 --- a/old_docs/API_docs_v71/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v71/methods/messages_searchGifs.md @@ -19,6 +19,13 @@ description: messages.searchGifs parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_searchGlobal.md b/old_docs/API_docs_v71/methods/messages_searchGlobal.md index f28e962d6..0553dd7a9 100644 --- a/old_docs/API_docs_v71/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v71/methods/messages_searchGlobal.md @@ -22,6 +22,13 @@ description: messages.searchGlobal parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SEARCH_QUERY_EMPTY|The search query is empty| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_sendEncrypted.md b/old_docs/API_docs_v71/methods/messages_sendEncrypted.md index 0b9a282cc..ce1f2bf03 100644 --- a/old_docs/API_docs_v71/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v71/methods/messages_sendEncrypted.md @@ -19,6 +19,15 @@ description: messages.sendEncrypted parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v71/methods/messages_sendEncryptedFile.md index fbc9cabf0..8f7a73d9e 100644 --- a/old_docs/API_docs_v71/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v71/methods/messages_sendEncryptedFile.md @@ -20,6 +20,13 @@ description: messages.sendEncryptedFile parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v71/methods/messages_sendEncryptedService.md index c84747e8b..f589a382c 100644 --- a/old_docs/API_docs_v71/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v71/methods/messages_sendEncryptedService.md @@ -19,6 +19,14 @@ description: messages.sendEncryptedService parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|DATA_INVALID|Encrypted data invalid| +|MSG_WAIT_FAILED|A waiting call returned an error| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v71/methods/messages_sendInlineBotResult.md index 6ab41f500..6aeeb67d5 100644 --- a/old_docs/API_docs_v71/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v71/methods/messages_sendInlineBotResult.md @@ -24,6 +24,16 @@ description: messages.sendInlineBotResult parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|INLINE_RESULT_EXPIRED|The inline query expired| +|PEER_ID_INVALID|The provided peer id is invalid| +|QUERY_ID_EMPTY|The query ID is empty| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_sendMedia.md b/old_docs/API_docs_v71/methods/messages_sendMedia.md index 68e2c41be..8c22e1c9f 100644 --- a/old_docs/API_docs_v71/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v71/methods/messages_sendMedia.md @@ -24,6 +24,30 @@ description: messages.sendMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|EXTERNAL_URL_INVALID|External URL invalid| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PART_6_MISSING|File part 6 missing| +|FILE_PART_LENGTH_INVALID|The length of a file part is invalid| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MEDIA_CAPTION_TOO_LONG|The caption is too long| +|MEDIA_EMPTY|The provided media object is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|WEBPAGE_CURL_FAILED|Failure while fetching the webpage with cURL| +|WEBPAGE_MEDIA_EMPTY|Webpage media empty| +|STORAGE_CHECK_FAILED|Server storage check failed| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_sendMessage.md b/old_docs/API_docs_v71/methods/messages_sendMessage.md index cabccdb33..60b50412f 100644 --- a/old_docs/API_docs_v71/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v71/methods/messages_sendMessage.md @@ -27,6 +27,32 @@ description: messages.sendMessage parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this| +|CHAT_ID_INVALID|The provided chat id is invalid| +|ENTITY_MENTION_USER_INVALID|You can't use this entity| +|INPUT_USER_DEACTIVATED|The specified user was deleted| +|MESSAGE_EMPTY|The provided message is empty| +|MESSAGE_TOO_LONG|The provided message is too long| +|PEER_ID_INVALID|The provided peer id is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|USER_IS_BOT|Bots can't send messages to other bots| +|YOU_BLOCKED_USER|You blocked this user| +|RANDOM_ID_DUPLICATE|You provided a random ID that was already used| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_sendScreenshotNotification.md b/old_docs/API_docs_v71/methods/messages_sendScreenshotNotification.md index 7c8957389..a725a12bb 100644 --- a/old_docs/API_docs_v71/methods/messages_sendScreenshotNotification.md +++ b/old_docs/API_docs_v71/methods/messages_sendScreenshotNotification.md @@ -19,6 +19,13 @@ description: messages.sendScreenshotNotification parameters, return type and exa ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v71/methods/messages_setBotCallbackAnswer.md index ef9b8f7a8..2c51854ff 100644 --- a/old_docs/API_docs_v71/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v71/methods/messages_setBotCallbackAnswer.md @@ -22,6 +22,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_setBotPrecheckoutResults.md b/old_docs/API_docs_v71/methods/messages_setBotPrecheckoutResults.md index 92bdcb9e4..25ed5ed5e 100644 --- a/old_docs/API_docs_v71/methods/messages_setBotPrecheckoutResults.md +++ b/old_docs/API_docs_v71/methods/messages_setBotPrecheckoutResults.md @@ -20,6 +20,13 @@ description: messages.setBotPrecheckoutResults parameters, return type and examp ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ERROR_TEXT_EMPTY|The provided error message is empty| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_setBotShippingResults.md b/old_docs/API_docs_v71/methods/messages_setBotShippingResults.md index e2c7cd45b..49ac28967 100644 --- a/old_docs/API_docs_v71/methods/messages_setBotShippingResults.md +++ b/old_docs/API_docs_v71/methods/messages_setBotShippingResults.md @@ -20,6 +20,13 @@ description: messages.setBotShippingResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|QUERY_ID_INVALID|The query ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v71/methods/messages_setEncryptedTyping.md index 11e429199..a05b94dd4 100644 --- a/old_docs/API_docs_v71/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v71/methods/messages_setEncryptedTyping.md @@ -19,6 +19,13 @@ description: messages.setEncryptedTyping parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_setGameScore.md b/old_docs/API_docs_v71/methods/messages_setGameScore.md index f16a7539c..3137f7c91 100644 --- a/old_docs/API_docs_v71/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v71/methods/messages_setGameScore.md @@ -23,6 +23,14 @@ description: messages.setGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v71/methods/messages_setInlineBotResults.md index cf74e5e4b..8b5625f34 100644 --- a/old_docs/API_docs_v71/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v71/methods/messages_setInlineBotResults.md @@ -24,6 +24,23 @@ description: messages.setInlineBotResults parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|ARTICLE_TITLE_EMPTY|The title of the article is empty| +|BUTTON_DATA_INVALID|The provided button data is invalid| +|BUTTON_TYPE_INVALID|The type of one of the buttons you provided is invalid| +|BUTTON_URL_INVALID|Button URL invalid| +|MESSAGE_EMPTY|The provided message is empty| +|QUERY_ID_INVALID|The query ID is invalid| +|REPLY_MARKUP_INVALID|The provided reply markup is invalid| +|RESULT_TYPE_INVALID|Result type invalid| +|SEND_MESSAGE_TYPE_INVALID|The message type is invalid| +|START_PARAM_INVALID|Start parameter invalid| +|USER_BOT_INVALID|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v71/methods/messages_setInlineGameScore.md index c922f937b..36752f351 100644 --- a/old_docs/API_docs_v71/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v71/methods/messages_setInlineGameScore.md @@ -22,6 +22,14 @@ description: messages.setInlineGameScore parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| +|USER_BOT_REQUIRED|This method can only be called by a bot| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_setTyping.md b/old_docs/API_docs_v71/methods/messages_setTyping.md index 90834622f..9ef8caf55 100644 --- a/old_docs/API_docs_v71/methods/messages_setTyping.md +++ b/old_docs/API_docs_v71/methods/messages_setTyping.md @@ -19,6 +19,19 @@ description: messages.setTyping parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHANNEL_INVALID|The provided channel is invalid| +|CHANNEL_PRIVATE|You haven't joined this channel/supergroup| +|CHAT_ID_INVALID|The provided chat id is invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels| +|USER_IS_BLOCKED|User is blocked| +|CHAT_WRITE_FORBIDDEN|You can't write in this chat| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_startBot.md b/old_docs/API_docs_v71/methods/messages_startBot.md index 484327e8b..8d98e3902 100644 --- a/old_docs/API_docs_v71/methods/messages_startBot.md +++ b/old_docs/API_docs_v71/methods/messages_startBot.md @@ -20,6 +20,16 @@ description: messages.startBot parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_INVALID|This is not a valid bot| +|PEER_ID_INVALID|The provided peer id is invalid| +|START_PARAM_EMPTY|The start parameter is empty| +|START_PARAM_INVALID|Start parameter invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v71/methods/messages_toggleChatAdmins.md index c43b11b14..3bf8a419c 100644 --- a/old_docs/API_docs_v71/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v71/methods/messages_toggleChatAdmins.md @@ -19,6 +19,14 @@ description: messages.toggleChatAdmins parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CHAT_ID_INVALID|The provided chat id is invalid| +|CHAT_NOT_MODIFIED|The pinned message wasn't modified| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_toggleDialogPin.md b/old_docs/API_docs_v71/methods/messages_toggleDialogPin.md index f4506918c..f35f2f401 100644 --- a/old_docs/API_docs_v71/methods/messages_toggleDialogPin.md +++ b/old_docs/API_docs_v71/methods/messages_toggleDialogPin.md @@ -19,6 +19,13 @@ description: messages.toggleDialogPin parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v71/methods/messages_uninstallStickerSet.md index c456fc892..6763e64f6 100644 --- a/old_docs/API_docs_v71/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v71/methods/messages_uninstallStickerSet.md @@ -18,6 +18,13 @@ description: messages.uninstallStickerSet parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/messages_uploadMedia.md b/old_docs/API_docs_v71/methods/messages_uploadMedia.md index 64fd8372b..03f07c26e 100644 --- a/old_docs/API_docs_v71/methods/messages_uploadMedia.md +++ b/old_docs/API_docs_v71/methods/messages_uploadMedia.md @@ -19,6 +19,15 @@ description: messages.uploadMedia parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|MEDIA_INVALID|Media invalid| +|PEER_ID_INVALID|The provided peer id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/payments_getPaymentForm.md b/old_docs/API_docs_v71/methods/payments_getPaymentForm.md index fa82f22d6..15f6e26b9 100644 --- a/old_docs/API_docs_v71/methods/payments_getPaymentForm.md +++ b/old_docs/API_docs_v71/methods/payments_getPaymentForm.md @@ -18,6 +18,13 @@ description: payments.getPaymentForm parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/payments_getPaymentReceipt.md b/old_docs/API_docs_v71/methods/payments_getPaymentReceipt.md index d6b5f5d62..51433563a 100644 --- a/old_docs/API_docs_v71/methods/payments_getPaymentReceipt.md +++ b/old_docs/API_docs_v71/methods/payments_getPaymentReceipt.md @@ -18,6 +18,13 @@ description: payments.getPaymentReceipt parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/payments_sendPaymentForm.md b/old_docs/API_docs_v71/methods/payments_sendPaymentForm.md index 831516a32..a63a39805 100644 --- a/old_docs/API_docs_v71/methods/payments_sendPaymentForm.md +++ b/old_docs/API_docs_v71/methods/payments_sendPaymentForm.md @@ -21,6 +21,13 @@ description: payments.sendPaymentForm parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/payments_validateRequestedInfo.md b/old_docs/API_docs_v71/methods/payments_validateRequestedInfo.md index 4102a4739..d839a2dfd 100644 --- a/old_docs/API_docs_v71/methods/payments_validateRequestedInfo.md +++ b/old_docs/API_docs_v71/methods/payments_validateRequestedInfo.md @@ -20,6 +20,13 @@ description: payments.validateRequestedInfo parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MESSAGE_ID_INVALID|The provided message id is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/phone_receivedCall.md b/old_docs/API_docs_v71/methods/phone_receivedCall.md index b06a90adc..9d59b1eae 100644 --- a/old_docs/API_docs_v71/methods/phone_receivedCall.md +++ b/old_docs/API_docs_v71/methods/phone_receivedCall.md @@ -18,6 +18,14 @@ description: phone.receivedCall parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_ALREADY_DECLINED|The call was already declined| +|CALL_PEER_INVALID|The provided call peer object is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/phone_saveCallDebug.md b/old_docs/API_docs_v71/methods/phone_saveCallDebug.md index 589dc522e..4dee5c971 100644 --- a/old_docs/API_docs_v71/methods/phone_saveCallDebug.md +++ b/old_docs/API_docs_v71/methods/phone_saveCallDebug.md @@ -19,6 +19,14 @@ description: phone.saveCallDebug parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_PEER_INVALID|The provided call peer object is invalid| +|DATA_JSON_INVALID|The provided JSON data is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/phone_setCallRating.md b/old_docs/API_docs_v71/methods/phone_setCallRating.md index a2b2e27cd..fea236d10 100644 --- a/old_docs/API_docs_v71/methods/phone_setCallRating.md +++ b/old_docs/API_docs_v71/methods/phone_setCallRating.md @@ -20,6 +20,13 @@ description: phone.setCallRating parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|CALL_PEER_INVALID|The provided call peer object is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/photos_getUserPhotos.md b/old_docs/API_docs_v71/methods/photos_getUserPhotos.md index 61498d299..d6c2a380e 100644 --- a/old_docs/API_docs_v71/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v71/methods/photos_getUserPhotos.md @@ -21,6 +21,14 @@ description: photos.getUserPhotos parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|MAX_ID_INVALID|The provided max ID is invalid| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v71/methods/photos_uploadProfilePhoto.md index 6de32dae0..58541f235 100644 --- a/old_docs/API_docs_v71/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v71/methods/photos_uploadProfilePhoto.md @@ -18,6 +18,17 @@ description: photos.uploadProfilePhoto parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|FILE_PART_0_MISSING|File part 0 missing| +|FILE_PARTS_INVALID|The number of file parts is invalid| +|IMAGE_PROCESS_FAILED|Failure while processing image| +|PHOTO_CROP_SIZE_SMALL|Photo is too small| +|PHOTO_EXT_INVALID|The extension of the photo is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/stickers_addStickerToSet.md b/old_docs/API_docs_v71/methods/stickers_addStickerToSet.md index 620e773ae..bf62fa090 100644 --- a/old_docs/API_docs_v71/methods/stickers_addStickerToSet.md +++ b/old_docs/API_docs_v71/methods/stickers_addStickerToSet.md @@ -19,6 +19,14 @@ description: stickers.addStickerToSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|STICKERSET_INVALID|The provided sticker set is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/stickers_changeStickerPosition.md b/old_docs/API_docs_v71/methods/stickers_changeStickerPosition.md index 6b517d4c2..942d3a33e 100644 --- a/old_docs/API_docs_v71/methods/stickers_changeStickerPosition.md +++ b/old_docs/API_docs_v71/methods/stickers_changeStickerPosition.md @@ -19,6 +19,14 @@ description: stickers.changeStickerPosition parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|STICKER_INVALID|The provided sticker is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/stickers_createStickerSet.md b/old_docs/API_docs_v71/methods/stickers_createStickerSet.md index cacdd73a7..02ec673bd 100644 --- a/old_docs/API_docs_v71/methods/stickers_createStickerSet.md +++ b/old_docs/API_docs_v71/methods/stickers_createStickerSet.md @@ -22,6 +22,17 @@ description: stickers.createStickerSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|PACK_SHORT_NAME_INVALID|Short pack name invalid| +|PEER_ID_INVALID|The provided peer id is invalid| +|STICKERS_EMPTY|No sticker provided| +|USER_ID_INVALID|The provided user ID is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/stickers_removeStickerFromSet.md b/old_docs/API_docs_v71/methods/stickers_removeStickerFromSet.md index 941b24f40..51e52f958 100644 --- a/old_docs/API_docs_v71/methods/stickers_removeStickerFromSet.md +++ b/old_docs/API_docs_v71/methods/stickers_removeStickerFromSet.md @@ -18,6 +18,14 @@ description: stickers.removeStickerFromSet parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|BOT_MISSING|This method can only be run by a bot| +|STICKER_INVALID|The provided sticker is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/upload_getWebFile.md b/old_docs/API_docs_v71/methods/upload_getWebFile.md index fab17a7fc..ec7c05b4a 100644 --- a/old_docs/API_docs_v71/methods/upload_getWebFile.md +++ b/old_docs/API_docs_v71/methods/upload_getWebFile.md @@ -20,6 +20,13 @@ description: upload.getWebFile parameters, return type and example ### Can bots use this method: **NO** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|LOCATION_INVALID|The provided location is invalid| + + ### Example: diff --git a/old_docs/API_docs_v71/methods/users_getUsers.md b/old_docs/API_docs_v71/methods/users_getUsers.md index 93b47996a..6a44d2586 100644 --- a/old_docs/API_docs_v71/methods/users_getUsers.md +++ b/old_docs/API_docs_v71/methods/users_getUsers.md @@ -18,6 +18,16 @@ description: users.getUsers parameters, return type and example ### Can bots use this method: **YES** +### Errors this method can return: + +| Error | Description | +|----------|---------------| +|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login| +|MEMBER_NO_LOCATION|An internal failure occurred while fetching user info (couldn't find location)| +|NEED_MEMBER_INVALID|The provided member is invalid| +|Timeout|A timeout occurred while fetching data from the bot| + + ### Example: diff --git a/src/danog/MadelineProto/API.php b/src/danog/MadelineProto/API.php index 0b30c5944..0dd5709f0 100644 --- a/src/danog/MadelineProto/API.php +++ b/src/danog/MadelineProto/API.php @@ -23,6 +23,7 @@ class API extends APIFactory set_error_handler(['\danog\MadelineProto\Exception', 'ExceptionErrorHandler']); if (is_string($params)) { if (file_exists($params)) { + $this->session = $params; if (!file_exists($lock = $params.'.lock')) { touch($lock); clearstatcache(); @@ -142,8 +143,11 @@ class API extends APIFactory } } - public function serialize($params) + public function serialize($params = '') { + if ($params === '') { + $params = $this->session; + } Logger::log([\danog\MadelineProto\Lang::$current_lang['serializing_madelineproto']]); return Serialization::serialize($params, $this); diff --git a/src/danog/MadelineProto/DocsBuilder/Methods.php b/src/danog/MadelineProto/DocsBuilder/Methods.php index ced336392..69c72a9d6 100644 --- a/src/danog/MadelineProto/DocsBuilder/Methods.php +++ b/src/danog/MadelineProto/DocsBuilder/Methods.php @@ -18,6 +18,7 @@ trait Methods { $bots = json_decode(file_get_contents('https://rpc.pwrtelegram.xyz/?bot'), true)['result']; $errors = json_decode(file_get_contents('https://rpc.pwrtelegram.xyz/?all'), true); + $errors['result'] = array_merge_recursive(...$errors['result']); foreach (glob('methods/'.$this->any) as $unlink) { unlink($unlink); }