TDLib v0.0.2 API Reference
Modules
This module allow you to interact with and manage sessions
This module was generated using Telegram’s TDLib documentation. It contains 248 submodules (= structs)
Accepts an incoming call.
Returns object_ptr
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.
Returns object_ptr
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.
Returns object_ptr
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 object_ptr
Adds the specified data to data usage statistics. Can be called before authorization.
Returns object_ptr
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.
Returns object_ptr
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.
Returns object_ptr
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.
Returns object_ptr
Adds a new sticker to a set; for bots only. Returns the sticker set.
Returns object_ptr
Sets the result of a callback query; for bots only.
Returns object_ptr
Answers a custom query; for bots only.
Returns object_ptr
Sets the result of an inline query; for bots only.
Returns object_ptr
Sets the result of a pre-checkout query; for bots only.
Returns object_ptr
Sets the result of a shipping query; for bots only.
Returns object_ptr
Adds a user to the blacklist.
Returns object_ptr
Stops the downloading of a file. If a file has already been downloaded, does nothing.
Returns object_ptr
Stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined.
Returns object_ptr
Used to let the server know whether a chat is spam or not. Can be used only if ChatReportSpamState.can_report_spam is true. After this request, ChatReportSpamState.can_report_spam becomes false forever.
Returns object_ptr
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.
Returns object_ptr
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.
Returns object_ptr
Installs/uninstalls or activates/archives a sticker set.
Returns object_ptr
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.
Returns object_ptr
Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode.
Returns object_ptr
Checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword.
Returns object_ptr
Checks the authentication code sent to confirm a new phone number of the user.
Returns object_ptr
Checks the validity of an invite link for a chat and returns information about the corresponding chat.
Returns object_ptr
Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey.
Returns object_ptr
Clears all imported contacts.
Returns object_ptr
Clears the list of recently used stickers.
Returns object_ptr
Clears the list of recently found chats.
Returns object_ptr
Closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent.
Returns object_ptr
This method should be called if the chat is closed by the user. Many useful activities depend on the chat being opened or closed.
Returns object_ptr
Closes a secret chat, effectively transfering its state to secretChatStateClosed.
Returns object_ptr
Returns an existing chat corresponding to a known basic group.
Returns object_ptr
Creates a new call.
Returns object_ptr
Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat.
Returns object_ptr
Creates a new secret chat. Returns the newly created chat.
Returns object_ptr
Creates a new sticker set; for bots only. Returns the newly created sticker set.
Returns object_ptr
Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat.
Returns object_ptr
Returns an existing chat corresponding to a given user.
Returns object_ptr
Returns an existing chat corresponding to a known secret chat.
Returns object_ptr
Returns an existing chat corresponding to a known supergroup or channel.
Returns object_ptr
Creates a new temporary password for processing payments.
Returns object_ptr
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.
Returns object_ptr
Deletes all messages in the chat only for the user. Cannot be used in channels and public supergroups.
Returns object_ptr
Deletes all messages sent by the specified user to a chat. Supported only in supergroups; requires can_delete_messages administrator privileges.
Returns object_ptr
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.
Returns object_ptr
Deletes a file from the TDLib file cache.
Returns object_ptr
Deletes messages.
Returns object_ptr
Deletes a profile photo. If something changes, updateUser will be sent.
Returns object_ptr
Deletes saved credentials for all payment provider bots.
Returns object_ptr
Deletes saved order info.
Returns object_ptr
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 creator privileges in the supergroup or channel. Chats with more than 1000 members can’t be deleted using this method.
Returns object_ptr
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.
Returns object_ptr
Discards a call.
Returns object_ptr
Asynchronously downloads a file from the cloud. updateFile will be used to notify about the download progress and successful completion of the download. Returns file state just after the download has been started.
Returns object_ptr
Edits the caption of an inline message sent via a bot; for bots only.
Returns object_ptr
Edits the content of a live location in an inline message sent via a bot; for bots only.
Returns object_ptr
Edits the reply markup of an inline message sent via a bot; for bots only.
Returns object_ptr
Edits the text of an inline text or game message sent via a bot; for bots only.
Returns object_ptr
Edits the message content caption. Non-bots can edit messages for a limited period of time. Returns the edited message after the edit is completed server-side.
Returns object_ptr
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 server-side.
Returns object_ptr
Edits the message reply markup; for bots only. Returns the edited message after the edit is completed server-side.
Returns object_ptr
Edits the text of a message (or a text of a game message). Non-bot users can edit messages for a limited period of time. Returns the edited message after the edit is completed on the server side.
Returns object_ptr
Finishes the file generation.
Returns object_ptr
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.
Returns object_ptr
Generates a new invite link for a chat; the previously generated link is revoked. Available for basic groups, supergroups, and channels. In basic groups this can be called only by the group’s creator; in supergroups and channels this requires appropriate administrator rights.
Returns object_ptr
Returns the period of inactivity after which the account of the current user will automatically be deleted.
Returns object_ptr
Returns all active live locations that should be updated by the client. The list is persistent across application restarts only if the message database is used.
Returns object_ptr
Returns all active sessions of the current user.
Returns object_ptr
Returns a list of archived sticker sets.
Returns object_ptr
Returns a list of sticker sets attached to a file. Currently only photos and videos can have attached sticker sets.
Returns object_ptr
Returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state.
Returns object_ptr
Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot.
Returns object_ptr
Returns full information about a basic group by its identifier.
Returns object_ptr
Returns users that were blocked by the current user.
Returns object_ptr
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.
Returns object_ptr
Returns information about a chat by its identifier, this is an offline request if the current user is not a bot.
Returns object_ptr
Returns a list of users who are administrators of the chat.
Returns object_ptr
Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only in supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i. e., in order of decreasing event_id).
Returns object_ptr
Returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id). This is an offline request if only_local is true.
Returns object_ptr
Returns information about a single member of a chat.
Returns object_ptr
Returns the last message sent in a chat no later than the specified date.
Returns object_ptr
Returns information on whether the current chat can be reported as spam.
Returns object_ptr
Returns an ordered list of chats. Chats are sorted by the pair (order, chat_id) in decreasing order. (For example, to get a list of chats from the beginning, the offset_order should be equal to 2^63 - 1.)
Returns object_ptr
Returns a list of public chats created by the user.
Returns object_ptr
Returns favorite stickers.
Returns object_ptr
Returns information about a file; this is an offline request.
Returns object_ptr
Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. This is an offline method. May be called before authorization. Can be called synchronously.
Returns object_ptr
Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. This is an offline method. May be called before authorization. Can be called synchronously.
Returns object_ptr
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 object_ptr
Returns a list of common chats with a given user. Chats are sorted by their type and creation date.
Returns object_ptr
Returns the total number of imported contacts.
Returns object_ptr
Returns game high scores and some part of the high score table in the range of the specified user; for bots only.
Returns object_ptr
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.
Returns object_ptr
Returns a list of installed sticker sets.
Returns object_ptr
Returns the default text for invitation messages to be used as a placeholder when the current user invites friends to Telegram.
Returns object_ptr
Returns the current user.
Returns object_ptr
Returns information about a message.
Returns object_ptr
Returns information about messages. If a message is not found, returns null on the corresponding position of the result.
Returns object_ptr
Returns network data usage statistics. Can be called before authorization.
Returns object_ptr
Returns the notification settings for a given scope.
Returns object_ptr
Returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) This method can be called before authorization.
Returns object_ptr
Returns the current state of 2-step verification.
Returns object_ptr
Returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy.
Returns object_ptr
Returns information about a successful payment.
Returns object_ptr
Returns the proxy that is currently set up. Can be called before authorization.
Returns object_ptr
Returns a public HTTPS link to a message. Available only for messages in public supergroups and channels.
Returns object_ptr
Returns up to 20 recently used inline bots in the order of their last usage.
Returns object_ptr
Returns a list of recently used stickers.
Returns object_ptr
Returns t.me URLs recently visited by a newly registered user.
Returns object_ptr
Returns a recovery email address that was previously set up. This method can be used to verify a password provided by the user.
Returns object_ptr
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.
Returns object_ptr
Returns saved animations.
Returns object_ptr
Returns saved order info, if any.
Returns object_ptr
Returns information about a secret chat by its identifier. This is an offline request.
Returns object_ptr
Returns emoji corresponding to a sticker.
Returns object_ptr
Returns information about a sticker set by its identifier.
Returns object_ptr
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.
Returns object_ptr
Returns storage usage statistics.
Returns object_ptr
Quickly returns approximate storage usage statistics.
Returns object_ptr
Returns information about a supergroup or channel by its identifier. This is an offline request if the current user is not a bot.
Returns object_ptr
Returns full information about a supergroup or channel by its identifier, cached for up to 1 minute.
Returns object_ptr
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.
Returns object_ptr
Returns a user that can be contacted to get support.
Returns object_ptr
Returns information about the current temporary password.
Returns object_ptr
Returns the terms of service. Can be called before authorization.
Returns object_ptr
Returns all entities (mentions, hashtags, bot commands, URLs, and email addresses) contained in the text. This is an offline method. May be called before authorization. Can be called synchronously.
Returns object_ptr
Returns a list of frequently used chats. Supported only if the chat info database is enabled.
Returns object_ptr
Returns a list of trending sticker sets.
Returns object_ptr
Returns information about a user by their identifier. This is an offline request if the current user is not a bot.
Returns object_ptr
Returns full information about a user by their identifier.
Returns object_ptr
Returns the current privacy settings.
Returns object_ptr
Returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already.
Returns object_ptr
Returns background wallpapers.
Returns object_ptr
Returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page.
Returns object_ptr
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 object_ptr
Adds new contacts or edits existing contacts; contacts’ user identifiers are ignored.
Returns object_ptr
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.
Returns object_ptr
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.
Returns object_ptr
This method should be called if 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).
Returns object_ptr
This method should be called if 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.
Returns object_ptr
Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can’t be deleted.
Returns object_ptr
Parses Bold, Italic, Code, Pre, PreCode and TextUrl entities contained in the text. This is an offline method. May be called before authorization. Can be called synchronously.
Returns object_ptr
Pins a message in a supergroup or channel; requires appropriate administrator rights in the supergroup or channel.
Returns object_ptr
Handles a DC_UPDATE push service notification, can be called before authorization.
Returns object_ptr
Marks all mentions in a chat as read.
Returns object_ptr
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.
Returns object_ptr
Recovers the password using a recovery code sent to an email address that was previously set up.
Returns object_ptr
Registers the currently used device for receiving push notifications.
Returns object_ptr
Removes users from the contacts list.
Returns object_ptr
Removes a sticker from the list of favorite stickers.
Returns object_ptr
Removes a hashtag from the list of recently used hashtags.
Returns object_ptr
Removes a sticker from the list of recently used stickers.
Returns object_ptr
Removes a chat from the list of recently found chats.
Returns object_ptr
Removes an animation from the list of saved animations.
Returns object_ptr
Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot.
Returns object_ptr
Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled.
Returns object_ptr
Changes the order of installed sticker sets.
Returns object_ptr
Reports a chat to the Telegram moderators. Supported only for supergroups, channels, or private chats with bots, since other chats can’t be checked by moderators.
Returns object_ptr
Reports some messages from a user in a supergroup as spam.
Returns object_ptr
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.
Returns object_ptr
Requests to send a password recovery code to an email address that was previously set up.
Returns object_ptr
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.
Returns object_ptr
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.
Returns object_ptr
Resets all notification settings to their default values. By default, the only muted chats are supergroups, the sound is set to “default” and message previews are shown.
Returns object_ptr
Resets all network data usage statistics to zero. Can be called before authorization.
Returns object_ptr
Searches for call messages. Returns the results in reverse chronological order (i. e., in order of decreasing message_id).
Returns object_ptr
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.
Returns object_ptr
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.
Returns object_ptr
Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user.
Returns object_ptr
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 chat list.
Returns object_ptr
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 chat list.
Returns object_ptr
Searches for the specified query in the first names, last names and usernames of the known user contacts.
Returns object_ptr
Searches for recently used hashtags by their prefix.
Returns object_ptr
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)).
Returns object_ptr
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.
Returns object_ptr
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.
Returns object_ptr
Searches for messages in secret chats. Returns the results in reverse chronological order.
Returns object_ptr
Searches for a sticker set by its short name.
Returns object_ptr
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.
Returns object_ptr
Sends debug information for a call.
Returns object_ptr
Sends a call rating.
Returns object_ptr
Sends a notification about user activity in a chat.
Returns object_ptr
Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats.
Returns object_ptr
Changes the current TTL setting (sets a new self-destruct timer) in a secret chat and sends the corresponding message.
Returns object_ptr
Sends a custom request; for bots only.
Returns object_ptr
Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message.
Returns object_ptr
Sends a message. Returns the sent message.
Returns object_ptr
Sends messages grouped together into an album. Currently only photo and video messages can be grouped into an album. Returns sent messages.
Returns object_ptr
Sends a filled-out payment form to the bot for final verification.
Returns object_ptr
Changes the period of inactivity after which the account of the current user will automatically be deleted.
Returns object_ptr
Succeeds after a specified amount of time has passed. Can be called before authorization.
Returns object_ptr
Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber.
Returns object_ptr
Changes the bio of the current user.
Returns object_ptr
Informs the server about the number of pending bot updates if they haven’t been processed for a long time; for bots only.
Returns object_ptr
Changes client data associated with a chat.
Returns object_ptr
Changes the draft message in a chat.
Returns object_ptr
Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for adding new members to the chat; instead, use addChatMember. The chat member status will not be changed until it has been synchronized with the server.
Returns object_ptr
Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires administrator rights in basic groups and the appropriate administrator rights in supergroups and channels. The photo will not be changed before request to the server has been completed.
Returns object_ptr
Changes the chat title. Supported only for basic groups, supergroups and channels. Requires administrator rights in basic groups and the appropriate administrator rights in supergroups and channels. The title will not be changed until the request to the server has been completed.
Returns object_ptr
Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain.
Returns object_ptr
The next part of a file was generated.
Returns object_ptr
Updates the game score of the specified user in the game; for bots only.
Returns object_ptr
Updates the game score of the specified user in a game; for bots only.
Returns object_ptr
Changes the first and last name of the current user. If something changes, updateUser will be sent.
Returns object_ptr
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 object_ptr
Changes notification settings for a given scope.
Returns object_ptr
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. This method can be called before authorization.
Returns object_ptr
Changes the password for the user. If a new recovery email address is specified, then the error EMAIL_UNCONFIRMED is returned and the password change will not be applied until the new recovery email address has been confirmed. The application should periodically call getPasswordState to check whether the new email address has been confirmed.
Returns object_ptr
Changes the order of pinned chats.
Returns object_ptr
Uploads a new profile photo for the current user. If something changes, updateUser will be sent.
Returns object_ptr
Sets the proxy server for network requests. Can be called before authorization.
Returns object_ptr
Changes the recovery email address of the user. If a new recovery email address is specified, then the error EMAIL_UNCONFIRMED is returned and the email address will not be changed until the new email has been confirmed. The application should periodically call getPasswordState to check whether the email address has been 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.
Returns object_ptr
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.
Returns object_ptr
Changes information about a supergroup or channel; requires appropriate administrator rights.
Returns object_ptr
Changes the sticker set of a supergroup; requires appropriate rights in the supergroup.
Returns object_ptr
Changes the username of the supergroup or channel, requires creator privileges in the supergroup or channel.
Returns object_ptr
Sets the parameters for TDLib initialization.
Returns object_ptr
Changes user privacy settings.
Returns object_ptr
Changes the username of the current user. If something changes, updateUser will be sent.
Returns object_ptr
Terminates all other sessions of the current user.
Returns object_ptr
Terminates a session of the current user.
Returns object_ptr
Returns the received bytes; for testing only.
Returns object_ptr
Does nothing; for testing only.
Returns object_ptr
Returns the received string; for testing only.
Returns object_ptr
Returns the received vector of numbers; for testing only.
Returns object_ptr
Returns the received vector of objects containing a number; for testing only.
Returns object_ptr
For testing only request. Returns the received vector of strings; for testing only.
Returns object_ptr
Returns the received vector of objects containing a string; for testing only.
Returns object_ptr
Forces an updates.getDifference call to the Telegram servers; for testing only.
Returns object_ptr
Sends a simple network request to the Telegram servers; for testing only.
Returns object_ptr
Returns the squared received number; for testing only.
Returns object_ptr
Does nothing and ensures that the Error object is used; for testing only.
Returns object_ptr
Does nothing and ensures that the Update object is used; for testing only.
Returns object_ptr
Toggles the “All members are admins” setting in basic groups; requires creator privileges in the group.
Returns object_ptr
Changes the pinned state of a chat. You can pin up to GetOption(“pinned_chat_count_max”) non-secret chats and the same number of secret chats.
Returns object_ptr
Toggles whether all members of a supergroup can add new members; requires appropriate administrator rights in the supergroup.
Returns object_ptr
Toggles whether the message history of a supergroup is available to new members; requires appropriate administrator rights in the supergroup.
Returns object_ptr
Toggles sender signatures messages sent in a channel; requires appropriate administrator rights in the channel.
Returns object_ptr
Removes a user from the blacklist.
Returns object_ptr
Removes the pinned message from a supergroup or channel; requires appropriate administrator rights in the supergroup or channel.
Returns object_ptr
Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom. Deactivates the original basic group.
Returns object_ptr
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.
Returns object_ptr
Uploads a PNG image with a sticker; for bots only; returns the uploaded file.
Returns object_ptr
Validates the order information provided by a user and returns the available shipping options for a flexible invoice.
Returns object_ptr
This method should be called if 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).
Returns object_ptr
Informs the server that some trending sticker sets have been viewed by the user.
Returns object_ptr
This module was generated using Telegram’s TDLib documentation. It contains 536 submodules (= structs)
Contains information about the period of inactivity after which the current user’s account will automatically be deleted
Describes an animation file. The animation must be encoded in GIF or MPEG4 format
Represents a list of animations
Describes an audio file. Audio is usually in MP3 format
Information about the authentication code that was sent
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
An authentication code is delivered via an SMS message to the specified phone number
An authentication code is delivered via a private Telegram message, which can be viewed in another client
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
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
The user is currently logging out
The user has been successfully authorized. TDLib is now ready to answer queries
TDLib needs the user’s authentication code to finalize authorization
TDLib needs an encryption key to decrypt the local database
The user has been authorized, but needs to enter a password to start using the application
TDLib needs the user’s phone number to authorize
TDLib needs TdlibParameters for initialization
Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users)
Contains full information about a basic group
Represents commands supported by a bot
Provides information about a bot and its supported commands
Describes a call
Describes the address of UDP reflectors
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 wasn’t discarded, or the reason is unknown
The call was ended because one of the parties hung up
The call was ended before the conversation started. It was cancelled by the caller or missed by the other party
Contains the call identifier
Specifies the supported call protocols
The call has ended successfully
The call has ended with an error
The call has been answered and encryption keys are being exchanged
The call is hanging up after discardCall has been called
The call is pending, waiting to be accepted by a user
The call is ready to use
Contains a bot’s answer to a callback query
The payload from a general callback button
The payload from a game callback button
A chat. (Can be a private chat, basic group, supergroup, or secret chat.)
The user has cancelled the previous action
The user is picking a contact to send
The user is picking a location or venue to send
The user is recording a video
The user is recording a video note
The user is recording a voice note
The user has started to play a game
The user is typing a message
The user is uploading a document
The user is uploading a photo
The user is uploading a video
The user is uploading a video note
The user is uploading a voice note
Represents a chat event
The chat description was changed
The anyone_can_invite setting of a supergroup chat was toggled
The is_all_history_available setting of a supergroup was toggled
Represents a set of filters used to obtain a chat event log
A new chat member was invited
A new member joined the chat
A member left the chat
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
A message was deleted
A message was edited
A message was pinned
A message was unpinned
The chat photo was changed
The sign_messages setting of a channel was toggled
The supergroup sticker set was changed
The chat title was changed
The chat username was changed
Contains a list of chat events
Contains a chat invite link
Contains information about a chat invite link
A user with information about joining/leaving a chat
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
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
The user is the creator of a chat and has all the administrator privileges
The user is not a chat member
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
Contains a list of chat members
Describes the photo of a chat
A custom reason provided by the user
The chat contains pornographic messages
The chat contains spam messages
The chat promotes violence
Contains information about the availability of the “Report spam” action for a chat
A basic group (i.e., a chat with 0-200 other users)
An ordinary chat with a user
A secret chat with a user
A supergroup (i.e. a chat with up to GetOption(“supergroup_max_size”) other users), or channel (with unlimited members)
Represents a list of chats
Currently establishing a connection to the Telegram servers
Currently establishing a connection with a proxy server
There is a working connection to the Telegram servers
Downloading data received while the client was offline
Currently waiting for the network to become available. Use SetNetworkType to change the available network type
Describes a user contact
Contains a counter
Contains the result of a custom request
A token for Apple Push Notification Service
A token for Apple Push Notification Service VoIP notifications
A token for Blackberry Push Service
A token for Google Cloud Messaging
A token for Microsoft Push Notification Service
A token for Microsoft Push Notification Service VoIP channel
A token for Simple Push API for Firefox OS
A token for Tizen Push Service
A token for Ubuntu Push Client service
A token for web Push API
A token for Windows Push Notification Services
Describes a document of any type
Contains information about a message draft
An object of this type can be returned on every function call, in case of an error
Represents a file
The file is an animation
The file is an audio file
The file is a document
The data is not a file
The file is a photo
The file is a profile photo
The file was sent to a secret chat (the file type is not known to the server)
The file is a thumbnail of a file from a secret chat
The file is a sticker
The file is a thumbnail of another file
The file type is not yet known
The file is a video
The file is a video note
The file is a voice note
The file is a wallpaper
A text with some entities
Contains a list of messages found by a search
Describes a game
Contains one row of the game high score table
Contains a list of game high scores
Contains a list of hashtags
Represents the result of an ImportContacts request
Represents a single button in an inline keyboard
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
A button that sends a special callback query to a bot
A button with a game that sends a special 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 that opens a specified URL
Represents an animation file
Represents a link to an article or web page
Represents an audio file
Represents a user contact
Represents a document
Represents information about a game
Represents a point on the map
Represents a photo
Represents a sticker
Represents information about a venue
Represents a video
Represents a voice note
Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query
Applies if a user enters new credentials using Android Pay
Applies if a user enters new credentials using Apple Pay
Applies if a user enters new credentials on a payment provider website
Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password
A file generated by the client
A file defined by its unique ID
A file defined by a local path
A file defined by its remote ID
Represents a link to an animated GIF
Represents a link to an animated (i.e. without sound) H.264/MPEG-4 AVC video
Represents a link to an article or web page
Represents a link to an MP3 audio file
Represents a user contact
Represents a link to a file
Represents a game
Represents a point on the map
Represents link to a JPEG image
Represents a link to a WEBP sticker
Represents information about a venue
Represents a link to a page containing an embedded video player or a video file
Represents a link to an opus-encoded audio file within an OGG container, single channel audio
An animation message (GIF-style)
An audio message
A message containing a user contact
A document message (general file)
A forwarded message
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
A message with a location
A photo message
A sticker message
A text message
A message with information about a venue
A video message
A video note message
A voice note message
Describes a sticker that should be added to a sticker set
A thumbnail to be sent along with a file; should be in JPEG or WEBP format for stickers, and less than 200 kB in size
Product invoice
Represents a single button in a bot keyboard
A button that sends the user’s location when pressed; available only in private chats
A button that sends the user’s phone number when pressed; available only in private chats
A simple button, with text that should be sent when the button is pressed
Portion of the price of a product (e.g., “delivery cost”, “tax amount”)
The phone number of user A has been saved to the contacts list of user B
The phone number of user A is known but that number has not been saved to the contacts list of user B
The phone number of user A is not known to user B
Represents a local file
Describes a location on planet Earth
A mask should be placed relatively to the chin
A mask should be placed relatively to the eyes
A mask should be placed relatively to the forehead
A mask should be placed relatively to the mouth
Position on a photo where a mask should be placed
Describes a message
An animation message (GIF-style)
An audio message
A newly created basic group
A message with information about an ended call
New chat members were added
An updated chat photo
An updated chat title
A chat member was deleted
A deleted chat photo
A new member joined the chat by invite link
The TTL (Time To Live) setting messages in a secret chat has been changed
A supergroup has been created from a basic group
A basic group was upgraded to a supergroup and was deactivated as the result
A message with a user contact
A contact has registered with Telegram
A non-standard action has happened in the chat
A document message (general file)
An expired photo message (self-destructed after TTL has elapsed)
An expired video message (self-destructed after TTL has elapsed)
The message was originally written by a known user
The message was originally a post in a channel
A message with a game
A new high score was achieved in a game
A message with an invoice from a bot
A message with a location
A payment has been completed
A payment has been completed; for bots only
A photo message
A message has been pinned
A screenshot of a message in the chat has been taken
The message failed to be sent
The message is being sent now, but has not yet been delivered to the server
A sticker message
A newly created supergroup or channel
A text message
Message content that is not supported by the client
A message with information about a venue
A video message
A video note message
A voice note message
Contains a list of messages
A full list of available network statistic entries
Contains information about the total amount of data that was used for calls
Contains information about the total amount of data that was used to send and receive files
A mobile network
A mobile roaming network
The network is not available
A different network type (e.g., Ethernet network)
A Wi-Fi network
Contains information about notification settings for a chat or several chats
Notification settings applied to all chats
Notification settings applied to all basic groups and channels. (Supergroups have no common settings.)
Notification settings applied to a particular chat
Notification settings applied to all private chats
An object of this type is returned on a successful function call for certain functions
Boolean option
An unknown option or an option which has a default value
An integer option
A string option
Order information
An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor
An animation
An audio file
The author and publishing date of a page
A block quote
A link to a chat
A collage
A page cover
An empty block separating a page
An embedded web page
An embedded post
The footer of a page
A header
A list of texts
A text paragraph
A photo
A preformatted text paragraph
A pull quote
A slideshow
A subheader
The subtitle of a page
The title of a page
A video
Contains information available to the user after requesting password recovery
Represents the current state of 2-step verification
Contains information about an invoice payment form
Contains information about a successful payment
Contains the result of a payment request
Stripe payment provider
Describes a photo
Photo description
Describes a user profile photo
An empty proxy server
A SOCKS5 proxy server
Contains a public HTTPS link to a message in a public supergroup or channel
Contains information about the current recovery email address
Represents a remote file
Instructs clients to force a reply to this message
Contains an inline keyboard layout
Instructs clients 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
Contains a custom keyboard layout to quickly reply to bots
A bold rich text
A rich text email link
A fixed-width rich text
An italicized rich text
A plain text
A strike-through rich text
An underlined rich text
A rich text URL link
A concatenation of rich texts
Contains information about saved card credentials
Returns only animation messages
Returns only audio messages
Returns only call messages
Returns only messages containing chat photos
Returns only document messages
Returns all found messages, no filter is applied
Returns only messages with mentions of the current user, or messages that are replies to their messages
Returns only incoming call messages with missed/declined discard reasons
Returns only photo messages
Returns only photo and video 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 or by the sending user
Returns only messages containing URLs
Returns only video messages
Returns only video note messages
Returns only voice and video note messages
Returns only voice note messages
Represents a secret chat
The secret chat is closed
The secret chat is not yet created; waiting for the other user to get online
The secret chat is ready to use
Contains information about one session in a Telegram application used by the current user
Contains a list of sessions
Describes a shipping address
One shipping option
Describes a sticker
Represents a list of all emoji corresponding to a sticker in a sticker set. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object
Represents a sticker set
Represents short information about a sticker set
Represents a list of sticker sets
Represents a list of stickers
Contains the exact storage usage statistics split by chats and file type
Contains the storage usage statistics for a specific chat
Contains the storage usage statistics for a specific file type
Contains approximate storage usage statistics, excluding files of unknown file type
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
Contains full information about a supergroup or channel
Returns the creator and administrators
Returns users banned from the supergroup or channel; can be used only by administrators
Returns bot members of the supergroup or channel
Returns recently active users in reverse chronological order
Returns restricted supergroup members; can be used only by administrators
Used to search for supergroup or channel members via a (string) query
Represents a URL linking to an internal Telegram entity
A chat invite link
A URL linking to a sticker set
A URL linking to a public supergroup or channel
A URL linking to a user
Contains a list of t.me URLs
Contains parameters for TDLib initialization
Returns information about the availability of a temporary password, which can be used for payments
A simple object containing a sequence of bytes; for testing only
A simple object containing a number; for testing only
A simple object containing a string; 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
Contains some text
Contains a list of text entities
Represents a part of the text that needs to be formatted in some unusual way
A bold text
A bot command, beginning with “/“. This shouldn’t be highlighted if there are no bots in the chat
Text that must be formatted as if inside a code HTML tag
An email address
A hashtag text, beginning with “#”
An italic text
A mention of a user by their username
A text shows instead of a raw mention of the user (e.g., when the user has no username)
Text that must be formatted as if inside a pre HTML tag
Text that must be formatted as if inside pre, and code HTML tags
A text description shown instead of a raw URL
An HTTP URL
The text should be parsed in HTML-style
The text should be parsed in markdown-style
A category containing frequently used private chats with bot users
A category containing frequently used chats used for calls
A category containing frequently used channels
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 private chats with non-bot users
The user authorization state has changed
Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the client
Some data from basicGroupFullInfo has been changed
New call was created or information about a call was updated
A 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
A chat was pinned or unpinned
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 order of the chat in the chats list has changed. Instead of this update updateChatLastMessage, updateChatIsPinned or updateChatDraftMessage might be sent
A chat photo was changed
Incoming messages were read
Outgoing messages were read
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
The title of a chat was changed
The chat unread_mention_count has changed
The connection state has changed
Some messages were deleted
The list of favorite stickers was updated
Information about a file was updated
The file generation process needs to be started by the client
File generation is no longer needed
The list of installed sticker sets was updated
The message content has changed
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 was edited. Changes in the message content will come in a separate updateMessageContent
A message with an unread mention was read
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
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 has been successfully sent
The view count of the message has changed
A new incoming callback query; for bots only
A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the client. The chat field changes will be reported through separate updates
The user has chosen a result of an inline query; for bots only
A new incoming event; for bots only
A new incoming query; for bots only
A new incoming callback query from a message sent via a bot; for bots only
A new incoming inline query; for bots only
A new message was received; can also be an outgoing message
A new incoming pre-checkout query; for bots only. Contains full information about a checkout
A new incoming shipping query; for bots only. Only for invoices with flexible price
Notification settings for some chats were updated
An option changed its value
The list of recently used stickers was updated
The list of saved animations was updated
Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the client
Service notification from the server. Upon receiving this the client must show a popup with the content of the notification
Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the client
Some data from supergroupFullInfo has been changed
The list of trending sticker sets was updated or some of them were viewed
Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the client
User activity in the chat has changed
Some data from userFullInfo has been changed
Some privacy setting rules have been changed
The user went online or offline
Represents a user
Contains full information about a user (except the full list of profile photos)
A privacy setting for managing whether the user can be called
A privacy setting for managing whether the user can be invited to chats
A rule to allow all users to do something
A rule to allow all of a user’s contacts to do something
A rule to allow certain specified users to do something
A rule to restrict all users from doing something
A rule to restrict all contacts of a user from doing something
A rule to restrict all specified users 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
Contains part of the list of user photos
The user status was never changed
The user is offline, but was online last month
The user is offline, but was online last week
The user is offline
The user is online
The user was online recently
A bot (see https://core.telegram.org/bots)
A deleted user or deleted bot. No information on the user besides the user_id is available. It is not possible to perform any active actions on this type of user
A regular user
No information on the user besides the user_id 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
Represents a list of users
Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options
Describes a venue
Describes a video file
Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format
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
Contains information about a wallpaper
Contains a list of wallpapers
Describes a web page preview
Describes an instant view page for a web page