An object of this type can be returned on every function call, in case of an error

Error code; subject to future changes. If the error code is 406, the error message must not be processed in any way and must not be displayed to the user

An object of this type is returned on a successful function call for certain functions

If set to true, the Telegram test environment will be used instead of the production environment

The path to the directory for the persistent database; if empty, the current working directory will be used

The path to the directory for storing files; if empty, database_directory will be used

If set to true, information about downloaded and uploaded files will be saved between application restarts

If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database

If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database

Application identifier for Telegram API access, which can be obtained at https://my.telegram.org

Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org

IETF language tag of the user's operating system language; must be non-empty

Model of the device the application is being run on; must be non-empty

Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib

If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name

Provides information about the method by which an authentication code is delivered to the user

An authentication code is delivered via a private Telegram message, which can be viewed from another active session 

An authentication code is delivered via an SMS message to the specified phone number 

An authentication code is delivered via a phone call to the specified phone number 

An authentication code is delivered by an immediately cancelled call to the specified phone number. The number from which the call was made is the code 

Describes the way the next code will be sent to the user; may be null 

Information about the email address authentication code that was sent 

Pattern of the email address to which an authentication code was sent 

Represents a part of the text that needs to be formatted in some unusual way 

Entities contained in the text. Entities can be nested, but must not mutually intersect with each other.

Pre, Code and PreCode entities can't contain other entities. Bold, Italic, Underline and Strikethrough entities can contain and to be contained in all other entities. All other entities can't contain each other

The minimum age of a user to be able to accept the terms; 0 if any 

True, if a blocking popup with terms of service must be shown to the user

TDLib needs the user's phone number to authorize. Call `setAuthenticationPhoneNumber` to provide the phone number, or use `requestQrCodeAuthentication`, or `checkAuthenticationBotToken` for other authentication options

The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link 

A tg:// URL for the QR code. The link will be updated frequently

The user is unregistered and need to accept terms of service and enter their first name and last name to finish registration 

The user has been authorized, but needs to enter a password to start using the application 

Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent

The user has been successfully authorized. TDLib is now ready to answer queries

TDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received

TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to

with error code 500. To continue working, one should create a new instance of the TDLib client

Information about the recovery email address to which the confirmation email was sent; may be null

Returns information about the availability of a temporary password, which can be used for payments 

True, if the file is currently being downloaded (or a local copy is being generated by some other means)

Download will be started from this offset. downloaded_prefix_size is calculated from this offset

If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix

Total downloaded file bytes. Should be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage

Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers.

If the ID starts with "http://" or "https://", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known.

If downloadFile is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the application with the HTTP URL in the original_path and "#url#" as the conversion string. Application should generate the file by downloading it to the specified location

Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time

True, if the file is currently being uploaded (or a remote copy is being generated by some other means)

Expected file size in case the exact file size is unknown, but an approximate size is known. Can be used to show download/upload progress

A file defined by its remote ID. The remote ID is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib.

For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application

Local path to a file from which the file is generated; may be empty if there is no such file

String specifying the conversion applied to the original file; should be persistent across application restarts. Conversions beginning with '#' are reserved for internal TDLib usage

Image type (see https://core.telegram.org/constructor/photoSize)

Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image

The thumbnail is in PNG format. It will be used only for background patterns

The thumbnail is in WEBP format. It will be used only for some stickers

The thumbnail is in static GIF format. It will be used only for some bot inline results

The thumbnail is in TGS format. It will be used only for animated sticker sets

The thumbnail is in MPEG4 format. It will be used only for some animations and videos

Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)

Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. (For example, 1.0 will place the mask just below the default mask position)

Mask scaling coefficient. (For example, 2.0 means a doubled size)

Number of voters for this option, available only for closed or voted polls 

True, if the option is being chosen by a pending setPollAnswer request

A poll in quiz mode, which has exactly one correct answer option and can be answered only once

0-based identifier of the correct answer option; -1 for a yet unanswered poll

Text that is shown when the user chooses an incorrect answer or taps on the lamp icon, 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll

Describes an animation file. The animation must be encoded in GIF or MPEG4 format 

Duration of the animation, in seconds; as defined by the sender 

True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets

The thumbnail of the album cover in JPEG format; as defined by the sender. The full size thumbnail should be extracted from the downloaded file; may be null 

Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null 

True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets

The identifier of the sticker set to which the sticker belongs; 0 if none 

True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets

Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null 

Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format 

Video thumbnail in JPEG format; as defined by the sender; may be null 

Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel 

Duration of the voice note, in seconds; as defined by the sender

Additional data about the user in a form of vCard; 0-2048 bytes in length 

The estimated horizontal accuracy of the location, in meters; as defined by the sender. 0 if unknown

Provider of the venue database; as defined by the sender. Currently only "foursquare" and "gplaces" (Google Places) need to be supported

Identifier of the venue in the provider database; as defined by the sender 

Type of the venue in the provider database; as defined by the sender

Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name} 

Amount of time the poll will be active after creation, in seconds 

Point in time (Unix timestamp) when the poll will be automatically closed 

Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of user profile photos

A small (160x160) user profile photo. The file can be downloaded only before the photo is changed

A big (640x640) user profile photo. The file can be downloaded only before the photo is changed

A small (160x160) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed

A big (640x640) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed

Represents the type of a user. The following types are possible: regular users, deleted users and bots

A deleted user or deleted bot. No information on the user besides the user identifier is available. It is not possible to perform any active actions on this type of user

True, if the bot can be invited to basic group and supergroup chats

True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages

Placeholder for inline queries (displayed on the application input field) 

True, if the location of the user should be sent with every inline query to this bot

No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type

Available variants of the photo in JPEG format, in different size

Photo to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed

An animation in MPEG4 format; must be square, at most 10 seconds long, have width between 160 and 800 and be at most 2MB in size

Animation to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed

The user is a contact of the current user and the current user is a contact of the user

If non-empty, it contains a human-readable description of the reason why access to this user must be restricted

If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser

IETF language tag of the user's language; only available to bots

True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used

For bots, the text that is included with the link when users share the bot

Number of group chats where both the other user and the current user are a member; 0 for the current user

True, if the user can send text messages, contacts, locations, and venues

True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions

True, if the user can send polls. Implies can_send_messages permissions

True, if the user can send animations, games, stickers, and dice and use inline bots. Implies can_send_messages permissions

True, if the user may add a web page preview to their messages. Implies can_send_messages permissions

True, if the user can change the chat title, photo, and other settings

The user is the owner of a chat and has all the administrator privileges

A custom title of the owner; 0-16 characters without emojis; applicable to supergroups only

True, if the creator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only

The user is a member of a chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, and ban unprivileged members. In supergroups and channels, there are more detailed options for administrator privileges

A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only

True, if the current user can edit the administrator privileges for the called user

True, if the administrator can change the chat title, photo, and other settings

True, if the administrator can create channel posts; applicable to channels only

True, if the administrator can edit messages of other users and pin messages; applicable to channels only

True, if the administrator can restrict, ban, or unban chat members

True, if the administrator can pin messages; applicable to groups only

True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them

True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only

The user is a member of a chat, without any additional privileges or restrictions

The user is under certain restrictions in the chat. Not supported in basic groups and channels

Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever

The user was banned (and hence is not a member of the chat). Implies the user can't return to the chat or view messages

Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever

Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown

If the user is a bot, information about the bot; may be null. Can be null even for a bot if the bot is not the chat member

Specifies the kind of chat members to return in searchChatMembers

Returns users under certain restrictions in the chat; can be used only by administrators in a supergroup

Returns users banned from the chat; can be used only by administrators in a supergroup or in a channel

Specifies the kind of chat members to return in getSupergroupMembers

Returns contacts of the user, which are members of the supergroup or channel 

Used to search for supergroup or channel members via a (string) query 

Returns restricted supergroup members; can be used only by administrators 

Returns users banned from the supergroup or channel; can be used only by administrators 

Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users)

Identifier of the supergroup to which this group was upgraded; 0 if none

Invite link for this group; available only after it has been generated at least once and only for the group creator

Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers

Username of the supergroup or channel; empty for private supergroups or channels

Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member

Status of the current user in the supergroup or channel; custom title will be always empty

Number of members in the supergroup or channel; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was received through searchPublicChats, searchChatsNearby, getInactiveSupergroupChats, getSuitableDiscussionChats, getGroupsInCommon, or getUserPrivacySettingRules

True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel

True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup

True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels

If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted

Number of privileged users in the supergroup or channel; 0 if unknown

Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown

Delay between consecutive sent messages for non-administrator supergroup members, in seconds

Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero

True, if new chat members will have access to old messages. In public or discussion groups and both public and private channels, old messages are always available, so this option affects only private supergroups without a linked chat. The value of this field is only available for chat administrators

Identifier of the basic group from which supergroup was upgraded; 0 if none

Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none

The secret chat is not yet created; waiting for the other user to get online

True, if the chat was created by the current user; otherwise false

Current message Time To Live setting (self-destruct timer) for the chat, in seconds

Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9.

The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers

Secret chat layer; determines features supported by the chat partner's application. Video notes are supported if the layer >= 66; nested text entities and underline and strikethrough entities are supported if the layer >= 101

The message was originally sent by an anonymous chat administrator on behalf of the chat

The message was originally sent by a user, which is hidden by their privacy settings 

Identifier of the chat from which the message was originally forwarded

Point in time (Unix timestamp) when the message was originally sent

The type of a public service announcement for the forwarded message

For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, the identifier of the chat from which the message was forwarded last time; 0 if unknown

For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, the identifier of the original message from which the new message was forwarded last time; 0 if unknown

Recent repliers to the message; available in channels with a discussion supergroup

Contains information about direct or indirect replies to the message; may be null. Currently, available only in channels with a discussion supergroup and discussion supergroups for messages, which are not replies itself

The message is being sent now, but has not yet been delivered to the server

Time left before the message can be re-sent, in seconds. No update is sent when this field changes

Message identifier; unique for the chat to which the message belongs

Information about the scheduling state of the message; may be null

True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the application

True, if the message can be deleted only for the current user while other users will continue to see it

True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts

True, if the message contains an unread mention for the current user

If non-zero, the identifier of the chat to which the replied message belongs; Currently, only messages in the Replies chat can have different reply_in_chat_id and chat_id

If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message

If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs

For self-destructing messages, the message's TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires

If non-zero, the user identifier of the bot through which this message was sent

For channel posts and anonymous group messages, optional author signature

Unique identifier of an album this message belongs to. Only photos and videos can be grouped together in albums

If non-empty, contains a human-readable description of the reason why access to this message must be restricted

The offset for the next request. If empty, there are no more results

Describes the types of chats to which notification settings are applied

Notification settings applied to all private and secret chats when the corresponding chat setting has a default value

Notification settings applied to all basic groups and supergroups when the corresponding chat setting has a default value

Notification settings applied to all channels when the corresponding chat setting has a default value

If true, mute_for is ignored and the value for the relevant type of chat is used instead 

If true, sound is ignored and the value for the relevant type of chat is used instead 

The name of an audio file to be used for notification sounds; only applies to iOS applications

If true, show_preview is ignored and the value for the relevant type of chat is used instead 

If true, disable_pinned_message_notifications is ignored and the value for the relevant type of chat is used instead 

If true, notifications for incoming pinned messages will be created as for an ordinary unread message

If true, disable_mention_notifications is ignored and the value for the relevant type of chat is used instead 

If true, notifications for messages with mentions will be created as for an ordinary unread message

Contains information about notification settings for several chats

True, if notifications for incoming pinned messages will be created as for an ordinary unread message

True, if notifications for messages with mentions will be created as for an ordinary unread message

Content of the message draft; this should always be of type inputMessageText

A supergroup (i.e. a chat with up to GetOption("supergroup_max_size") other users), or channel (with unlimited members) 

The icon name for short filter representation. If non-empty, must be one of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work".

If empty, use getChatFilterDefaultIconName to get default icon name for the filter

The chat identifiers of always included chats in the filtered chat list

The chat identifiers of always excluded chats in the filtered chat list

The icon name for short filter representation. One of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work"

A list of chats usually located at the top of the main chat list. Unmuted chats are automatically moved from the Archive to the Main chat list when a new message arrives

A parameter used to determine order of the chat in the chat list. Chats must be sorted by the pair (order, chat.id) in descending order

A chat. (Can be a private chat, basic group, supergroup, or secret chat)

Actions that non-administrator chat members are allowed to take in the chat

True, if the chat is blocked by the current user and private messages from the chat can't be received

True, if the chat messages can be deleted only for the current user while other users will continue to see the messages

True, if the chat can be reported to Telegram moderators through reportChat

Default value of the disable_notification parameter, used when a message is sent to the chat

Describes actions which should be possible to do through a chat action bar; may be null

Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat

Contains application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used

Chat identifier of the invite link; 0 if the user has no access to the chat before joining

If non-zero, the amount of time for which read access to the chat will remain available, in seconds

User identifiers of some chat members that may be known to the current user

True, if the chat is a public supergroup or channel, i.e. it has a username or it is a location-based supergroup

Describes actions which should be possible to do through a chat action bar

The chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam

If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings

The chat is a location-based supergroup, which can be reported as having unrelated location using the method reportChat with the reason chatReportReasonUnrelatedLocation

The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be blocked using the method blockUser, or the other user can be added to the contact list using the method addContact

If non-negative, the current user was found by the peer through searchChatsNearby and this is the distance between the users

The chat is a private or secret chat and the other user can be added to the contact list using the method addContact

The chat is a private or secret chat with a mutual contact and the user's phone number can be shared with the other user using the method sharePhoneNumber

A simple button, with text that should be sent when the button is pressed

A button that sends the user's phone number when pressed; available only in private chats

A button that sends the user's location when pressed; available only in private chats

A button that allows the user to create and send a poll when pressed; available only in private chats 

A button that opens a specified URL and automatically logs in in current user if they allowed to do that 

A button that asks for password of the current user and then sends a callback query to a bot 

A button with a game that sends a callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame

A button that forces an inline query to the bot to be inserted in the input field 

A button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice

Contains a description of a custom keyboard and actions that can be done with it to quickly reply to bots

Instructs application to remove the keyboard once this message has been received. This kind of keyboard can't be received in an incoming message; instead, UpdateChatReplyMarkup with message_id == 0 will be sent

True, if the keyboard is removed only for the mentioned users or the target user of a reply

True, if a forced reply must automatically be shown to the current user. For outgoing messages, specify true to show the forced reply only for the mentioned users and for the target user of a reply

True, if the application needs to resize the keyboard vertically

True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply

Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl

An authorization confirmation dialog needs to be shown to the user 

True, if the user needs to be requested to give the permission to the bot to send them messages

The messages from which the thread starts. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id)

The image represented as a document. The image can be in GIF, JPEG or PNG format

Width of a bounding box in which the image should be shown; 0 if unknown

Height of a bounding box in which the image should be shown; 0 if unknown

The name of a richTextAnchor object, which is the first element of the target richTexts object 

The anchor name. If the name is empty, the link should bring back to top 

Contains a caption of an instant view web page block, consisting of a text and a trailing credit 

Cell text; may be null. If the text is null, then the cell should be invisible 

Point in time (Unix timestamp) when the article was published; 0 if unknown

An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor 

Point in time (Unix timestamp) when the post was created; 0 if unknown 

Chat username, by which all other information about the chat should be resolved

True, if the instant view contains the full page. A network request might be needed to get the full web page instant view

Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else

MIME type of the embedded preview, (e.g., text/html or video/mp4)

Preview of the content as an animation, if available; may be null

Preview of the content as an audio file, if available; may be null

Preview of the content as a document, if available (currently only available for small PDF files and ZIP archives); may be null

Preview of the content as a sticker for small WEBP files, if available; may be null

Preview of the content as a video note, if available; may be null

Preview of the content as a voice note, if available; may be null

Version of instant view, available for the web page (currently can be 1 or 2), 0 if none

True, if the country should be hidden from the list of all countries

Information about the country to which the phone number belongs; may be null

The part of the phone number denoting country calling code or its part

The phone number without country calling code formatted accordingly to local rules

Portion of the price of a product (e.g., "delivery cost", "tax amount") 

A list of objects used to calculate the total price of the product 

Contains information about the payment method chosen by the user

Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password 

Applies if a user enters new credentials on a payment provider website 

Contains JSON-encoded data with a credential identifier from the payment provider 

True, if the credential identifier can be saved on the server side

Contains information about the payment provider, if available, to support it natively without the need for opening the URL; may be null

True, if the user will be able to save credentials protected by a password they set up

Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options 

True, if the payment request was successful; otherwise the verification_url will be not empty 

A Telegram Passport element containing the user's personal details

A Telegram Passport element containing the user's driver license

A Telegram Passport element containing the user's internal passport

A Telegram Passport element containing the user's bank statement

A Telegram Passport element containing the user's rental agreement

A Telegram Passport element containing the registration page of the user's passport

A Telegram Passport element containing the user's temporary registration

A two-letter ISO 3166-1 alpha-2 country code of the user's country 

A two-letter ISO 3166-1 alpha-2 country code of the user's residence country

Reverse side of the document; only for driver license and identity card 

List of files containing a certified English translation of the document

A Telegram Passport element containing the user's personal details 

A Telegram Passport element containing the user's driver license 

A Telegram Passport element containing the user's identity card 

A Telegram Passport element containing the user's internal passport 

A Telegram Passport element containing the user's bank statement 

A Telegram Passport element containing the user's rental agreement 

A Telegram Passport element containing the user's passport registration pages 

A Telegram Passport element containing the user's temporary registration 

A Telegram Passport element containing the user's email address 

Contains information about a Telegram Passport element to be saved

A Telegram Passport element to be saved containing the user's personal details 

A Telegram Passport element to be saved containing the user's passport 

A Telegram Passport element to be saved containing the user's driver license 

A Telegram Passport element to be saved containing the user's identity card 

A Telegram Passport element to be saved containing the user's internal passport 

A Telegram Passport element to be saved containing the user's address 

A Telegram Passport element to be saved containing the user's utility bill 

A Telegram Passport element to be saved containing the user's bank statement 

A Telegram Passport element to be saved containing the user's rental agreement 

A Telegram Passport element to be saved containing the user's passport registration 

A Telegram Passport element to be saved containing the user's temporary registration 

A Telegram Passport element to be saved containing the user's phone number 

A Telegram Passport element to be saved containing the user's email address 

Contains the description of an error in a Telegram Passport element

The element contains an error in an unspecified place. The error will be considered resolved when new data is added

One of the data fields contains an error. The error will be considered resolved when the value of the field changes 

The front side of the document contains an error. The error will be considered resolved when the file with the front side changes

The reverse side of the document contains an error. The error will be considered resolved when the file with the reverse side changes

The selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes

One of files with the translation of the document contains an error. The error will be considered resolved when the file changes 

The translation of the document contains an error. The error will be considered resolved when the list of translation files changes

The file contains an error. The error will be considered resolved when the file changes 

The list of attached files contains an error. The error will be considered resolved when the list of files changes

Contains the description of an error in a Telegram Passport element 

Contains information about a Telegram Passport element that was requested by a service 

True, if a certified English translation is required with the document 

True, if personal details must include the user's name in the language of their country of residence

Contains a description of the required Telegram Passport element that was requested by a service 

List of Telegram Passport elements any of which is enough to provide

Contains information about a Telegram Passport authorization form that was requested 

Information about the Telegram Passport elements that must be provided to complete the form

Contains information about a Telegram Passport elements and corresponding errors 

Secret for data decryption, encrypted with the service's public key

Contains information about an encrypted Telegram Passport element; for bots only 

List of files containing a certified English translation of the document 

Contains the description of an error in a Telegram Passport element; for bots only

The element contains an error in an unspecified place. The error will be considered resolved when new data is added 

A data field contains an error. The error is considered resolved when the field's value changes 

The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes 

The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes 

The selfie contains an error. The error is considered resolved when the file with the selfie changes 

One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes 

The translation of the document contains an error. The error is considered resolved when the list of files changes 

The file contains an error. The error is considered resolved when the file changes 

The list of attached files contains an error. The error is considered resolved when the file list changes 

Contains the description of an error in a Telegram Passport element; for bots only 

A preview of the web page that's mentioned in the text; may be null

True, if the animation thumbnail must be blurred and the animation must be shown only while tapped

True, if the photo must be blurred and must be shown only while tapped

An expired photo message (self-destructed after TTL has elapsed)

True, if the video thumbnail must be blurred and the video must be shown only while tapped

An expired video message (self-destructed after TTL has elapsed)

True, if at least one of the recipients has viewed the video note 

True, if the video note thumbnail must be blurred and the video note must be shown only while tapped

True, if at least one of the recipients has listened to the voice note

Time relative to the message send date, for which the location can be updated, in seconds

Left time for which the location can be updated, in seconds. updateMessageContent is not sent when this field changes

For live locations, a direction in which the location moves, in degrees; 1-360. If 0 the direction is unknown

For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). 0 if the notification is disabled. Available only for the message sender

A dice message. The dice value is randomly generated by the server

The animated stickers with the initial dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known

The animated stickers with the final dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known

The dice value. If the value is 0, the dice don't have final state yet

Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded

Unique invoice bot start_parameter. To share an invoice use the URL https://t.me/{bot_username}?start={start_parameter} 

The identifier of the message with the receipt, after the product has been purchased

A basic group was upgraded to a supergroup and was deactivated as the result 

Identifier of the supergroup to which the basic group was upgraded

Identifier of the pinned message, can be an identifier of a deleted message or 0

The TTL (Time To Live) setting messages in a secret chat has been changed 

Identifier of the message with the game, can be an identifier of a deleted message 

Identifier of the game; may be different from the games presented in the message with the game 

Identifier of the message with the corresponding invoice; can be an identifier of a deleted message 

Total price for the product, in the minimal quantity of the currency

Total price for the product, in the minimal quantity of the currency 

Identifier of the shipping option chosen by the user; may be empty if not applicable 

The current user has connected a website by logging in using Telegram Login Widget on it 

Message content that is not supported in the current TDLib version

Represents a part of the text which must be formatted differently

A cashtag text, beginning with "$" and consisting of capital english letters (i.e. "$USD")

A bot command, beginning with "/". This shouldn't be highlighted if there are no bots in the chat

A bank card number. The getBankCardInfo method can be used to get information about the bank card

Text that must be formatted as if inside pre, and code HTML tags 

A text shows instead of a raw mention of the user (e.g., when the user has no username) 

A thumbnail to be sent along with a file; must be in JPEG or WEBP format for stickers, and less than 200 KB in size 

Thumbnail file to send. Sending thumbnails by file_id is currently not supported

Thumbnail width, usually shouldn't exceed 320. Use 0 if unknown 

Thumbnail height, usually shouldn't exceed 320. Use 0 if unknown

Contains information about the time when a scheduled message will be sent

Date the message will be sent. The date must be within 367 days in the future

The message will be sent when the peer will be online. Applicable to private chats only and when the exact online status of the peer is known

Message scheduling state. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled

Options to be used when a message content is copied without a link to the original message

True, if content of the message needs to be copied without a link to the original message. Always true if the message is forwarded to a secret chat

True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false

Formatted text to be sent; 1-GetOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually

True, if rich web page previews for URLs in the message text should be disabled 

File identifiers of the stickers added to the animation, if applicable

Animation caption; 0-GetOption("message_caption_length_max") characters

Duration of the audio, in seconds; may be replaced by the server 

Title of the audio; 0-64 characters; may be replaced by the server

Performer of the audio; 0-64 characters, may be replaced by the server 

Audio caption; 0-GetOption("message_caption_length_max") characters

If true, automatic file type detection will be disabled and the document will be always sent as file. Always true for files sent to secret chats 

Document caption; 0-GetOption("message_caption_length_max") characters

Photo thumbnail to be sent, this is sent to the other party in secret chats only 

File identifiers of the stickers added to the photo, if applicable 

Photo caption; 0-GetOption("message_caption_length_max") characters

Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats

File identifiers of the stickers added to the video, if applicable

Video caption; 0-GetOption("message_caption_length_max") characters 

Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats

Video width and height; must be positive and not greater than 640

Voice note caption; 0-GetOption("message_caption_length_max") characters

Period for which the location can be updated, in seconds; should be between 60 and 86400 for a live location and 0 otherwise

For live locations, a direction in which the location moves, in degrees; 1-360. Pass 0 if unknown

For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled. Can't be enabled in channels and Saved Messages

A message with a game; not supported for channels or secret chats 

A message with an invoice; can be used only by bots and only in private chats 

JSON-encoded data about the invoice, which will be shared with the payment provider 

Unique invoice bot start_parameter for the generation of this invoice

A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot 

Poll question, 1-255 characters (up to 300 characters for bots) 

True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels 

Amount of time the poll will be active after creation, in seconds; for bots only

Point in time (Unix timestamp) when the poll will be automatically closed; for bots only

True, if the poll needs to be sent already closed; for bots only

True, if a game message should be shared within a launched game; applies only to game messages

Options to be used to copy content of the message without a link to the original message

Returns only incoming call messages with missed/declined discard reasons

Returns only messages with mentions of the current user, or messages that are replies to their messages

Returns only messages with unread mentions of the current user, or messages that are replies to their messages. When using this filter the results can't be additionally filtered by a query, a message thread or by the sending user

Returns only failed to send messages. This filter can be used only if the message database is used

Point in time (Unix timestamp) when the user's online status will expire

Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed

True, if the sticker set has been installed by the current user 

True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously

A list of emoji corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object

Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null

Contains up to the first 5 stickers from the set, depending on the context. If the application needs more stickers the full set should be requested

The call was ended before the conversation started. It was cancelled by the caller or missed by the other party

The call was ended before the conversation started. It was declined by the other party

The call was ended during the conversation because the users were disconnected

The call has been answered and encryption keys are being exchanged

True, if peer-to-peer connection is allowed by users privacy settings

True, if the call debug information should be sent to the server

Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout

Contains settings for the authentication of the user's phone number

Pass true if the authentication code may be sent via flash call to the specified phone number

Pass true if the authenticated phone number is used on the current device

For official applications only. True, if the application can use Android SMS Retriever API (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details

Contains animated stickers which should be used for dice animation rendering

The animated sticker with the slot machine background. The background animation must start playing after all reel animations finish

The animated sticker with the lever animation. The lever animation must play once in the initial dice state

User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user

The number of users that imported the corresponding contact; 0 for already registered users or if unavailable

Represents a link to an animated GIF or an animated (i.e. without sound) H.264/MPEG-4 AVC video

URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists 

MIME type of the video thumbnail. If non-empty, must be one of "image/jpeg", "image/gif" and "video/mp4"

MIME type of the video file. Must be one of "image/gif" and "video/mp4"

The message reply markup. Must be of type replyMarkupInlineKeyboard or null

The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAnimation, InputMessageLocation, InputMessageVenue or InputMessageContact

The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact

The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAudio, InputMessageLocation, InputMessageVenue or InputMessageContact

MIME type of the file content; only "application/pdf" and "application/zip" are currently allowed

The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageDocument, InputMessageLocation, InputMessageVenue or InputMessageContact

Message reply markup. Must be of type replyMarkupInlineKeyboard or null

Amount of time relative to the message sent time until the location can be updated, in seconds

The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessagePhoto, InputMessageLocation, InputMessageVenue or InputMessageContact

The URL of the WEBP or TGS sticker (sticker file size must not exceed 5MB) 

The content of the message to be sent. Must be one of the following types: InputMessageText, inputMessageSticker, InputMessageLocation, InputMessageVenue or InputMessageContact

Represents a link to a page containing an embedded video player or a video file 

MIME type of the content of the video URL, only "text/html" or "video/mp4" are currently supported

The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVideo, InputMessageLocation, InputMessageVenue or InputMessageContact

Represents a link to an opus-encoded audio file within an OGG container, single channel audio 

The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVoiceNote, InputMessageLocation, InputMessageVenue or InputMessageContact

Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query 

The offset for the next request. If empty, there are no more results 

If non-empty, this text should be shown on the button, which opens a private chat with the bot and sends the bot a start message with the switch_pm_parameter 

A short name of the game that was attached to the callback button

True, if an alert should be shown to the user instead of a toast notification 

A chat member has gained/lost administrator status, or the list of their administrator privileges has changed 

A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed 

The can_invite_users permission of a supergroup chat was toggled 

The is_all_history_available setting of a supergroup was toggled 

Identifier of the user who performed the action that triggered the event 

True, if member restricted/unrestricted/banned/unbanned events should be returned

A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info

A deleted language pack string, the value should be taken from the built-in english language pack

Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs

A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info

Total number of non-deleted strings from the language pack available locally 

Link to language translation interface; empty for custom local language packs

Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org

Device registration token; may be empty to de-register a device 

The access token that will be used to send notifications; may be empty to de-register a device

Push notification channel URI; may be empty to de-register a device

Absolute URL exposed by the push service where the application server can send push messages; may be empty to de-register a device

Base64url-encoded P-256 elliptic curve Diffie-Hellman public key 

Push service registration identifier; may be empty to de-register a device

Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification 

The globally unique identifier of push notification subscription

Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45

True, if the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12

True, if the background needs to be slightly moved when device is tilted

A PNG or TGV (gzipped subset of SVG with MIME type "application/x-tgwallpattern") pattern to be combined with the background fill chosen by the user

Intensity of the pattern when it is shown above the filled background, 0-100

True, if the background is dark and is recommended to be used with dark theme

Document with the background; may be null. Null only for filled backgrounds

Background file to use. Only inputFileLocal and inputFileGenerated are supported. The file must be in JPEG format for wallpapers and in PNG format for patterns

Represents result of checking whether the current session can be used to transfer a chat ownership to another user

The 2-step verification was enabled recently, user needs to wait 

Time left before the session can be used to transfer ownership of a chat, in seconds

Represents result of checking whether a username can be set for a chat

The user has too much chats with username, one of them should be made private first

True, if the message is a pinned message with the specified content

The message identifier. The message will not be available in the chat history, but the ID can be used in viewMessages, or as reply_to_message_id

The sender of the message. Corresponding user or chat may be inaccessible

A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with ordinary unread messages

A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with unread mentions of the current user, replies to their messages, or a pinned message

A group containing a notification of type notificationTypeNewSecretChat

A group containing notifications of type notificationTypeNewCall

Unique persistent auto-incremented from 1 identifier of the notification group 

Identifier of a chat to which all notifications in the group belong

Represents an unknown option or an option which has a default value

The user identifiers, total number of users in all rules must not exceed 1000

A rule to allow all members of certain specified basic groups and supergroups to doing something 

The chat identifiers, total number of chats in all rules must not exceed 20

A rule to restrict all members of specified basic groups and supergroups from doing something 

A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed 

A privacy setting for managing whether the user's online status is visible

A privacy setting for managing whether the user's profile photo is visible

A privacy setting for managing whether a link to the user's account is included in forwarded messages

A privacy setting for managing whether the user's phone number is visible

A privacy setting for managing whether the user can be invited to chats

A privacy setting for managing whether peer-to-peer connections can be used for calls

A privacy setting for managing whether the user can be found by their phone number. Checked only if the phone number is not known to the other user. Can be set only to "Allow contacts" or "Allow all"

Contains information about the period of inactivity after which the current user's account will automatically be deleted 

Number of days of inactivity before the account will be flagged for deletion; should range from 30-366 days

Contains information about one session in a Telegram application used by the current user. Sessions should be shown to the user in the returned order

True, if a password is needed to complete authorization of the session

True, if the application is an official application or uses the api_id of an official application

Model of the device the application has been run or is running on, as provided by the application 

Operating system the application has been run or is running on, as provided by the application

Version of the operating system the application has been run or is running on, as provided by the application 

IP address from which the session was created, in human-readable format

A two-letter country code for the country from which the session was created, based on the IP address 

Region code from which the session was created, based on the IP address

Contains information about one website the current user is logged in with Telegram

Point in time (Unix timestamp) when obtained authorization was last used

IP address from which the user was logged in, in human-readable format

Human-readable description of a country and a region, from which the user was logged in, based on the IP address

Contains a list of websites the current user is logged in with Telegram 

If found, identifier of the chat to which the message belongs, 0 otherwise

True, if the whole media album to which the message belongs is linked

True, if the message is linked as a channel post comment or from a message thread

The file was sent to a secret chat (the file type is not known to the server)

The file is a file from Secure storage used for storing Telegram Passport files

Contains the exact storage usage statistics split by chats and file type 

Contains approximate storage usage statistics, excluding files of unknown file type 

Contains information about the total amount of data that was used to send and receive files 

Type of the network the data was sent through. Call setNetworkType to maintain the actual network type

Contains information about the total amount of data that was used for calls 

Point in time (Unix timestamp) from which the statistics are collected 

True, if the beginning of video files needs to be preloaded for instant playback

True, if the next audio track needs to be preloaded while the user is listening to an audio file

Preset with lowest settings; supposed to be used by default when roaming

Preset with medium settings; supposed to be used by default when using mobile data

Preset with highest settings; supposed to be used by default when connected on Wi-Fi

Describes the current state of the connection to Telegram servers

Currently waiting for the network to become available. Use setNetworkType to change the available network type

Represents the categories of chats for which a list of frequently used chats can be retrieved

A category containing frequently used private chats with non-bot users

A category containing frequently used private chats with bot users

A category containing frequently used basic groups and supergroups

A category containing frequently used chats with inline bots sorted by their usage in inline mode

A category containing frequently used chats used to forward messages

Describes the type of a URL linking to an internal Telegram entity

Suggests the user to enable "archive_and_mute_new_chats_from_unknown_users" option

Suggests the user to check authorization phone number and change the phone number if it is inaccessible

Version of the parser: 0 or 1 - Telegram Bot API "Markdown" parse mode, 2 - Telegram Bot API "MarkdownV2" parse mode

The text uses HTML-style formatting. The same as Telegram Bot API "HTML" parse mode

Pass true if the proxy supports only HTTP requests and doesn't support transparent TCP connections via HTTP CONNECT method

Point in time (Unix timestamp) when the proxy was last used; 0 if never 

A static sticker in PNG format, which will be converted to WEBP server-side

PNG image with the sticker; must be up to 512 KB in size and fit in a 512x512 square

For masks, position where the mask should be placed; may be null

File with the animated sticker. Only local or uploaded within a week files are supported. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements

If non-empty, a token which can be used to receive a zoomed in graph

The graph data to be asynchronously loaded through getStatisticalGraph 

Contains statistics about number of new members invited by a user

A graph containing distribution of sent messages by content type

A graph containing distribution of message views per day of week

A graph containing number of message views in a given hour in the last two weeks

A graph containing number of users viewed chat messages per language

A graph containing number of views of associated with the chat instant views

Detailed statistics about number of views and shares of recently sent messages

A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message

Information about the sent message. Usually only the message identifier, date, and content are changed, but almost all other fields can also change 

A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update

A message was edited. Changes in the message content will come in a separate updateMessageContent 

New information about interactions with the message; may be null

The message content was opened. Updates voice note messages to "listened", video note messages to "viewed" and starts the TTL timer for self-destructing messages 

A message with a live location was viewed. When the update is received, the application is supposed to update the live location

A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates 

The last message of a chat was changed. If last_message is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case 

The position of a chat in a chat list has changed. Instead of this update updateChatLastMessage or updateChatDraftMessage might be sent 

New chat position. If new order is 0, then the chat needs to be removed from the list

The value of the default disable_notification parameter, used when a message is sent to the chat, was changed 

Incoming messages were read or number of unread messages has been changed 

The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user

A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update shouldn't be applied 

The number of online group members has changed. This update with non-zero count is sent only for currently opened chats. There is no guarantee that it will be sent just after the count has changed 

A list of active notifications in a notification group has changed

Chat identifier, which notification settings must be applied to the added notifications

Total number of unread notifications in the group, can be bigger than number of active notifications

Identifiers of removed group notifications, sorted by notification ID

Contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update 

Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications

True, if there are some delayed notification updates, which will be sent soon

True, if there can be some yet unreceived notifications, which are being fetched from the server

True, if the messages are permanently deleted by a user (as opposed to just becoming inaccessible)

True, if the messages are deleted only from the cache and can possibly be retrieved again in the future

If not 0, a message thread identifier in which the action was performed 

Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application 

Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the application 

Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the application 

Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the application 

Service notification from the server. Upon receiving this the application must show a popup with the content of the notification

Notification type. If type begins with "AUTH_KEY_DROP_", then two buttons "Cancel" and "Log out" should be shown under notification; if user presses the second, all local data should be destroyed using Destroy method

The file generation process needs to be started by the application

The path to a file from which a new file is generated; may be empty

The path to a file that should be created and where the new file should be generated

String specifying the conversion applied to the original file. If conversion is "#url#" than original_path contains an HTTP/HTTPS URL of a file, which should be downloaded by the application

Number of unread messages in a chat list has changed. This update is sent only if the message database is used 

Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used

The list of trending sticker sets was updated or some of them were viewed 

The prefix of the list of trending sticker sets with the newest trending sticker sets

True, if the list of stickers attached to photo or video files was updated, otherwise the list of sent stickers is updated 

The connection state has changed. This update must be used only to show a human-readable description of the connection state 

New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method should be called with the reason "Decline ToS update" 

The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request 

The parameters of animation search through GetOption("animation_search_bot_username") bot has changed 

Identifier that uniquely corresponds to the chat to which the message was sent 

A new incoming callback query from a message sent via a bot; for bots only 

Identifier of the inline message, from which the query originated

An identifier uniquely corresponding to the chat a message was sent to 

A new incoming shipping query; for bots only. Only for invoices with flexible price 

A new incoming pre-checkout query; for bots only. Contains full information about a checkout 

Identifier of a shipping option chosen by the user; may be empty if not applicable 

Path to the file to where the internal TDLib log will be written

The maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated

Pass true to additionally redirect stderr to the log file. Ignored on Windows

A simple object containing a sequence of bytes; for testing only 

A simple object containing a vector of numbers; for testing only 

A simple object containing a vector of objects that hold a number; for testing only 

A simple object containing a vector of strings; for testing only 

A simple object containing a vector of objects that hold a string; for testing only 

Returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state. Can be called before initialization

Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters 

Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey 

Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber,

or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword

Re-sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode and the next_code_type of the result is not null

Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode 

The verification code received via SMS, Telegram message, phone call, or flash call

Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber,

List of user identifiers of other users currently using the application

Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration

Checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword 

Requests to send a password recovery code to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword

Recovers the password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword 

Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in 

Closes the TDLib instance after a proper logout. Requires an available network connection. All local data will be destroyed. After the logout completes, updateAuthorizationState with authorizationStateClosed will be sent

Closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent. Can be called before initialization

Closes the TDLib instance, destroying all local data without a proper logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the destruction completes updateAuthorizationState with authorizationStateClosed will be sent. Can be called before authorization

Confirms QR code authentication on another device. Returns created session on success 

A link from a QR code. The link must be scanned by the in-app camera

Returns all updates needed to restore current TDLib state, i.e. all actual UpdateAuthorizationState/UpdateUser/UpdateNewChat and others. This is especially useful if TDLib is run in a separate process. Can be called before initialization

Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain 

Changes the password for the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed

Returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user 

Changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed.

If new_recovery_email_address is the same as the email address that is currently set up, this call succeeds immediately and aborts all other requests waiting for an email confirmation 

Checks the 2-step verification recovery email address verification code 

Resends the 2-step verification recovery email address verification code

Requests to send a password recovery code to an email address that was previously set up

Recovers the password using a recovery code sent to an email address that was previously set up 

Time during which the temporary password will be valid, in seconds; should be between 60 and 86400

Returns information about a user by their identifier. This is an offline request if the current user is not a bot 

Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot 

Returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot 

Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute 

Returns information about a secret chat by its identifier. This is an offline request 

Returns information about a chat by its identifier, this is an offline request if the current user is not a bot 

Returns information about a message, if it is available locally without sending network request. This is an offline request 

Returns information about a message that is replied by a given message. Also returns the pinned message, the game message, and the invoice message for messages of the types messagePinMessage, messageGameScore, and messagePaymentSuccessful respectively

Returns information about a message with the callback button that originated a callback query; for bots only 

Returns information about messages. If a message is not found, returns null on the corresponding position of the result 

Returns information about a message thread. Can be used only if message.can_get_message_thread == true 

Returns information about a file by its remote ID; this is an offline request. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user.

Returns an ordered list of chats in a chat list. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. (For example, to get a list of chats from the beginning, the offset_order should be equal to a biggest signed 64-bit number 9223372036854775807 == 2^63 - 1).

For optimal performance the number of returned chats is chosen by the library

The maximum number of chats to be returned. It is possible that fewer chats than the limit are returned even if the end of the list is not reached

Searches a public chat by its username. Currently only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned 

Searches public chats by looking for specified query in their username and title. Currently only private chats, supergroups and channels can be public. Returns a meaningful number of results. Returns nothing if the length of the searched username prefix is less than 5. Excludes private chats with contacts and chats from the chat list from the results 

Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the main chat list 

Query to search for. If the query is empty, returns up to 20 recently found chats 

Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list 

Returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request should be sent again every 25 seconds with adjusted location to not miss new chats 

Returns a list of frequently used chats. Supported only if the chat info database is enabled 

Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled 

Adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first 

Chat identifier; should be identifier of a supergroup chat, or a channel chat, or a private chat with self, or zero if chat is being created 

Returns a list of public chats of the specified type, owned by the user 

Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached 

Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using toggleSupergroupIsAllHistoryAvailable first

Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error

Returns a list of common group chats with a given user. Chats are sorted by their type and creation date 

Chat identifier starting from which to return chats; use 0 for the first request 

Returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id).

For optimal performance the number of returned messages is chosen by the library. This is an offline request if only_local is true

Identifier of the message starting from which history must be fetched; use 0 to get results from the last message

Specify 0 to get results from exactly the from_message_id or a negative offset up to 99 to get additionally some newer messages

The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than or equal to -offset. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached

If true, returns only messages that are available locally without sending network requests

Returns messages in a message thread of a message. Can be used only if message.can_get_message_thread == true. Message thread of a channel message is in the channel's linked supergroup.

The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id). For optimal performance the number of returned messages is chosen by the library

The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than or equal to -offset. Fewer messages may be returned than specified by the limit, even if the end of the message thread history has not been reached

Deletes all messages in the chat. Use Chat.can_be_deleted_only_for_self and Chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to the chat

Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query

(searchSecretMessages should be used instead), or without an enabled message database. For optimal performance the number of returned messages is chosen by the library

If not null, only messages sent by the specified sender will be returned. Not supported in secret chats

Specify 0 to get results from exactly the from_message_id or a negative offset to get the specified message and some newer messages

The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than -offset. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached

If not 0, only messages in the specified thread will be returned; supergroups only

Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)).

For optimal performance the number of returned messages is chosen by the library

Chat list in which to search messages; pass null to search in all chats regardless of their chat list

The date of the message starting from which the results should be fetched. Use 0 or any date in the future to get results from the last message

The chat identifier of the last found message, or 0 for the first request

The message identifier of the last found message, or 0 for the first request

The maximum number of messages to be returned; up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached

Filter for message content in the search results; searchMessagesFilterCall, searchMessagesFilterMissedCall, searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterFailedToSend and searchMessagesFilterPinned are unsupported in this function

Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance the number of returned messages is chosen by the library

Identifier of the chat in which to search. Specify 0 to search in all secret chats

Query to search for. If empty, searchChatMessages should be used instead

Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results

Searches for call messages. Returns the results in reverse chronological order (i. e., in order of decreasing message_id). For optimal performance the number of returned messages is chosen by the library

Identifier of the message from which to search; use 0 to get results from the last message

The maximum number of messages to be returned; up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached 

Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user 

Returns all active live locations that should be updated by the application. The list is persistent across application restarts only if the message database is used

Returns the last message sent in a chat no later than the specified date 

Point in time (Unix timestamp) relative to which to search for messages

Returns approximate number of messages of the specified type in the chat 

Filter for message content; searchMessagesFilterEmpty is unsupported in this function 

If true, returns count that is available locally without sending network requests, returning -1 if the number of messages is unknown

Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id) 

Returns forwarded copies of a channel message to different public channels. For optimal performance the number of returned messages is chosen by the library

The maximum number of messages to be returned; must be positive and can't be greater than 100. Fewer messages may be returned than specified by the limit, even if the end of the list has not been reached

Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user 

Identifier of notification group to which the notification belongs 

Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user 

Returns an HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels. This is an offline request

Pass true to create a link to the message as a channel post comment, or from a message thread

Returns an HTML code for embedding the message. Available only for messages in supergroups and channels with a username

Pass true to return an HTML code for embedding of the whole media album

The message link in the format "https://t.me/c/...", or "tg://privatepost?...", or "https://t.me/username/...", or "tg://resolve?..."

If not 0, a message thread identifier in which the message will be sent

Sends messages grouped together into an album. Currently only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages

If not 0, a message thread identifier in which the messages will be sent

Invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message

A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots#deep-linking)

Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message

If true, there will be no mention of a bot, via which the message is sent. Can be used only for bots GetOption("animation_search_bot_username"), GetOption("photo_search_bot_username") and GetOption("venue_search_bot_username")

Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message

Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order

True, if content of the messages needs to be copied without links to the original messages. Always true if the messages are forwarded to a secret chat

True, if media caption of message copies needs to be removed. Ignored if send_copy is false

Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed.

If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message

Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order

Changes the current TTL setting (sets a new self-destruct timer) in a secret chat and sends the corresponding message 

Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats 

Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message

Pass true to try to delete messages for all chat members. Always true for supergroups, channels and secret chats

Deletes all messages sent by the specified user to a chat. Supported only for supergroups; requires can_delete_messages administrator privileges 

Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side

New text content of the message. Should be of type InputMessageText

Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side

New location content of the message; may be null. Pass null to stop sharing the live location

The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown

The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled

Edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can't be replaced if the message was set to self-destruct. Media can't be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. Returns the edited message after the edit is completed on the server side

New content of the message. Must be one of the following types: InputMessageAnimation, InputMessageAudio, InputMessageDocument, InputMessagePhoto or InputMessageVideo

Edits the message content caption. Returns the edited message after the edit is completed on the server side

New message content caption; 0-GetOption("message_caption_length_max") characters

Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side

Edits the text of an inline text or game message sent via a bot; for bots only 

Edits the content of a live location in an inline message sent via a bot; for bots only 

Edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only 

Edits the caption of an inline message sent via a bot; for bots only 

Edits the reply markup of an inline message sent via a bot; for bots only 

Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed 

The new message scheduling state. Pass null to send the message immediately

Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) contained in the text. Can be called synchronously 

Parses Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities contained in the text. Can be called synchronously 

Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously

The text to parse. For example, "__italic__ ~~strikethrough~~ **bold** `code` ```pre``` __[italic__ text_url](telegram.org) __italic**bold italic__bold**"

Replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously 

Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously 

Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously 

Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously 

Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously

Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously 

Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously 

Changes the user answer to a poll. A poll in quiz mode can be answered only once

0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers

Returns users voted for the specified option in a non-anonymous polls. For the optimal performance the number of returned users is chosen by the library

The maximum number of users to be returned; must be positive and can't be greater than 50. Fewer users may be returned than specified by the limit, even if the end of the voter list has not been reached

Stops a poll. A poll in a message can be stopped when the message has can_be_edited flag set

Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button

Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl.

Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an error is returned, then the button must be handled as an ordinary URL button

Sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires 

True, if the result of the query can be cached for the specified user

Offset for the next inline query; pass an empty string if there are no more results

If non-empty, this text should be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switch_pm_parameter 

Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires 

If true, an alert should be shown to the user instead of a toast notification 

Time during which the result of the query can be cached, in seconds

Updates the game score of the specified user in the game; for bots only 

Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table

Updates the game score of the specified user in a game; for bots only 

Returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only 

Returns game high scores and some part of the high score table in the range of the specified user; for bots only 

Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a ForceReply reply markup has been used. UpdateChatReplyMarkup will be sent if the reply markup will be changed 

Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats) 

Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed 

Informs TDLib that messages are being viewed by the user. Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels)

If not 0, a message thread identifier in which the messages are being viewed

True, if messages in closed chats should be marked as read by the request

Informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed 

If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect

Returns an existing chat corresponding to a known supergroup or channel 

Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat 

Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat 

Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group 

Returns chat lists to which the chat can be added. This is an offline request 

Adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed

The chat list. Use getChatListsToAddChat to get suitable chat lists

Creates new chat filter. Returns information about the created chat filter 

Edits existing chat filter. Returns information about the edited chat filter 

Returns default icon name for a filter. Can be called synchronously 

Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info rights

Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info rights

Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right

If not 0, a message thread identifier in which the draft was changed 

Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed

New notification settings for the chat. If the chat is muted for more than 1 week, it is considered to be muted forever

Changes the value of the default disable_notification parameter, used when a message is sent to a chat 

Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info rights 

Changes the discussion group of a channel chat; requires can_change_info rights in the channel if it is specified 

Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires can_pin_messages rights in the supergroup) 

Identifier of a new channel's discussion group. Use 0 to remove the discussion group.

Use the method getSuitableDiscussionChats to find all suitable groups. Basic group chats must be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable must be used first to change that

Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use 

Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members rights 

New slow mode delay for the chat; must be one of 0, 10, 30, 60, 300, 900, 3600

Pins a message in a chat; requires can_pin_messages rights or can_edit_messages rights in the channel

True, if there should be no notification about the pinned message. Notifications are always disabled in channels and private chats

True, if the message needs to be pinned for one side only; private chats only

Removes a pinned message from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel 

Removes all pinned messages from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel 

Adds current user as a new member to a chat. Private and secret chats can't be joined using this method 

Removes current user from chat members. Private and secret chats can't be left using this method 

Adds a new member to a chat. Members can't be added to private or secret chats. Members will not be added until the chat state has been synchronized with the server

The number of earlier messages from the chat to be forwarded to the new member; up to 100. Ignored for supergroups and channels

Adds multiple new members to a chat. Currently this option is only available for supergroups and channels. This option can't be used to join a chat. Members can't be added to a channel if it has more than 200 members. Members will not be added until the chat state has been synchronized with the server

Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for adding new members to the chat and transferring chat ownership; instead, use addChatMember or transferChatOwnership. The chat member status will not be changed until it has been synchronized with the server

Checks whether the current session can be used to transfer a chat ownership to another user

Changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats

Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user 

Searches for a specified query in the first name, last name and username of the members of a specified chat. Requires administrator rights in channels 

The type of users to return. By default, chatMembersFilterMembers

Returns a list of administrators of the chat with their custom titles 

If true, local draft messages in secret chats will not be cleared

If specified, only chats from the specified scope will be returned 

Types of chats for which to return the notification settings information

Resets all notification settings to their default values. By default, all chats are unmuted, the sound is set to "default" and message previews are shown

Changes the pinned state of a chat. There can be up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/arhive chat list

Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates

Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile was called will be downloaded first

Number of bytes which should be downloaded starting from the "offset" position before the download will be automatically cancelled; use 0 to download without a limit

If false, this request returns file state just after the download has been started. If true, this request returns file state only after

the download has succeeded, has failed, has been cancelled or a new downloadFile request with different offset/limit parameters was sent

Stops the downloading of a file. If a file has already been downloaded, does nothing 

Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server

Asynchronously uploads a file to the cloud without sending it in a message. updateFile will be used to notify about upload progress and successful completion of the upload. The file will not have a persistent remote identifier until it will be sent in a message 

Priority of the upload (1-32). The higher the priority, the earlier the file will be uploaded. If the priorities of two files are equal, then the first one for which uploadFile was called will be uploaded first

Stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined 

Writes a part of a generated file. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file

If set, means that file generation has failed and should be terminated

Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file

Identifier of the file. The file must be located in the TDLib file cache

Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position

Generates a new invite link for a chat; the previously generated link is revoked. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right 

Checks the validity of an invite link for a chat and returns information about the corresponding chat 

Invite link to be checked; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/"

Uses an invite link to add the current user to the chat if possible. The new member will not be added until the chat state has been synchronized with the server

Invite link to import; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/"

List of the exact types of problems with the call, specified by the user

Changes the block state of a message sender. Currently, only users and supergroup chats can be blocked 

Pass true if the sender must be reported to the Telegram moderators

Number of users and chats to skip in the result; must be non-negative 

Adds a user to the contact list or edits an existing contact by their user identifier 

The contact to add or edit; phone number can be empty and needs to be specified only if known, vCard is ignored

True, if the new contact needs to be allowed to see current user's phone number. A corresponding rule to userPrivacySettingShowPhoneNumber will be added if needed. Use the field UserFullInfo.need_phone_number_privacy_exception to check whether the current user needs to be asked to share their phone number

Adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored 

The list of contacts to import or edit; contacts' vCard are ignored and are not imported

Searches for the specified query in the first names, last names and usernames of the known user contacts 

Changes imported contacts using the list of current user contacts saved on the device. Imports newly added contacts and, if at least the file database is enabled, deletes recently deleted contacts.

Query result depends on the result of the previous query, so only one query is possible at the same time 

The new list of contacts, contact's vCard are ignored and are not imported

Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber 

Identifier of the user with whom to share the phone number. The user must be a mutual contact

Returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already 

Returns stickers from the installed sticker sets that correspond to a given emoji. If the emoji is not empty, favorite and recently used stickers may also be returned 

String representation of emoji. If empty, returns all known installed stickers 

Searches for stickers from public sticker sets that correspond to a given emoji 

Pass true to return mask sticker sets; pass false to return ordinary sticker sets

Pass true to return mask stickers sets; pass false to return ordinary sticker sets 

Returns a list of trending sticker sets. For the optimal performance the number of returned sticker sets is chosen by the library

The offset from which to return the sticker sets; must be non-negative

The maximum number of sticker sets to be returned; must be non-negative. Fewer sticker sets may be returned than specified by the limit, even if the end of the list has not been reached

Returns a list of sticker sets attached to a file. Currently only photos and videos can have attached sticker sets 

Searches for installed sticker sets by looking for specified query in their title and name 

Pass true to return mask sticker sets; pass false to return ordinary sticker sets 

Searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results 

The new value of is_archived. A sticker set can't be installed and archived simultaneously

Informs the server that some trending sticker sets have been viewed by the user 

Pass true to change the order of mask sticker sets; pass false to change the order of ordinary sticker sets 

Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers

Manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list

Pass true to add the sticker to the list of stickers recently attached to photo or video files; pass false to add the sticker to the list of recently sent stickers 

Pass true to remove the sticker from the list of stickers recently attached to photo or video files; pass false to remove the sticker from the list of recently sent stickers 

Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers

Adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list

Returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object 

Searches for emojis by keywords. Supported only if the file database is enabled 

True, if only emojis, which exactly match text needs to be returned 

List of possible IETF language tags of the user's input language; may be empty if unknown

Returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation 

Language code for which the emoji replacements will be suggested

Manually adds a new animation to the list of saved animations. The new animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video animations with MIME type "video/mp4" can be added to the list

The animation file to be added. Only animations known to the server (i.e. successfully sent via a message) can be added to the list

Returns up to 20 recently used inline bots in the order of their last usage

Returns a web page preview by the text of the message. Do not call this function too often. Returns a 404 error if the web page has no preview 

Returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page 

If true, the full instant view for the web page will be returned

The new value of the optional last name for the user; 0-64 characters

The new value of the user bio; 0-70 characters without line feeds

The new value of the username. Use an empty string to remove the username

Changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer 

Changes the phone number of the user and sends an authentication code to the user's new phone number. On success, returns information about the sent code

Re-sends the authentication code sent to confirm a new phone number for the user. Works only if the previously received authenticationCodeInfo next_code_type was not null

Checks the authentication code sent to confirm a new phone number of the user 

Returns all website where the current user used Telegram to log in

Disconnects all websites from the current user's Telegram account

Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel 

New value of the username. Use an empty string to remove the username

Changes the sticker set of a supergroup; requires can_change_info rights 

New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set

Toggles sender signatures messages sent in a channel; requires can_change_info rights 

Toggles whether the message history of a supergroup is available to new members; requires can_change_info rights 

Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup 

Identifiers of messages sent in the supergroup by the user. This list must be non-empty

Returns information about members or banned users in a supergroup or channel. Can be used only if SupergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for some filters 

The type of users to return. By default, supergroupMembersFilterRecent 

Deletes a supergroup or channel along with all messages in the corresponding chat. This will release the supergroup or channel username and remove all members; requires owner privileges in the supergroup or channel. Chats with more than 1000 members can't be deleted using this method 

Closes a secret chat, effectively transferring its state to secretChatStateClosed 

Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i. e., in order of decreasing event_id)

Identifier of an event from which to return results. Use 0 to get results from the latest events 

The types of events to return. By default, all types will be returned 

User identifiers by which to filter events. By default, events relating to all users will be returned

Returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy 

Validates the order information provided by a user and returns the available shipping options for a flexible invoice 

Sends a filled-out payment form to the bot for final verification 

Changes the background selected by the user; adds background to the list of installed backgrounds

Background type; null for default background. The method will return error 404 if type is null

Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization 

If true, returns only locally available information without sending network requests

Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization 

Returns strings from a language pack in the current localization target by their keys. Can be called before authorization 

Language pack keys of the strings to be returned; leave empty to request all available strings

Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method shouldn't be called explicitly for the current used/base language packs. Can be called before authorization 

Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization 

Identifier of a language pack to be added; may be different from a name that is used in an "https://t.me/setlanguage/" link

Adds or changes a custom local language pack to the current localization target 

Information about the language pack. Language pack ID must start with 'X', consist only of English letters, digits and hyphens, and must not exceed 64 characters. Can be called before authorization 

Edits information about a custom local language pack in the current localization target. Can be called before authorization 

Adds, edits or deletes a string in a custom local language pack. Can be called before authorization 

Identifier of a previously added custom local language pack in the current localization target 

Deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. Can be called before authorization 

Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription 

Handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization

JSON-encoded push notification payload with all fields sent by the server, and "google.sent_time" and "google.notification.sound" fields added

Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously 

Returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization

Sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization

Changes the period of inactivity after which the account of the current user will automatically be deleted 

Returns the period of inactivity after which the account of the current user will automatically be deleted

Deletes the account of the current user, deleting all information associated with the user from the server. The phone number of the account can be used to create a new account. Can be called before authorization when the current authorization state is authorizationStateWaitPassword 

Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if this is a private chats with a bot, a private chat with a user sharing their location, a supergroup, or a channel, since other chats can't be checked by moderators 

Returns an HTTP URL with the chat statistics. Currently this method of getting the statistics are disabled and can be deleted in the future 

Returns detailed statistics about a chat. Currently this method can be used only for supergroups and channels. Can be used only if SupergroupFullInfo.can_get_statistics == true 

Returns detailed statistics about a message. Can be used only if Message.can_get_statistics == true 

Returns storage usage statistics. Can be called before authorization 

The maximum number of chats with the largest storage usage for which separate statistics should be returned. All other chats will be grouped in entries with chat_id == 0. If the chat info database is not used, the chat_limit is ignored and is always set to 0

Quickly returns approximate storage usage statistics. Can be called before authorization

Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted

Limit on the total size of files after deletion. Pass -1 to use the default limit

Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit

Limit on the total count of files after deletion. Pass -1 to use the default limit

The amount of time after the creation of a file during which it can't be deleted, in seconds. Pass -1 to use the default value

If not empty, only files with the given type(s) are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted

If not empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos)

If not empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos)

Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics

Same as in getStorageStatistics. Affects only returned statistics

Sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it should be called whenever the network is changed, even if the network type remains the same.

Network type is used to check whether the library can use the network at all and also for collecting detailed network data usage statistics 

Returns network data usage statistics. Can be called before authorization 

Adds the specified data to data usage statistics. Can be called before authorization 

The network statistics entry with the data to be added to statistics

Resets all network data usage statistics to zero. Can be called before authorization

Adds an element to the user's Telegram Passport. May return an error with a message "PHONE_VERIFICATION_NEEDED" or "EMAIL_VERIFICATION_NEEDED" if the chosen phone number or the chosen email address must be verified first 

Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed 

Returns an IETF language tag of the language preferred in the country, which should be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown 

Sends a code to verify a phone number to be added to a user's Telegram Passport

Re-sends the code to verify a phone number to be added to a user's Telegram Passport

Checks the phone number verification code for Telegram Passport 

Sends a code to verify an email address to be added to a user's Telegram Passport 

Re-sends the code to verify an email address to be added to a user's Telegram Passport

Checks the email address verification code for Telegram Passport 

Returns a Telegram Passport authorization form for sharing data with a service 

Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form 

Sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements are going to be reused

Types of Telegram Passport elements chosen by user to complete the authorization form

Sends phone number confirmation code. Should be called when user presses "https://t.me/confirmphone?phone=*******&hash=**********" or "tg://confirmphone?phone=*******&hash=**********" link 

Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only 

Uploads a PNG image with a sticker; for bots only; returns the uploaded file

PNG image with the sticker; must be up to 512 KB in size and fit in 512x512 square

Creates a new sticker set; for bots only. Returns the newly created sticker set

Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive); 1-64 characters

List of stickers to be added to the set; must be non-empty. All stickers must be of the same type

Adds a new sticker to a set; for bots only. Returns the sticker set

Sets a sticker set thumbnail; for bots only. Returns the sticker set

Thumbnail to set in PNG or TGS format. Animated thumbnail must be set for animated sticker sets and only for them. Pass a zero InputFileId to delete the thumbnail

Changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot

Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot 

Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded 

Identifier of a chat, in which the thumbnail will be shown. Use 0 if unknown

Succeeds after a specified amount of time has passed. Can be called before initialization 

Returns information about existing countries. Can be called before authorization

Uses current user IP address to find their country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization

Returns information about a phone number by its prefix. Can be called before authorization 

Returns the default text for invitation messages to be used as a placeholder when the current user invites friends to Telegram

Returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:some_unsupported_feature" for testing. Returns a 404 error for unknown links. Can be called before authorization 

Returns application config, provided by the server. Can be called before authorization

Saves application log event on the server. Can be called before authorization 

Adds a proxy server for network requests. Can be called before authorization 

Edits an existing proxy server for network requests. Can be called before authorization 

Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization 

Disables the currently enabled proxy. Can be called before authorization

Returns list of proxies that are currently set up. Can be called before authorization

Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization 

Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization 

Proxy identifier. Use 0 to ping a Telegram server without a proxy

Sets new log stream for internal logging of TDLib. Can be called synchronously 

Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously

Sets the verbosity level of the internal logging of TDLib. Can be called synchronously

New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging

Returns current verbosity level of the internal logging of TDLib. Can be called synchronously

Returns list of available TDLib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. Can be called synchronously

Sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously

Returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously 

Adds a message to TDLib internal log. Can be called synchronously

The minimum verbosity level needed for the message to be logged, 0-1023 

Does nothing; for testing only. This is an offline method. Can be called before authorization

Returns the received string; for testing only. This is an offline method. Can be called before authorization 

Returns the received bytes; for testing only. This is an offline method. Can be called before authorization 

Returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization 

Returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization 

Returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization 

Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization 

Returns the squared received number; for testing only. This is an offline method. Can be called before authorization 

Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization

Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization 

Forces an updates.getDifference call to the Telegram servers; for testing only

Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization

Returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously 