Module tdlib_rs::functions

source ·

Functions§

  • Accepts an incoming call
  • Accepts Telegram terms of services
  • Activates stealth mode for stories, which hides all views of stories from the current user in the last “story_stealth_mode_past_period” seconds and for the next “story_stealth_mode_future_period” seconds; for Telegram Premium users only
  • Adds server-provided application changelog as messages to the chat 777000 (Telegram) or as a stories; for official applications only. Returns a 404 error if nothing changed
  • Adds a chat folder by an invite link
  • Adds a new member to a chat. Members can’t be added to private or secret chats
  • Adds multiple new members to a chat. Currently, this method is only available for supergroups and channels. This method can’t be used to join a chat. Members can’t be added to a channel if it has more than 200 members
  • 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
  • Adds a user to the contact list or edits an existing contact by their user identifier
  • Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization
  • 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. Emoji stickers can’t be added to favorite stickers
  • Adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent from download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file
  • 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
  • Adds a message to TDLib internal log. Can be called synchronously
  • Adds a reaction to a message. Use getMessageAvailableReactions to receive the list of available reactions for the message
  • Adds the specified data to data usage statistics. Can be called before authorization
  • Adds a proxy server for network requests. Can be called before authorization
  • 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. Emoji stickers can’t be added to recent stickers
  • 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
  • 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
  • Adds a new notification sound to the list of saved notification sounds. The new notification sound is added to the top of the list. If it is already in the list, its position isn’t changed
  • Adds a new sticker to a set; for bots only
  • Allows the specified bot to send messages to the user
  • Sets the result of a callback query; for bots only
  • Answers a custom query; for bots only
  • Sets the result of an inline query; for bots only
  • Sets the result of a pre-checkout query; for bots only
  • Sets the result of a shipping query; for bots only
  • Sets the result of interaction with a Web App and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only
  • Informs server about a purchase through App Store. For official applications only
  • Informs server about a purchase through Google Play. For official applications only
  • Bans a member in a chat. Members can’t be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first
  • Blocks an original sender of a message in the Replies chat
  • Boosts a chat
  • Checks whether the current user can boost a chat
  • Checks whether the specified bot can send messages to the user. Returns a 404 error if can’t and the access can be granted by call to allowBotToSendMessages
  • Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase
  • Checks whether the current user can send a story on behalf of a chat; requires can_post_stories rights for channel chats
  • Checks whether the current session can be used to transfer a chat ownership to another user
  • Stops the downloading of a file. If a file has already been downloaded, does nothing
  • Cancels reset of 2-step verification password. The method can be called if passwordState.pending_reset_date > 0
  • Stops the preliminary uploading of a file. Supported only for files uploaded by using preliminaryUploadFile. For other files the behavior is undefined
  • Changes imported contacts using the list of 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
  • Changes the phone number of the user and sends an authentication code to the user’s new phone number; for official Android and iOS applications only. On success, returns information about the sent code
  • Installs/uninstalls or activates/archives a sticker set
  • 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
  • Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode
  • Checks the authentication of a email address. Works only when the current authorization state is authorizationStateWaitEmailCode
  • Checks the 2-step verification password for correctness. Works only when the current authorization state is authorizationStateWaitPassword
  • Checks whether a 2-step verification password recovery code sent to an email address is valid. Works only when the current authorization state is authorizationStateWaitPassword
  • Checks the authentication code sent to confirm a new phone number of the user
  • Checks the validity of an invite link for a chat folder and returns information about the corresponding chat folder
  • Checks the validity of an invite link for a chat and returns information about the corresponding chat
  • Checks whether a username can be set for a chat
  • Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. The limit can be increased with Telegram Premium
  • Checks the email address verification code for Telegram Passport
  • Checks the login email address authentication
  • Checks whether a 2-step verification password recovery code sent to an email address is valid
  • Checks phone number confirmation code
  • Checks the phone number verification code for Telegram Passport
  • Checks the 2-step verification recovery email address verification code
  • Checks whether a name can be used for a new sticker set
  • 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
  • Clears message drafts in all chats
  • Clears the list of all autosave settings exceptions. The method is guaranteed to work only after at least one call to getAutosaveSettings
  • Clears all imported contacts, contact list remains unchanged
  • Clears the list of recently used emoji statuses
  • Clears the list of recently used reactions
  • Clears the list of recently used stickers
  • Clears the list of recently found chats
  • Informs TDLib that a message with an animated emoji was clicked by the user. Returns a big animated sticker to be played or a 404 error if usual animation needs to be played
  • Informs TDLib that the user opened the sponsored chat via the button, the name, the photo, or a mention in the sponsored message
  • Informs TDLib that the user clicked Premium subscription button on the Premium features screen
  • 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
  • Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed
  • Closes a secret chat, effectively transferring its state to secretChatStateClosed
  • Informs TDLib that a story is closed by the user
  • Informs TDLib that a previously opened Web App was closed
  • Confirms QR code authentication on another device. Returns created session on success
  • Confirms an unconfirmed session of the current user from another device
  • Returns an existing chat corresponding to a known basic group
  • Creates a new call
  • Creates new chat folder. Returns information about the created chat folder. There can be up to getOption(“chat_folder_count_max”) chat folders, but the limit can be increased with Telegram Premium
  • Creates a new invite link for a chat folder. A link can be created for a chat folder if it has only pinned and included chats
  • Creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat
  • Creates a topic in a forum supergroup chat; requires can_manage_topics rights in the supergroup
  • Creates a link for the given invoice; for bots only
  • Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat
  • Creates a new secret chat. Returns the newly created chat
  • Creates a new sticker set. Returns the newly created sticker set
  • Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat
  • Returns an existing chat corresponding to a given user
  • Returns an existing chat corresponding to a known secret chat
  • Returns an existing chat corresponding to a known supergroup or channel
  • Creates a new temporary password for processing payments
  • Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats rights
  • 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
  • Deletes all call messages
  • Deletes all revoked chat invite links created by a given chat administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links
  • Deletes a chat along with all messages in the corresponding chat for all chat members. For group chats this will release the usernames and remove all members. Use the field chat.can_be_deleted_for_all_users to find whether the method can be applied to the chat
  • Deletes existing chat folder
  • Deletes an invite link for a chat folder
  • 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
  • Deletes all messages between the specified dates in a chat. Supported only for private chats and basic groups. Messages sent in the last 30 seconds will not be deleted
  • Deletes all messages sent by the specified message sender in a chat. Supported only for supergroups; requires can_delete_messages administrator privileges
  • Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a replyMarkupForceReply reply markup has been used. An updateChatReplyMarkup update will be sent if the reply markup is changed
  • Deletes commands supported by the bot for the given user scope and language; for bots only
  • Deletes a file from the TDLib file cache
  • Deletes all messages in a forum topic; requires can_delete_messages administrator right in the supergroup unless the user is creator of the topic, the topic has no messages from other users and has at most 11 messages
  • 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
  • Deletes messages
  • Deletes a Telegram Passport element
  • Deletes a profile photo
  • Deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links
  • Deletes saved credentials for all payment provider bots
  • Deletes saved order information
  • Deleted a sticker set; for bots only
  • Deletes a previously sent story. Can be called only if story.can_be_deleted == true
  • 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
  • Disables all active non-editable usernames of a supergroup or channel, requires owner privileges in the supergroup or channel
  • Disables the currently enabled proxy. Can be called before authorization
  • Discards a call
  • Disconnects all websites from the current user’s Telegram account
  • Disconnects website from the current user’s Telegram account
  • Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates
  • Edits existing chat folder. Returns information about the edited chat folder
  • Edits an invite link for a chat folder
  • Edits a non-primary invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links
  • Edits information about a custom local language pack in the current localization target. Can be called before authorization
  • Edits title and icon of a topic in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup unless the user is creator of the topic
  • Edits the caption of an inline 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 reply markup of an inline message sent via a bot; for bots only
  • Edits the text of an inline text or game message sent via a bot; for bots only
  • Edits the message content caption. Returns the edited message after the edit is completed on the server side
  • 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
  • Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The media can’t be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can’t be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side
  • Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side
  • 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
  • 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
  • Edits an existing proxy server for network requests. Can be called before authorization
  • Changes content and caption of a story. Can be called only if story.can_be_edited == true
  • Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization
  • Ends a group call. Requires groupCall.can_be_managed
  • Ends recording of an active group call. Requires groupCall.can_be_managed group call flag
  • Ends screen sharing in a joined group call
  • Finishes the file generation
  • 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 the period of inactivity after which the account of the current user will automatically be deleted
  • Returns all active live locations that need to be updated by the application. The list is persistent across application restarts only if the message database is used
  • Returns all active sessions of the current user
  • Returns all available Telegram Passport elements
  • Returns unique emoji that correspond to stickers to be found by the getStickers(sticker_type, query, 1000000, chat_id)
  • Returns an animated emoji corresponding to a given emoji. Returns a 404 error if the emoji has no animated emoji
  • Returns application config, provided by the server. Can be called before authorization
  • Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram
  • Returns settings for automatic moving of chats to and from the Archive chat lists
  • Returns a list of archived sticker sets
  • Returns a list of sticker sets attached to a file, including regular, mask, and emoji sticker sets. Currently, only animations, photos, and videos can have attached sticker sets
  • Returns information about a bot that can be added to attachment or side menu
  • 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
  • Returns auto-download settings presets for the current user
  • Returns autosave settings for the current user
  • Constructs a persistent HTTP URL for a background
  • Returns backgrounds installed by the user
  • Returns information about a bank card
  • Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot
  • Returns full information about a basic group by its identifier
  • Returns users and chats that were blocked by the current user
  • Returns the text shown in the chat with a bot if the chat is empty in the given language. Can be called only if userTypeBot.can_be_edited == true
  • Returns the text shown on a bot’s profile page and sent together with the link when users share the bot in the given language. Can be called only if userTypeBot.can_be_edited == true
  • Returns the name of a bot in the given language. Can be called only if userTypeBot.can_be_edited == true
  • 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 information about a message with the callback button that originated a callback query; for bots only
  • Returns information about a chat by its identifier; this is an offline request if the current user is not a bot
  • Returns the list of active stories posted by the given chat
  • Returns a list of administrators of the chat with their custom titles
  • Returns the list of all stories posted by the given chat; requires can_edit_stories rights for channel chats. The stories are returned in a reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib
  • Returns list of message sender identifiers, which can be used to send messages in a chat
  • Returns an HTTPS link to boost the specified channel chat
  • Returns information about a link to boost a chat. Can be called for any internal link of the type internalLinkTypeChatBoost
  • Returns the current boost status for a channel chat
  • Returns list of boosts applied to a chat. The user must be an administrator in the channel chat to get the list of boosts
  • 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)
  • Returns information about a chat folder by its identifier
  • Returns approximate number of chats in a being created chat folder. Main and archive chat lists must be fully preloaded for this function to work correctly
  • Returns identifiers of pinned or always included chats from a chat folder, which are suggested to be left when the chat folder is deleted
  • Returns default icon name for a folder. Can be called synchronously
  • Returns invite links created by the current user for a shareable chat folder
  • Returns new chats added to a shareable chat folder by its owner. The method must be called at most once in getOption(“chat_folder_new_chats_update_period”) for the given chat folder
  • 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 TDLib. This is an offline request if only_local is true
  • Returns information about an invite link. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links
  • Returns list of chat administrators with number of their invite links. Requires owner privileges in the chat
  • Returns chat members joined a chat via an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links
  • Returns invite links for a chat created by specified administrator. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links
  • Returns pending join requests in a chat
  • Returns chat lists to which the chat can be added. This is an offline request
  • Returns information about a single member of a chat
  • Returns the last message sent in a chat no later than the specified date
  • Returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day. Behavior of this method depends on the value of the option “utc_time_offset”
  • Returns approximate number of messages of the specified type in the chat
  • Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat. Cannot be used in secret chats
  • Returns list of chats with non-default notification settings for new messages
  • Returns information about a newest pinned message in the chat
  • Returns the list of pinned stories posted by the given chat. The stories are returned in a reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib
  • 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 sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing message_id). Cannot be used in secret chats or with searchMessagesFilterFailedToSend filter without an enabled message database
  • Returns sponsored messages to be shown in a chat; for channel chats only
  • 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 an ordered list of chats from the beginning of a chat list. For informational purposes only. Use loadChats and updates processing instead to maintain chat lists in a consistent state
  • Returns identifiers of chats from a chat folder, suitable for adding to a chat folder invite link
  • Returns channel chats in which the current user has the right to post stories. The chats must be rechecked with canSendStory before actually trying to post a story there
  • Returns all close friends of the current user
  • Returns list of commands supported by the bot for the given user scope and language; for bots only
  • Returns all website where the current user used Telegram to log in
  • Returns all contacts of the user
  • Returns information about existing countries. Can be called before authorization
  • Uses the current IP address to find the current country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization
  • Returns a list of public chats of the specified type, owned by the user
  • 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
  • Returns TGS stickers with generic animations for custom emoji reactions
  • Returns list of custom emoji stickers by their identifiers. Stickers are returned in arbitrary order. Only found stickers are returned
  • Returns database statistics
  • 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 default list of custom emoji stickers for placing on a chat photo
  • Returns default emoji statuses
  • Returns default message auto-delete time setting for new chats
  • Returns default list of custom emoji stickers for placing on a profile photo
  • Returns available emojis categories
  • Returns information about a emoji reaction. Returns a 404 error if the reaction is not found
  • 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
  • Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed
  • Returns information about an action to be done when the current user clicks an external link. Don’t use this method for links from secret chats if web page preview is disabled in secret chats
  • Returns favorite stickers
  • Returns information about a file; this is an offline request
  • Returns file downloaded prefix size from a given offset, in bytes
  • Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. 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 information about a forum topic
  • Returns list of custom emojis, which can be used as forum topic icon by all users
  • Returns an HTTPS link to a topic in a forum chat. This is an offline request
  • Returns found forum topics in a forum chat. This is a temporary method for getting information about topic list from the server
  • 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 information about a group call
  • Returns invite link to a video chat in a public chat
  • Returns a file with a segment of a group call stream in a modified OGG format for audio or MPEG-4 format for video
  • Returns information about available group call streams
  • Returns a list of common group chats with a given user. Chats are sorted by their type and creation date
  • Returns the total number of imported contacts
  • 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. Also, the limit can be increased with Telegram Premium
  • Returns game high scores and some part of the high score table in the range of the specified user; for bots only
  • 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 a list of installed sticker sets
  • Returns an HTTPS or a tg: link with the given type. Can be called before authorization
  • Returns information about the type of an internal link. Returns a 404 error if the link is not internal. Can be called before authorization
  • Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously
  • Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously
  • Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization
  • 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
  • Returns strings from a language pack in the current localization target by their keys. Can be called before authorization
  • Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization
  • Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously
  • Returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously
  • Returns list of available TDLib internal log tags, for example, [“actor”, “binlog”, “connections”, “notifications”, “proxy”]. Can be called synchronously
  • Returns current verbosity level of the internal logging of TDLib. Can be called synchronously
  • 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
  • Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button
  • Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded
  • 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 current user
  • Returns menu button set by the bot for the given user; for bots only
  • Returns information about a message
  • Returns reactions added for a message, along with their sender
  • Returns reactions, which can be added to a message. The list can change after updateActiveEmojiReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message
  • Returns an HTML code for embedding the message. Available only for messages in supergroups and channels with a username
  • Returns information about a file with messages exported from another application
  • Returns a confirmation text to be shown to the user before starting message import
  • Returns an HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels, or if message.can_get_media_timestamp_links and a media timestamp link is generated. This is an offline request
  • Returns information about a public or private message link. Can be called for any internal link of the type internalLinkTypeMessage
  • Returns information about a message, if it is available without sending network request. This is an offline request
  • Returns forwarded copies of a channel message to different public channels. For optimal performance, the number of returned messages is chosen by TDLib
  • Returns detailed statistics about a message. Can be used only if message.can_get_statistics == true
  • Returns information about a message thread. Can be used only if message.can_get_message_thread == true
  • 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 TDLib
  • Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if message.can_get_viewers == true
  • Returns information about messages. If a message is not found, returns null on the corresponding position of the result
  • Returns network data usage statistics. Can be called before authorization
  • 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. Can be called synchronously for options “version” and “commit_hash”
  • 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
  • Returns one of the available Telegram Passport elements
  • Returns the current state of 2-step verification
  • Returns an invoice payment form. This method must be called when the user presses inline button of the type inlineKeyboardButtonTypeBuy
  • Returns information about a successful payment
  • Returns information about a phone number by its prefix. Can be called before authorization
  • Returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing localization to the specified language if properly localized country information is expected. Can be called synchronously
  • Returns message senders voted for the specified option in a non-anonymous polls. For optimal performance, the number of returned users is chosen by TDLib
  • Returns an IETF language tag of the language preferred in the country, which must be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown
  • Returns information about features, available to Premium users
  • Returns information about a limit, increased for Premium users. Returns a 404 error if the limit is unknown
  • Returns state of Telegram Premium subscription and promotion videos for Premium features
  • Returns examples of premium stickers for demonstration purposes
  • Returns premium stickers from regular sticker sets
  • 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
  • Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously
  • Returns recent emoji statuses
  • Returns up to 20 recently used inline bots in the order of their last usage
  • Returns a list of recently used stickers
  • Returns recently opened chats; this is an offline request. Returns chats in the order of last opening
  • Returns t.me URLs recently visited by a newly registered user
  • Returns recommended chat folders for the current user
  • 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
  • Returns information about a file by its remote identifier; 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. 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
  • Returns information about a message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground and topic messages without replied message respectively
  • Returns saved animations
  • Returns saved notification sound by its identifier. Returns a 404 error if there is no saved notification sound with the specified identifier
  • Returns list of saved notification sounds. If a sound isn’t in the list, then default sound needs to be used
  • Returns saved order information. Returns a 404 error if there is no saved order information
  • Returns the notification settings for chats of a given type
  • Returns information about a secret chat by its identifier. This is an offline request
  • Loads an asynchronous or a zoomed in statistical graph
  • 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
  • Returns information about a sticker set by its identifier
  • Returns stickers from the installed sticker sets that correspond to any of the given emoji or can be found by sticker-specific keywords. If the query is non-empty, then favorite, recently used or trending stickers may also be returned
  • Returns storage usage statistics. Can be called before authorization
  • Quickly returns approximate storage usage statistics. Can be called before authorization
  • Returns a story
  • Returns reactions, which can be chosen for a story
  • Returns list of chats with non-default notification settings for stories
  • Returns viewers of a story. The method can be called only for stories posted on behalf of the current user
  • Returns suggested name for saving a file in a given directory
  • Returns a suggested name for a new sticker set with a given title
  • 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 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 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 localized name of the Telegram support user; for Telegram support only
  • Returns a user that can be contacted to get support
  • Returns information about the current temporary password
  • Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) found in the text. Can be called synchronously
  • Converts a themeParameters object to corresponding JSON-serialized string. Can be called synchronously
  • Returns up to 8 emoji statuses, which must be shown right after the default Premium Badge in the emoji status list
  • Returns a list of frequently used chats
  • Returns a list of trending sticker sets. For optimal performance, the number of returned sticker sets is chosen by TDLib
  • Returns information about a user by their identifier. This is an offline request if the current user is not a bot
  • Returns full information about a user by their identifier
  • Returns an HTTPS link, which can be used to get information about the current user
  • Returns the current privacy settings
  • Returns the profile photos of a user. Personal and public photo aren’t returned
  • Returns support information for the given user; for Telegram support only
  • Returns list of participant identifiers, on whose behalf a video chat in the chat can be joined
  • Returns RTMP URL for streaming to the chat; requires creator privileges
  • Returns an HTTPS URL of a Web App to open after a link of the type internalLinkTypeWebApp is clicked
  • Returns an HTTPS URL of a Web App to open from the side menu, a keyboardButtonTypeWebApp button, an inlineQueryResultsButtonTypeWebApp button, or an internalLinkTypeSideMenuBot link
  • 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 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
  • Hides a suggested action
  • Adds new contacts or edits existing contacts by their phone numbers; contacts’ user identifiers are ignored
  • Imports messages exported from another app
  • Invites users to an active group call. Sends a service message of type messageInviteVideoChatParticipants for video chats
  • Adds the current user as a new member to a chat. Private and secret chats can’t be joined using this method. May return an error with a message “INVITE_REQUEST_SENT” if only a join request was created
  • Uses an invite link to add the current user to the chat if possible. May return an error with a message “INVITE_REQUEST_SENT” if only a join request was created
  • Joins an active group call. Returns join response payload for tgcalls
  • Removes the current user from chat members. Private and secret chats can’t be left using this method
  • Leaves a group call
  • Loads more active stories from a story list. The loaded stories will be sent through updates. Active stories are sorted by the pair (active_stories.order, active_stories.story_sender_chat_id) in descending order. Returns a 404 error if all active stories have been loaded
  • Loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded
  • Loads more participants of a group call. The loaded participants will be received through updates. Use the field groupCall.loaded_all_participants to check whether all participants have already been loaded
  • 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
  • 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 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
  • Informs TDLib that a story is opened and is being viewed by the user
  • Informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. For each bot, a confirmation alert about data sent to the bot must be shown once
  • Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can’t be deleted
  • Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously
  • Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called synchronously
  • Pins a message in a chat; requires can_pin_messages rights or can_edit_messages rights in the channel
  • Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization
  • Preliminary uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes. Updates 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
  • Process new chats added to a shareable chat folder by its owner
  • Handles a pending join request in a chat
  • Handles all pending join requests for a given link in a chat
  • 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
  • Rates recognized speech in a video note or a voice note message
  • Marks all mentions in a chat as read
  • Marks all reactions in a chat or a forum topic as read
  • Marks all mentions in a forum topic as read
  • Marks all reactions in a forum topic as read
  • Traverse all chats in a chat list and marks all messages in the chats as read
  • 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
  • Recognizes speech in a video note or a voice note message. The message must be successfully sent and must not be scheduled. May return an error with a message “MSG_VOICE_TOO_LONG” if media duration is too big to be recognized
  • Recovers the 2-step verification 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
  • Recovers the 2-step verification password using a recovery code sent to an email address that was previously set up
  • Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription
  • Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration
  • Removes all files from the file download list
  • Removes background from the list of installed backgrounds
  • Removes a chat action bar without any other action
  • Removes users from the contact list
  • Removes a sticker from the list of favorite stickers
  • Removes a file from the file download list
  • Removes a reaction from a message. A chosen reaction can always be removed
  • Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user
  • Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user
  • Removes a proxy server. Can be called before authorization
  • Removes a hashtag from the list of recently used hashtags
  • Removes a sticker from the list of recently used stickers
  • Removes a chat from the list of recently found chats
  • Removes an animation from the list of saved animations
  • Removes a notification sound from the list of saved notification sounds
  • Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot
  • Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled
  • Changes order of active usernames of the current user
  • Changes order of active usernames of a bot. Can be called only if userTypeBot.can_be_edited == true
  • Changes the order of chat folders
  • Changes the order of installed sticker sets
  • Changes order of active usernames of a supergroup or channel, requires owner privileges in the supergroup or channel
  • Replaces current primary invite link for a chat with a new primary invite link. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right
  • Replaces the current RTMP URL for streaming to the chat; requires creator privileges
  • Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported
  • Reports a chat photo to the Telegram moderators. A chat photo can be reported only if chat.can_be_reported
  • Reports reactions set on a message to the Telegram moderators. Reactions on a message can be reported only if message.can_report_reactions
  • Reports a story to the Telegram moderators
  • Reports a false deletion of a message by aggressive anti-spam checks; requires administrator rights in the supergroup. Can be called only for messages from chatEventMessageDeleted with can_report_anti_spam_false_positive == true
  • Reports messages in a supergroup as spam; requires administrator rights in the supergroup
  • Requests to send a 2-step verification password recovery code to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword
  • Requests to send a 2-step verification password recovery code to an email address that was previously set up
  • Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
  • Resends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified timeout has passed, or when the current authorization state is authorizationStateWaitEmailCode
  • Resends the authentication code sent to confirm a new phone number for the current user. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed
  • Resends the code to verify an email address to be added to a user’s Telegram Passport
  • Resends the login email address verification code
  • 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
  • Resends phone number confirmation code
  • Resends the code to verify a phone number to be added to a user’s Telegram Passport
  • Resends the 2-step verification recovery email address verification code
  • Resets all notification settings to their default values. By default, all chats are unmuted and message previews are shown
  • Resets the login email address. May return an error with a message “TASK_ALREADY_EXISTS” if reset is still pending. Works only when the current authorization state is authorizationStateWaitEmailCode and authorization_state.can_reset_email_address == true
  • Resets list of installed backgrounds to its default value
  • Resets all network data usage statistics to zero. Can be called before authorization
  • Removes 2-step verification password without previous password and access to recovery email address. The password can’t be reset immediately and the request needs to be repeated after the specified time
  • Revokes invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links. If a primary link is revoked, then additionally to the revoked link returns new primary link
  • Revokes invite link for a group call. Requires groupCall.can_be_managed group call flag
  • Saves application log event on the server. Can be called before authorization
  • Searches for a background by its name
  • 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 TDLib
  • Searches for a specified query in the first name, last name and usernames of the members of a specified chat. Requires administrator rights in channels
  • 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 must be used instead), or without an enabled message database. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit. A combination of query, sender_id, filter and message_thread_id search criteria is expected to be supported, only if it is required for Telegram official application implementation
  • Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user
  • 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
  • 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 must be sent again every 25 seconds with adjusted location to not miss new 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
  • Searches for the specified query in the first names, last names and usernames of the known user contacts
  • Searches for emojis by keywords. Supported only if the file database is enabled
  • Searches for files in the file download list or recently downloaded files from the list
  • Searches for recently used hashtags by their prefix
  • Searches for installed sticker sets by looking for specified query in their title and name
  • 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 TDLib and can be smaller than the specified limit
  • Searches for outgoing messages with content of the type messageDocument in all chats except secret chats. Returns the results in reverse chronological order
  • 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. 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 up to 50 recently found chats; this is an offline request
  • Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance, the number of returned messages is chosen by TDLib
  • Searches for a sticker set by its name
  • Searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results
  • Searches for stickers from public sticker sets that correspond to any of the given emoji
  • Searches specified query by word prefixes in the provided strings. Returns 0-based positions of strings that matched. Can be called synchronously
  • Searches a user by their phone number. Returns a 404 error if the user can’t be found
  • Searches a user by a token from the user’s link
  • Returns information about a Web App by its short name. Returns a 404 error if the Web App is not found
  • Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos
  • 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
  • Sends debug information for a call to Telegram servers
  • Sends log file for a call to Telegram servers
  • Sends a call rating
  • Sends call signaling data
  • Sends a notification about user activity in a chat
  • Sends a custom request; for bots only
  • Sends a code to verify an email address to be added to a user’s Telegram Passport
  • Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message
  • Sends a message. Returns the sent message
  • Sends 2-10 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
  • 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
  • Sends a filled-out payment form to the bot for final verification
  • Sends phone number confirmation code to handle links of the type internalLinkTypePhoneNumberConfirmation
  • Sends a code to verify a phone number to be added to a user’s Telegram Passport
  • Sends a new story to a chat; requires can_post_stories rights for channel chats. Returns a temporary story
  • Sends a custom request from a Web App
  • Sends data received from a keyboardButtonTypeWebApp Web App to a bot
  • Changes the period of inactivity after which the account of the current user will automatically be deleted
  • Succeeds after a specified amount of time has passed. Can be called before initialization
  • Changes settings for automatic moving of chats to and from the Archive chat lists
  • Sets the email address of the user and sends an authentication code to the email address. Works only when the current authorization state is authorizationStateWaitEmailAddress
  • 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 authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
  • Sets auto-download settings
  • Sets autosave settings for the given scope. The method is guaranteed to work only after at least one call to getAutosaveSettings
  • Changes the background selected by the user; adds background to the list of installed backgrounds
  • Changes the bio of the current user
  • Sets the text shown in the chat with a bot if the chat is empty. Can be called only if userTypeBot.can_be_edited == true
  • Sets the text shown on a bot’s profile page and sent together with the link when users share the bot. Can be called only if userTypeBot.can_be_edited == true
  • Sets the name of a bot. Can be called only if userTypeBot.can_be_edited == true
  • Changes a profile photo for a bot
  • Informs the server about the number of pending bot updates if they haven’t been processed for a long time; for bots only
  • Changes story list in which stories from the chat are shown
  • Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right
  • Changes the background in a specific chat. Supported only in private and secret chats with non-deleted users
  • Changes application-specific data associated with a chat
  • Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right
  • Changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it is specified
  • Changes the draft message in a chat
  • 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 status of a chat member, needs appropriate privileges. This function is currently not suitable for transferring chat ownership; use transferChatOwnership instead. Use addChatMember or banChatMember if some additional parameters needs to be passed
  • Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires change_info administrator right in basic groups, supergroups and channels Message auto-delete time can’t be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram).
  • Selects a message sender to send messages in a chat
  • Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can’t be changed
  • Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right
  • Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right
  • Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members rights
  • Changes the chat theme. Supported only in private and secret chats
  • Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right
  • Changes the list of close friends of the current user
  • Sets the list of commands supported by the bot for the given user scope and language; for bots only
  • Sets a custom emoji sticker set thumbnail; for bots only
  • Adds or changes a custom local language pack to the current localization target
  • Adds, edits or deletes a string in a custom local language pack. Can be called before authorization
  • Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain
  • Sets default administrator rights for adding the bot to channel chats; for bots only
  • Sets default administrator rights for adding the bot to basic group and supergroup chats; for bots only
  • Changes the default message auto-delete time for new chats
  • Changes type of default reaction for the current user
  • Changes the emoji status of the current user; for Telegram Premium users only
  • Informs TDLib on a file generation progress
  • Changes the notification settings of a forum topic
  • Updates the game score of the specified user in the game; for bots only
  • Informs TDLib that speaking state of a participant of an active group has changed
  • Changes volume level of a participant of an active group call. If the current user can manage the group call, then the participant’s volume level will be changed for all users with the default volume level
  • Sets group call title. Requires groupCall.can_be_managed group call flag
  • Changes the period of inactivity after which sessions will automatically be terminated
  • Updates the game score of the specified user in a game; for bots only
  • 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
  • Sets new log stream for internal logging of TDLib. Can be called synchronously
  • Sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously
  • Sets the verbosity level of the internal logging of TDLib. Can be called synchronously
  • Changes the login email address of the user. The email address can be changed only if the current user already has login email and passwordState.login_email_address_pattern is non-empty. The change will not be applied until the new login email address is confirmed with checkLoginEmailAddressCode. To use Apple ID/Google ID instead of a email address, call checkLoginEmailAddressCode directly
  • Sets menu button for the given user or for all users; for bots only
  • Changes the block list of a message sender. Currently, only users and supergroup chats can be blocked
  • Changes the first and last name of the current user
  • 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 must 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
  • 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
  • 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
  • Changes the 2-step verification password for the current user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed
  • Changes the order of pinned chats
  • Changes the order of pinned forum topics
  • Changes the user answer to a poll. A poll in quiz mode can be answered only once
  • Changes a profile photo for the current 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
  • Changes notification settings for chats of a given type
  • Changes the list of emoji corresponding to a sticker; for bots only. The sticker must belong to a regular or custom emoji sticker set created by the bot
  • Changes the list of keywords of a sticker; for bots only. The sticker must belong to a regular or custom emoji sticker set created by the bot
  • Changes the mask position of a mask sticker; for bots only. The sticker must belong to a mask sticker set created by the bot
  • 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
  • Sets a sticker set thumbnail; for bots only
  • Sets a sticker set title; for bots only
  • Changes privacy settings of a story. Can be called only if story.can_be_edited == true
  • Changes chosen reaction on a story
  • Changes the sticker set of a supergroup; requires can_change_info administrator right
  • Changes the editable username of a supergroup or channel, requires owner privileges in the supergroup or channel
  • Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters
  • Changes a personal profile photo of a contact user
  • Changes user privacy settings
  • Sets support information for the given user; for Telegram support only
  • Changes the editable username of the current user
  • Changes default participant identifier, on whose behalf a video chat in the chat will be joined
  • Shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot
  • Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber
  • Shares a user after pressing a keyboardButtonTypeRequestUser button with the bot
  • Starts recording of an active group call. Requires groupCall.can_be_managed group call flag
  • Starts screen sharing in a joined group call. Returns join response payload for tgcalls
  • Starts a scheduled group call
  • Stops a poll. A poll in a message can be stopped when the message has can_be_edited flag is set
  • Suggests a profile photo to another regular user with common messages
  • Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn’t need to be called explicitly for the current used/base language packs. Can be called before authorization
  • Terminates all other sessions of the current user
  • Terminates a session of the current user
  • Returns the received bytes; for testing only. This is an offline method. Can be called before authorization
  • 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 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
  • Forces an updates.getDifference call to the Telegram servers; for testing only
  • 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
  • Returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously
  • Returns the squared received number; for testing only. This is an offline method. Can be called before authorization
  • Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization
  • Changes pause state of all files in the file download list
  • Adds or removes a bot to attachment and side menu. Bot can be added to the menu, only if userTypeBot.can_be_added_to_attachment_menu == true
  • Changes active state for a username of a bot. The editable username can’t be disabled. May return an error with a message “USERNAMES_ACTIVE_TOO_MUCH” if the maximum number of active usernames has been reached. Can be called only if userTypeBot.can_be_edited == true
  • Changes the value of the default disable_notification parameter, used when a message is sent to a chat
  • Changes the ability of users to save, forward, or copy chat content. Supported only for basic groups, supergroups and channels. Requires owner privileges
  • Changes the marked as unread state of a chat
  • 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/archive chat list. The limit can be increased with Telegram Premium
  • Changes the translatable state of a chat; for Telegram Premium users only
  • Changes pause state of a file in the file download list
  • Toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup unless the user is creator of the topic
  • Changes the pinned state of a forum topic; requires can_manage_topics administrator right in the supergroup. There can be up to getOption(“pinned_forum_topic_count_max”) pinned forum topics
  • Toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup
  • Toggles whether the current user will receive a notification when the group call will start; scheduled group calls only
  • Toggles whether current user’s video is enabled
  • Toggles whether current user’s video is paused
  • Toggles whether new participants of a group call can be unmuted only by administrators of the group call. Requires groupCall.can_toggle_mute_new_participants group call flag
  • Toggles whether a group call participant hand is rased
  • Toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves
  • Pauses or unpauses screen sharing in a joined group call
  • Toggles whether a session can accept incoming calls
  • Toggles whether a session can accept incoming secret chats
  • Toggles whether a story is accessible after expiration. Can be called only if story.can_toggle_is_pinned == true
  • Toggles whether aggressive anti-spam checks are enabled in the supergroup. Can be called only if supergroupFullInfo.can_toggle_aggressive_anti_spam == true
  • Toggles whether non-administrators can receive only administrators and bots using getSupergroupMembers or searchChatMembers. Can be called only if supergroupFullInfo.can_hide_members == true
  • Toggles whether the message history of a supergroup is available to new members; requires can_change_info administrator right
  • Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup
  • Toggles whether the supergroup is a forum; requires owner privileges in the supergroup. Discussion supergroups can’t be converted to forums
  • Toggles whether all users directly joining the supergroup need to be approved by supergroup administrators; requires can_restrict_members administrator right
  • Toggles whether joining is mandatory to send messages to a discussion supergroup; requires can_restrict_members administrator right
  • Toggles whether sender signature is added to sent messages in a channel; requires can_change_info administrator right
  • Changes active state for a username of a supergroup or channel, requires owner privileges in the supergroup or channel. The editable username can’t be disabled. May return an error with a message “USERNAMES_ACTIVE_TOO_MUCH” if the maximum number of active usernames has been reached
  • Changes active state for a username of the current user. The editable username can’t be disabled. May return an error with a message “USERNAMES_ACTIVE_TOO_MUCH” if the maximum number of active usernames has been reached
  • 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
  • Extracts text or caption of the given message and translates it to the given language. If the current user is a Telegram Premium user, then text formatting is preserved
  • Translates a text to the given language. If the current user is a Telegram Premium user, then text formatting is preserved
  • Removes all pinned messages 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 forum topic; requires can_pin_messages rights in the supergroup
  • Removes a pinned message from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel
  • Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group
  • Uploads a file with a sticker; returns the uploaded file
  • Validates the order information provided by a user and returns the available shipping options for a flexible invoice
  • Informs TDLib that messages are being viewed by the user. Sponsored messages must be marked as viewed only when the entire text of the message is shown on the screen (excluding the button). 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)
  • Informs TDLib that the user viewed detailed information about a Premium feature on the Premium features screen
  • Informs the server that some trending sticker sets have been viewed by the user
  • 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