Bad Request

exception pyrogram.api.errors.exceptions.bad_request_400.BadRequest(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.error.Error

Bad Request

CODE = 400

int – Error Code

exception pyrogram.api.errors.exceptions.bad_request_400.FirstnameInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The first name is invalid

ID = 'FIRSTNAME_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.LastnameInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The last name is invalid

ID = 'LASTNAME_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.PhoneNumberInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The phone number is invalid

ID = 'PHONE_NUMBER_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.PhoneCodeHashEmpty(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

phone_code_hash is missing

ID = 'PHONE_CODE_HASH_EMPTY'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.PhoneCodeEmpty(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

phone_code is missing

ID = 'PHONE_CODE_EMPTY'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.PhoneCodeExpired(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The confirmation code has expired

ID = 'PHONE_CODE_EXPIRED'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.PhoneCodeInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The confirmation code is invalid

ID = 'PHONE_CODE_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.ApiIdInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The api_id/api_hash combination is invalid

ID = 'API_ID_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.PhoneNumberOccupied(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The phone number is already in use

ID = 'PHONE_NUMBER_OCCUPIED'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.PhoneNumberUnoccupied(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The phone number is not yet being used

ID = 'PHONE_NUMBER_UNOCCUPIED'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.UsersTooFew(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

Not enough users (to create a chat, for example)

ID = 'USERS_TOO_FEW'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.UsersTooMuch(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The maximum number of users has been exceeded (to create a chat, for example)

ID = 'USERS_TOO_MUCH'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.TypeConstructorInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The type constructor is invalid

ID = 'TYPE_CONSTRUCTOR_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.FilePartInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The file part number is invalid

ID = 'FILE_PART_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.FilePartsInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The number of file parts is invalid

ID = 'FILE_PARTS_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.FilePartMissing(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

Part {x} of the file is missing from storage

ID = 'FILE_PART_X_MISSING'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.Md5ChecksumInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The MD5 checksums do not match

ID = 'MD5_CHECKSUM_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.PhotoInvalidDimensions(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The photo dimensions are invalid

ID = 'PHOTO_INVALID_DIMENSIONS'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.FieldNameInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The field with the name FIELD_NAME is invalid

ID = 'FIELD_NAME_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.FieldNameEmpty(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The field with the name FIELD_NAME is missing

ID = 'FIELD_NAME_EMPTY'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.MsgWaitFailed(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

A waiting call returned an error

ID = 'MSG_WAIT_FAILED'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.PeerIdInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The id/access_hash combination is invalid

ID = 'PEER_ID_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.MessageEmpty(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The message sent is empty

ID = 'MESSAGE_EMPTY'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.EncryptedMessageInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The special binding message (bind_auth_key_inner) contains invalid data

ID = 'ENCRYPTED_MESSAGE_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.InputMethodInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The method called is invalid

ID = 'INPUT_METHOD_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.PasswordHashInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

Two-step verification password is invalid

ID = 'PASSWORD_HASH_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.UsernameNotOccupied(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The username is not occupied by anyone

ID = 'USERNAME_NOT_OCCUPIED'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.UsernameInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The username is invalid

ID = 'USERNAME_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.MessageIdInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The message id is invalid

ID = 'MESSAGE_ID_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.MessageNotModified(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The message was not modified

ID = 'MESSAGE_NOT_MODIFIED'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.EntityMentionUserInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The mentioned entity is not an user

ID = 'ENTITY_MENTION_USER_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.MessageTooLong(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The message text is over 4096 characters

ID = 'MESSAGE_TOO_LONG'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.AccessTokenExpired(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The bot token is invalid

ID = 'ACCESS_TOKEN_EXPIRED'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.BotMethodInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The method can’t be used by bots

ID = 'BOT_METHOD_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.QueryTooShort(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The query is too short

ID = 'QUERY_TOO_SHORT'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.SearchQueryEmpty(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The query is empty

ID = 'SEARCH_QUERY_EMPTY'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.ChatIdInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The chat id is invalid

ID = 'CHAT_ID_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.DateEmpty(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The date argument is empty

ID = 'DATE_EMPTY'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.PersistentTimestampEmpty(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The pts is empty

ID = 'PERSISTENT_TIMESTAMP_EMPTY'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.CdnMethodInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The method can’t be used on CDN DCs

ID = 'CDN_METHOD_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.VolumeLocNotFound(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The volume location can’t be found

ID = 'VOLUME_LOC_NOT_FOUND'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.FileIdInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The file id is invalid

ID = 'FILE_ID_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.LocationInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The file location is invalid

ID = 'LOCATION_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.ChatAdminRequired(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The method requires chat admin privileges

ID = 'CHAT_ADMIN_REQUIRED'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.PhoneNumberBanned(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The phone number is banned

ID = 'PHONE_NUMBER_BANNED'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.AboutTooLong(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The about text is too long

ID = 'ABOUT_TOO_LONG'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.MultiMediaTooLong(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The album contains more than 10 items

ID = 'MULTI_MEDIA_TOO_LONG'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.UsernameOccupied(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The username is already in use

ID = 'USERNAME_OCCUPIED'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.BotInlineDisabled(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The inline feature of the bot is disabled

ID = 'BOT_INLINE_DISABLED'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.InlineResultExpired(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The inline bot query expired

ID = 'INLINE_RESULT_EXPIRED'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.InviteHashInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The invite link hash is invalid

ID = 'INVITE_HASH_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.UserAlreadyParticipant(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The user is already a participant of this chat

ID = 'USER_ALREADY_PARTICIPANT'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.TtlMediaInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

This kind of media does not support self-destruction

ID = 'TTL_MEDIA_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.MaxIdInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The max_id parameter is invalid

ID = 'MAX_ID_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.ChannelInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The channel parameter is invalid

ID = 'CHANNEL_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.DcIdInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The dc_id parameter is invalid

ID = 'DC_ID_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.LimitInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The limit parameter is invalid

ID = 'LIMIT_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.OffsetInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The offset parameter is invalid

ID = 'OFFSET_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.EmailInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The email provided is invalid

ID = 'EMAIL_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.UserIsBot(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

A bot cannot send messages to other bots or to itself

ID = 'USER_IS_BOT'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.WebpageCurlFailed(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

Telegram could not fetch the provided URL

ID = 'WEBPAGE_CURL_FAILED'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.StickersetInvalid(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The requested sticker set is invalid

ID = 'STICKERSET_INVALID'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.PeerFlood(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The method can’t be used because your account is limited

ID = 'PEER_FLOOD'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.MediaCaptionTooLong(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The media caption is longer than 200 characters

ID = 'MEDIA_CAPTION_TOO_LONG'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.UserNotMutualContact(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The user is not a mutual contact

ID = 'USER_NOT_MUTUAL_CONTACT'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.UserChannelsTooMuch(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The user is already in too many channels or supergroups

ID = 'USER_CHANNELS_TOO_MUCH'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.ApiIdPublishedFlood(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

You are using an API key that is limited on the server side

ID = 'API_ID_PUBLISHED_FLOOD'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.UserNotParticipant(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The user is not a member of this chat

ID = 'USER_NOT_PARTICIPANT'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.ChannelPrivate(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The channel/supergroup is not accessible

ID = 'CHANNEL_PRIVATE'

str – Error ID

exception pyrogram.api.errors.exceptions.bad_request_400.MessageIdsEmpty(x: int = None, query_type: type = None)

Bases: pyrogram.api.errors.exceptions.bad_request_400.BadRequest

The requested message doesn’t exist

ID = 'MESSAGE_IDS_EMPTY'

str – Error ID