Structures
The following structures are available globally.
-
An object of this type can be returned on every function call, in case of an error
See moreDeclaration
-
An object of this type is returned on a successful function call for certain functions
See moreDeclaration
Swift
public struct Ok : Codable, Equatable, FunctionResult
-
Contains parameters for TDLib initialization
See moreDeclaration
Swift
public struct TdlibParameters : Codable, Equatable, FunctionResult
-
Information about the authentication code that was sent
See moreDeclaration
Swift
public struct AuthenticationCodeInfo : Codable, Equatable, FunctionResult
-
Information about the email address authentication code that was sent
See moreDeclaration
Swift
public struct EmailAddressAuthenticationCodeInfo : Codable, Equatable, FunctionResult
-
Represents a part of the text that needs to be formatted in some unusual way
See moreDeclaration
Swift
public struct TextEntity : Codable, Equatable, FunctionResult
-
Contains a list of text entities
See moreDeclaration
Swift
public struct TextEntities : Codable, Equatable, FunctionResult
-
A text with some entities
See moreDeclaration
Swift
public struct FormattedText : Codable, Equatable, FunctionResult
-
Contains Telegram terms of service
See moreDeclaration
Swift
public struct TermsOfService : Codable, Equatable, FunctionResult
-
Represents the current state of 2-step verification
See moreDeclaration
Swift
public struct PasswordState : Codable, Equatable, FunctionResult
-
Contains information about the current recovery email address
See moreDeclaration
Swift
public struct RecoveryEmailAddress : Codable, Equatable, FunctionResult
-
Returns information about the availability of a temporary password, which can be used for payments
See moreDeclaration
Swift
public struct TemporaryPasswordState : Codable, Equatable, FunctionResult
-
Represents a local file
See moreDeclaration
Swift
public struct LocalFile : Codable, Equatable, FunctionResult
-
Represents a remote file
See moreDeclaration
Swift
public struct RemoteFile : Codable, Equatable, FunctionResult
-
Represents a file
See moreDeclaration
Swift
public struct File : Codable, Equatable, FunctionResult
-
Photo description
See moreDeclaration
Swift
public struct PhotoSize : Codable, Equatable, FunctionResult
-
Thumbnail image of a very poor quality and low resolution
See moreDeclaration
Swift
public struct Minithumbnail : Codable, Equatable, FunctionResult
-
Position on a photo where a mask should be placed
See moreDeclaration
Swift
public struct MaskPosition : Codable, Equatable, FunctionResult
-
Describes one answer option of a poll
See moreDeclaration
Swift
public struct PollOption : Codable, Equatable, FunctionResult
-
Describes an animation file. The animation must be encoded in GIF or MPEG4 format
See moreDeclaration
Swift
public struct Animation : Codable, Equatable, FunctionResult
-
Describes an audio file. Audio is usually in MP3 or M4A format
See moreDeclaration
Swift
public struct Audio : Codable, Equatable, FunctionResult
-
Describes a document of any type
See moreDeclaration
Swift
public struct Document : Codable, Equatable, FunctionResult
-
Describes a photo
See moreDeclaration
Swift
public struct Photo : Codable, Equatable, FunctionResult
-
Describes a sticker
See moreDeclaration
Swift
public struct Sticker : Codable, Equatable, FunctionResult
-
Describes a video file
See moreDeclaration
Swift
public struct Video : Codable, Equatable, FunctionResult
-
Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format
See moreDeclaration
Swift
public struct VideoNote : Codable, Equatable, FunctionResult
-
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
See moreDeclaration
Swift
public struct VoiceNote : Codable, Equatable, FunctionResult
-
Describes a user contact
See moreDeclaration
Swift
public struct Contact : Codable, Equatable, FunctionResult
-
Describes a location on planet Earth
See moreDeclaration
Swift
public struct Location : Codable, Equatable, FunctionResult
-
Describes a venue
See moreDeclaration
Swift
public struct Venue : Codable, Equatable, FunctionResult
-
Describes a game
See moreDeclaration
Swift
public struct Game : Codable, Equatable, FunctionResult
-
Describes a poll
See moreDeclaration
Swift
public struct Poll : Codable, Equatable, FunctionResult
-
Describes a user profile photo
See moreDeclaration
Swift
public struct ProfilePhoto : Codable, Equatable, FunctionResult
-
Describes the photo of a chat
See moreDeclaration
Swift
public struct ChatPhoto : Codable, Equatable, FunctionResult
-
Represents commands supported by a bot
See moreDeclaration
Swift
public struct BotCommand : Codable, Equatable, FunctionResult
-
Provides information about a bot and its supported commands
See moreDeclaration
Swift
public struct BotInfo : Codable, Equatable, FunctionResult
-
Represents a location to which a chat is connected
See moreDeclaration
Swift
public struct ChatLocation : Codable, Equatable, FunctionResult
-
Represents a user
See moreDeclaration
Swift
public struct User : Codable, Equatable, FunctionResult
-
Contains full information about a user (except the full list of profile photos)
See moreDeclaration
Swift
public struct UserFullInfo : Codable, Equatable, FunctionResult
-
Contains full information about a user profile photo
See moreDeclaration
Swift
public struct UserProfilePhoto : Codable, Equatable, FunctionResult
-
Contains part of the list of user photos
See moreDeclaration
Swift
public struct UserProfilePhotos : Codable, Equatable, FunctionResult
-
Represents a list of users
See moreDeclaration
Swift
public struct Users : Codable, Equatable, FunctionResult
-
Contains information about a chat administrator
See moreDeclaration
Swift
public struct ChatAdministrator : Codable, Equatable, FunctionResult
-
Represents a list of chat administrators
See moreDeclaration
Swift
public struct ChatAdministrators : Codable, Equatable, FunctionResult
-
Describes actions that a user is allowed to take in a chat
See moreDeclaration
Swift
public struct ChatPermissions : Codable, Equatable, FunctionResult
-
A user with information about joining/leaving a chat
See moreDeclaration
Swift
public struct ChatMember : Codable, Equatable, FunctionResult
-
Contains a list of chat members
See moreDeclaration
Swift
public struct ChatMembers : Codable, Equatable, FunctionResult
-
Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users)
See moreDeclaration
Swift
public struct BasicGroup : Codable, Equatable, FunctionResult
-
Contains full information about a basic group
See moreDeclaration
Swift
public struct BasicGroupFullInfo : Codable, Equatable, FunctionResult
-
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
See moreDeclaration
Swift
public struct Supergroup : Codable, Equatable, FunctionResult
-
Contains full information about a supergroup or channel
See moreDeclaration
Swift
public struct SupergroupFullInfo : Codable, Equatable, FunctionResult
-
Represents a secret chat
See moreDeclaration
Swift
public struct SecretChat : Codable, Equatable, FunctionResult
-
Contains information about a forwarded message
See moreDeclaration
Swift
public struct MessageForwardInfo : Codable, Equatable, FunctionResult
-
Describes a message
See moreDeclaration
Swift
public struct Message : Codable, Equatable, FunctionResult
-
Contains a list of messages
See moreDeclaration
Swift
public struct Messages : Codable, Equatable, FunctionResult
-
Contains a list of messages found by a search
See moreDeclaration
Swift
public struct FoundMessages : Codable, Equatable, FunctionResult
-
Contains information about notification settings for a chat
See moreDeclaration
Swift
public struct ChatNotificationSettings : Codable, Equatable, FunctionResult
-
Contains information about notification settings for several chats
See moreDeclaration
Swift
public struct ScopeNotificationSettings : Codable, Equatable, FunctionResult
-
Contains information about a message draft
See moreDeclaration
Swift
public struct DraftMessage : Codable, Equatable, FunctionResult
-
A chat. (Can be a private chat, basic group, supergroup, or secret chat)
See moreDeclaration
Swift
public struct Chat : Codable, Equatable, FunctionResult
-
Represents a list of chats
See moreDeclaration
Swift
public struct Chats : Codable, Equatable, FunctionResult
-
Describes a chat located nearby
See moreDeclaration
Swift
public struct ChatNearby : Codable, Equatable, FunctionResult
-
Represents a list of chats located nearby
See moreDeclaration
Swift
public struct ChatsNearby : Codable, Equatable, FunctionResult
-
Contains a chat invite link
See moreDeclaration
Swift
public struct ChatInviteLink : Codable, Equatable, FunctionResult
-
Contains information about a chat invite link
See moreDeclaration
Swift
public struct ChatInviteLinkInfo : Codable, Equatable, FunctionResult
-
Represents a single button in a bot keyboard
See moreDeclaration
Swift
public struct KeyboardButton : Codable, Equatable, FunctionResult
-
Represents a single button in an inline keyboard
See moreDeclaration
Swift
public struct InlineKeyboardButton : Codable, Equatable, FunctionResult
-
Contains a caption of an instant view web page block, consisting of a text and a trailing credit
See moreDeclaration
Swift
public struct PageBlockCaption : Codable, Equatable, FunctionResult
-
Describes an item of a list page block
See moreDeclaration
Swift
public struct PageBlockListItem : Codable, Equatable, FunctionResult
-
Represents a cell of a table
See moreDeclaration
Swift
public struct PageBlockTableCell : Codable, Equatable, FunctionResult
-
Contains information about a related article
See moreDeclaration
Swift
public struct PageBlockRelatedArticle : Codable, Equatable, FunctionResult
-
Describes an instant view page for a web page
See moreDeclaration
Swift
public struct WebPageInstantView : Codable, Equatable, FunctionResult
-
Describes a web page preview
See moreDeclaration
Swift
public struct WebPage : Codable, Equatable, FunctionResult
-
Describes an address
See moreDeclaration
Swift
public struct Address : Codable, Equatable, FunctionResult
-
Portion of the price of a product (e.g., “delivery cost”, “tax amount”)
See moreDeclaration
Swift
public struct LabeledPricePart : Codable, Equatable, FunctionResult
-
Product invoice
See moreDeclaration
Swift
public struct Invoice : Codable, Equatable, FunctionResult
-
Order information
See moreDeclaration
Swift
public struct OrderInfo : Codable, Equatable, FunctionResult
-
One shipping option
See moreDeclaration
Swift
public struct ShippingOption : Codable, Equatable, FunctionResult
-
Contains information about saved card credentials
See moreDeclaration
Swift
public struct SavedCredentials : Codable, Equatable, FunctionResult
-
Stripe payment provider
See moreDeclaration
Swift
public struct PaymentsProviderStripe : Codable, Equatable, FunctionResult
-
Contains information about an invoice payment form
See moreDeclaration
Swift
public struct PaymentForm : Codable, Equatable, FunctionResult
-
Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options
See moreDeclaration
Swift
public struct ValidatedOrderInfo : Codable, Equatable, FunctionResult
-
Contains the result of a payment request
See moreDeclaration
Swift
public struct PaymentResult : Codable, Equatable, FunctionResult
-
Contains information about a successful payment
See moreDeclaration
Swift
public struct PaymentReceipt : Codable, Equatable, FunctionResult
-
File with the date it was uploaded
See moreDeclaration
Swift
public struct DatedFile : Codable, Equatable, FunctionResult
-
Represents a date according to the Gregorian calendar
See moreDeclaration
Swift
public struct Date : Codable, Equatable, FunctionResult
-
Contains the user’s personal details
See moreDeclaration
Swift
public struct PersonalDetails : Codable, Equatable, FunctionResult
-
An identity document
See moreDeclaration
Swift
public struct IdentityDocument : Codable, Equatable, FunctionResult
-
An identity document to be saved to Telegram Passport
See moreDeclaration
Swift
public struct InputIdentityDocument : Codable, Equatable, FunctionResult
-
A personal document, containing some information about a user
See moreDeclaration
Swift
public struct PersonalDocument : Codable, Equatable, FunctionResult
-
A personal document to be saved to Telegram Passport
See moreDeclaration
Swift
public struct InputPersonalDocument : Codable, Equatable, FunctionResult
-
Contains information about saved Telegram Passport elements
See moreDeclaration
Swift
public struct PassportElements : Codable, Equatable, FunctionResult
-
Contains the description of an error in a Telegram Passport element
See moreDeclaration
Swift
public struct PassportElementError : Codable, Equatable, FunctionResult
-
Contains information about a Telegram Passport element that was requested by a service
See moreDeclaration
Swift
public struct PassportSuitableElement : Codable, Equatable, FunctionResult
-
Contains a description of the required Telegram Passport element that was requested by a service
See moreDeclaration
Swift
public struct PassportRequiredElement : Codable, Equatable, FunctionResult
-
Contains information about a Telegram Passport authorization form that was requested
See moreDeclaration
Swift
public struct PassportAuthorizationForm : Codable, Equatable, FunctionResult
-
Contains information about a Telegram Passport elements and corresponding errors
See moreDeclaration
Swift
public struct PassportElementsWithErrors : Codable, Equatable, FunctionResult
-
Contains encrypted Telegram Passport data credentials
See moreDeclaration
Swift
public struct EncryptedCredentials : Codable, Equatable, FunctionResult
-
Contains information about an encrypted Telegram Passport element; for bots only
See moreDeclaration
Swift
public struct EncryptedPassportElement : Codable, Equatable, FunctionResult
-
Contains the description of an error in a Telegram Passport element; for bots only
See moreDeclaration
Swift
public struct InputPassportElementError : Codable, Equatable, FunctionResult
-
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
See moreDeclaration
Swift
public struct InputThumbnail : Codable, Equatable, FunctionResult
-
Options to be used when a message is send
See moreDeclaration
Swift
public struct SendMessageOptions : Codable, Equatable, FunctionResult
-
Represents a list of stickers
See moreDeclaration
Swift
public struct Stickers : Codable, Equatable, FunctionResult
-
Represents a list of emoji
See moreDeclaration
Swift
public struct Emojis : Codable, Equatable, FunctionResult
-
Represents a sticker set
See moreDeclaration
Swift
public struct StickerSet : Codable, Equatable, FunctionResult
-
Represents short information about a sticker set
See moreDeclaration
Swift
public struct StickerSetInfo : Codable, Equatable, FunctionResult
-
Represents a list of sticker sets
See moreDeclaration
Swift
public struct StickerSets : Codable, Equatable, FunctionResult
-
Specifies the supported call protocols
See moreDeclaration
Swift
public struct CallProtocol : Codable, Equatable, FunctionResult
-
Describes the address of UDP reflectors
See moreDeclaration
Swift
public struct CallConnection : Codable, Equatable, FunctionResult
-
Contains the call identifier
See moreDeclaration
Swift
public struct CallId : Codable, Equatable, FunctionResult
-
Describes a call
See moreDeclaration
Swift
public struct Call : Codable, Equatable, FunctionResult
-
Contains settings for the authentication of the user’s phone number
See moreDeclaration
Swift
public struct PhoneNumberAuthenticationSettings : Codable, Equatable, FunctionResult
-
Represents a list of animations
See moreDeclaration
Swift
public struct Animations : Codable, Equatable, FunctionResult
-
Represents the result of an ImportContacts request
See moreDeclaration
Swift
public struct ImportedContacts : Codable, Equatable, FunctionResult
-
Contains an HTTP URL
See moreDeclaration
Swift
public struct HttpUrl : Codable, Equatable, FunctionResult
-
Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query
See moreDeclaration
Swift
public struct InlineQueryResults : Codable, Equatable, FunctionResult
-
Contains a bot’s answer to a callback query
See moreDeclaration
Swift
public struct CallbackQueryAnswer : Codable, Equatable, FunctionResult
-
Contains the result of a custom request
See moreDeclaration
Swift
public struct CustomRequestResult : Codable, Equatable, FunctionResult
-
Contains one row of the game high score table
See moreDeclaration
Swift
public struct GameHighScore : Codable, Equatable, FunctionResult
-
Contains a list of game high scores
See moreDeclaration
Swift
public struct GameHighScores : Codable, Equatable, FunctionResult
-
Represents a chat event
See moreDeclaration
Swift
public struct ChatEvent : Codable, Equatable, FunctionResult
-
Contains a list of chat events
See moreDeclaration
Swift
public struct ChatEvents : Codable, Equatable, FunctionResult
-
Represents a set of filters used to obtain a chat event log
See moreDeclaration
Swift
public struct ChatEventLogFilters : Codable, Equatable, FunctionResult
-
Represents one language pack string
See moreDeclaration
Swift
public struct LanguagePackString : Codable, Equatable, FunctionResult
-
Contains a list of language pack strings
See moreDeclaration
Swift
public struct LanguagePackStrings : Codable, Equatable, FunctionResult
-
Contains information about a language pack
See moreDeclaration
Swift
public struct LanguagePackInfo : Codable, Equatable, FunctionResult
-
Contains information about the current localization target
See moreDeclaration
Swift
public struct LocalizationTargetInfo : Codable, Equatable, FunctionResult
-
Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification
See moreDeclaration
Swift
public struct PushReceiverId : Codable, Equatable, FunctionResult
-
Describes a chat background
See moreDeclaration
Swift
public struct Background : Codable, Equatable, FunctionResult
-
Contains a list of backgrounds
See moreDeclaration
Swift
public struct Backgrounds : Codable, Equatable, FunctionResult
-
Contains a list of hashtags
See moreDeclaration
Swift
public struct Hashtags : Codable, Equatable, FunctionResult
-
Contains information about a notification
See moreDeclaration
Swift
public struct Notification : Codable, Equatable, FunctionResult
-
Describes a group of notifications
See moreDeclaration
Swift
public struct NotificationGroup : Codable, Equatable, FunctionResult
-
Represents one member of a JSON object
See moreDeclaration
Swift
public struct JsonObjectMember : Codable, Equatable, FunctionResult
-
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
See moreDeclaration
Swift
public struct UserPrivacySettingRules : Codable, Equatable, FunctionResult
-
Contains information about the period of inactivity after which the current user’s account will automatically be deleted
See moreDeclaration
Swift
public struct AccountTtl : Codable, Equatable, FunctionResult
-
Contains information about one session in a Telegram application used by the current user. Sessions should be shown to the user in the returned order
See moreDeclaration
Swift
public struct Session : Codable, Equatable, FunctionResult
-
Contains a list of sessions
See moreDeclaration
Swift
public struct Sessions : Codable, Equatable, FunctionResult
-
Contains information about one website the current user is logged in with Telegram
See moreDeclaration
Swift
public struct ConnectedWebsite : Codable, Equatable, FunctionResult
-
Contains a list of websites the current user is logged in with Telegram
See moreDeclaration
Swift
public struct ConnectedWebsites : Codable, Equatable, FunctionResult
-
Contains a public HTTPS link to a message in a supergroup or channel with a username
See moreDeclaration
Swift
public struct PublicMessageLink : Codable, Equatable, FunctionResult
-
Contains information about a link to a message in a chat
See moreDeclaration
Swift
public struct MessageLinkInfo : Codable, Equatable, FunctionResult
-
Contains a part of a file
See moreDeclaration
Swift
public struct FilePart : Codable, Equatable, FunctionResult
-
Contains the storage usage statistics for a specific file type
See moreDeclaration
Swift
public struct StorageStatisticsByFileType : Codable, Equatable, FunctionResult
-
Contains the storage usage statistics for a specific chat
See moreDeclaration
Swift
public struct StorageStatisticsByChat : Codable, Equatable, FunctionResult
-
Contains the exact storage usage statistics split by chats and file type
See moreDeclaration
Swift
public struct StorageStatistics : Codable, Equatable, FunctionResult
-
Contains approximate storage usage statistics, excluding files of unknown file type
See moreDeclaration
Swift
public struct StorageStatisticsFast : Codable, Equatable, FunctionResult
-
Contains database statistics
See moreDeclaration
Swift
public struct DatabaseStatistics : Codable, Equatable, FunctionResult
-
A full list of available network statistic entries
See moreDeclaration
Swift
public struct NetworkStatistics : Codable, Equatable, FunctionResult
-
Contains auto-download settings
See moreDeclaration
Swift
public struct AutoDownloadSettings : Codable, Equatable, FunctionResult
-
Contains auto-download settings presets for the user
See moreDeclaration
Swift
public struct AutoDownloadSettingsPresets : Codable, Equatable, FunctionResult
-
Represents a URL linking to an internal Telegram entity
See moreDeclaration
Swift
public struct TMeUrl : Codable, Equatable, FunctionResult
-
Contains a list of t.me URLs
See moreDeclaration
Swift
public struct TMeUrls : Codable, Equatable, FunctionResult
-
Contains a counter
See moreDeclaration
Swift
public struct Count : Codable, Equatable, FunctionResult
-
Contains some text
See moreDeclaration
Swift
public struct Text : Codable, Equatable, FunctionResult
-
Contains a value representing a number of seconds
See moreDeclaration
Swift
public struct Seconds : Codable, Equatable, FunctionResult
-
Contains information about a tg:// deep link
See moreDeclaration
Swift
public struct DeepLinkInfo : Codable, Equatable, FunctionResult
-
Contains information about a proxy server
See moreDeclaration
Swift
public struct Proxy : Codable, Equatable, FunctionResult
-
Represents a list of proxy servers
See moreDeclaration
Swift
public struct Proxies : Codable, Equatable, FunctionResult
-
Describes a sticker that should be added to a sticker set
See moreDeclaration
Swift
public struct InputSticker : Codable, Equatable, FunctionResult
-
Contains a list of updates
See moreDeclaration
Swift
public struct Updates : Codable, Equatable, FunctionResult
-
Contains a TDLib internal log verbosity level
See moreDeclaration
Swift
public struct LogVerbosityLevel : Codable, Equatable, FunctionResult
-
Contains a list of available TDLib internal log tags
See moreDeclaration
Swift
public struct LogTags : Codable, Equatable, FunctionResult
-
A simple object containing a number; for testing only
See moreDeclaration
Swift
public struct TestInt : Codable, Equatable, FunctionResult
-
A simple object containing a string; for testing only
See moreDeclaration
Swift
public struct TestString : Codable, Equatable, FunctionResult
-
A simple object containing a sequence of bytes; for testing only
See moreDeclaration
Swift
public struct TestBytes : Codable, Equatable, FunctionResult
-
A simple object containing a vector of numbers; for testing only
See moreDeclaration
Swift
public struct TestVectorInt : Codable, Equatable, FunctionResult
-
A simple object containing a vector of objects that hold a number; for testing only
See moreDeclaration
Swift
public struct TestVectorIntObject : Codable, Equatable, FunctionResult
-
A simple object containing a vector of strings; for testing only
See moreDeclaration
Swift
public struct TestVectorString : Codable, Equatable, FunctionResult
-
A simple object containing a vector of objects that hold a string; for testing only
See moreDeclaration
Swift
public struct TestVectorStringObject : Codable, Equatable, FunctionResult
-
Returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state
See moreDeclaration
Swift
public struct GetAuthorizationState : Codable, Equatable, TDFunction
-
Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters
See moreDeclaration
Swift
public struct SetTdlibParameters : Codable, Equatable, TDFunction
-
Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey
See moreDeclaration
Swift
public struct CheckDatabaseEncryptionKey : Codable, Equatable, TDFunction
-
Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, -or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
See moreDeclaration
Swift
public struct SetAuthenticationPhoneNumber : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct ResendAuthenticationCode : Codable, Equatable, TDFunction
-
Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode
See moreDeclaration
Swift
public struct CheckAuthenticationCode : Codable, Equatable, TDFunction
-
Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber
See moreDeclaration
Swift
public struct RequestQrCodeAuthentication : Codable, Equatable, TDFunction
-
Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration
See moreDeclaration
Swift
public struct RegisterUser : Codable, Equatable, TDFunction
-
Checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword
See moreDeclaration
Swift
public struct CheckAuthenticationPassword : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct RequestAuthenticationPasswordRecovery : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct RecoverAuthenticationPassword : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct CheckAuthenticationBotToken : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct LogOut : Codable, Equatable, TDFunction
-
Closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent
See moreDeclaration
Swift
public struct Close : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct Destroy : Codable, Equatable, TDFunction
-
Confirms QR code authentication on another device. Returns created session on success
See moreDeclaration
Swift
public struct ConfirmQrCodeAuthentication : Codable, Equatable, TDFunction
-
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. This is an offline method. Can be called before authorization
See moreDeclaration
Swift
public struct GetCurrentState : Codable, Equatable, TDFunction
-
Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain
See moreDeclaration
Swift
public struct SetDatabaseEncryptionKey : Codable, Equatable, TDFunction
-
Returns the current state of 2-step verification
See moreDeclaration
Swift
public struct GetPasswordState : Codable, Equatable, TDFunction
-
Changes the password for the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed
See moreDeclaration
Swift
public struct SetPassword : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetRecoveryEmailAddress : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SetRecoveryEmailAddress : Codable, Equatable, TDFunction
-
Checks the 2-step verification recovery email address verification code
See moreDeclaration
Swift
public struct CheckRecoveryEmailAddressCode : Codable, Equatable, TDFunction
-
Resends the 2-step verification recovery email address verification code
See moreDeclaration
Swift
public struct ResendRecoveryEmailAddressCode : Codable, Equatable, TDFunction
-
Requests to send a password recovery code to an email address that was previously set up
See moreDeclaration
Swift
public struct RequestPasswordRecovery : Codable, Equatable, TDFunction
-
Recovers the password using a recovery code sent to an email address that was previously set up
See moreDeclaration
Swift
public struct RecoverPassword : Codable, Equatable, TDFunction
-
Creates a new temporary password for processing payments
See moreDeclaration
Swift
public struct CreateTemporaryPassword : Codable, Equatable, TDFunction
-
Returns information about the current temporary password
See moreDeclaration
Swift
public struct GetTemporaryPasswordState : Codable, Equatable, TDFunction
-
Returns the current user
See moreDeclaration
Swift
public struct GetMe : Codable, Equatable, TDFunction
-
Returns information about a user by their identifier. This is an offline request if the current user is not a bot
See moreDeclaration
Swift
public struct GetUser : Codable, Equatable, TDFunction
-
Returns full information about a user by their identifier
See moreDeclaration
Swift
public struct GetUserFullInfo : Codable, Equatable, TDFunction
-
Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot
See moreDeclaration
Swift
public struct GetBasicGroup : Codable, Equatable, TDFunction
-
Returns full information about a basic group by its identifier
See moreDeclaration
Swift
public struct GetBasicGroupFullInfo : Codable, Equatable, TDFunction
-
Returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot
See moreDeclaration
Swift
public struct GetSupergroup : Codable, Equatable, TDFunction
-
Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute
See moreDeclaration
Swift
public struct GetSupergroupFullInfo : Codable, Equatable, TDFunction
-
Returns information about a secret chat by its identifier. This is an offline request
See moreDeclaration
Swift
public struct GetSecretChat : Codable, Equatable, TDFunction
-
Returns information about a chat by its identifier, this is an offline request if the current user is not a bot
See moreDeclaration
Swift
public struct GetChat : Codable, Equatable, TDFunction
-
Returns information about a message
See moreDeclaration
Swift
public struct GetMessage : Codable, Equatable, TDFunction
-
Returns information about a message, if it is available locally without sending network request. This is an offline request
See moreDeclaration
Swift
public struct GetMessageLocally : Codable, Equatable, TDFunction
-
Returns information about a message that is replied by given message
See moreDeclaration
Swift
public struct GetRepliedMessage : Codable, Equatable, TDFunction
-
Returns information about a pinned chat message
See moreDeclaration
Swift
public struct GetChatPinnedMessage : Codable, Equatable, TDFunction
-
Returns information about messages. If a message is not found, returns null on the corresponding position of the result
See moreDeclaration
Swift
public struct GetMessages : Codable, Equatable, TDFunction
-
Returns information about a file; this is an offline request
See moreDeclaration
Swift
public struct GetFile : Codable, Equatable, TDFunction
-
Returns information about a file by its remote ID; this is an offline request. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user. -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 client
See moreDeclaration
Swift
public struct GetRemoteFile : Codable, Equatable, TDFunction
-
Returns an ordered list of chats in a chat list. 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 a biggest signed 64-bit number 9223372036854775807 == 2^63 - 1). -For optimal performance the number of returned chats is chosen by the library
See moreDeclaration
Swift
public struct GetChats : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SearchPublicChat : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SearchPublicChats : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SearchChats : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SearchChatsOnServer : Codable, Equatable, TDFunction
-
Returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request should be sent again every 25 seconds with adjusted location to not miss new chats
See moreDeclaration
Swift
public struct SearchChatsNearby : Codable, Equatable, TDFunction
-
Returns a list of frequently used chats. Supported only if the chat info database is enabled
See moreDeclaration
Swift
public struct GetTopChats : Codable, Equatable, TDFunction
-
Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled
See moreDeclaration
Swift
public struct RemoveTopChat : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct AddRecentlyFoundChat : Codable, Equatable, TDFunction
-
Removes a chat from the list of recently found chats
See moreDeclaration
Swift
public struct RemoveRecentlyFoundChat : Codable, Equatable, TDFunction
-
Clears the list of recently found chats
See moreDeclaration
Swift
public struct ClearRecentlyFoundChats : Codable, Equatable, TDFunction
-
Checks whether a username can be set for a chat
See moreDeclaration
Swift
public struct CheckChatUsername : Codable, Equatable, TDFunction
-
Returns a list of public chats of the specified type, owned by the user
See moreDeclaration
Swift
public struct GetCreatedPublicChats : Codable, Equatable, TDFunction
-
Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached
See moreDeclaration
Swift
public struct CheckCreatedPublicChatsLimit : Codable, Equatable, TDFunction
-
Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Basic group chats need to be first upgraded to supergroups before they can be set as a discussion group
See moreDeclaration
Swift
public struct GetSuitableDiscussionChats : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetInactiveSupergroupChats : Codable, Equatable, TDFunction
-
Returns a list of common group chats with a given user. Chats are sorted by their type and creation date
See moreDeclaration
Swift
public struct GetGroupsInCommon : Codable, Equatable, TDFunction
-
Returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id). -For optimal performance the number of returned messages is chosen by the library. This is an offline request if only_local is true
See moreDeclaration
Swift
public struct GetChatHistory : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct DeleteChatHistory : Codable, Equatable, TDFunction
-
Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query -(searchSecretMessages should be used instead), or without an enabled message database. For optimal performance the number of returned messages is chosen by the library
See moreDeclaration
Swift
public struct SearchChatMessages : Codable, Equatable, TDFunction
-
Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)). -For optimal performance the number of returned messages is chosen by the library
See moreDeclaration
Swift
public struct SearchMessages : Codable, Equatable, TDFunction
-
Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance the number of returned messages is chosen by the library
See moreDeclaration
Swift
public struct SearchSecretMessages : Codable, Equatable, TDFunction
-
Searches for call messages. Returns the results in reverse chronological order (i. e., in order of decreasing message_id). For optimal performance the number of returned messages is chosen by the library
See moreDeclaration
Swift
public struct SearchCallMessages : Codable, Equatable, TDFunction
-
Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user
See moreDeclaration
Swift
public struct SearchChatRecentLocationMessages : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetActiveLiveLocationMessages : Codable, Equatable, TDFunction
-
Returns the last message sent in a chat no later than the specified date
See moreDeclaration
Swift
public struct GetChatMessageByDate : Codable, Equatable, TDFunction
-
Returns approximate number of messages of the specified type in the chat
See moreDeclaration
Swift
public struct GetChatMessageCount : Codable, Equatable, TDFunction
-
Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id)
See moreDeclaration
Swift
public struct GetChatScheduledMessages : Codable, Equatable, TDFunction
-
Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user
See moreDeclaration
Swift
public struct RemoveNotification : Codable, Equatable, TDFunction
-
Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user
See moreDeclaration
Swift
public struct RemoveNotificationGroup : Codable, Equatable, TDFunction
-
Returns a public HTTPS link to a message. Available only for messages in supergroups and channels with a username
See moreDeclaration
Swift
public struct GetPublicMessageLink : Codable, Equatable, TDFunction
-
Returns a private HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels. The link will work only for members of the chat
See moreDeclaration
Swift
public struct GetMessageLink : Codable, Equatable, TDFunction
-
Returns information about a public or private message link
See moreDeclaration
Swift
public struct GetMessageLinkInfo : Codable, Equatable, TDFunction
-
Sends a message. Returns the sent message
See moreDeclaration
Swift
public struct SendMessage : Codable, Equatable, TDFunction
-
Sends messages grouped together into an album. Currently only photo and video messages can be grouped into an album. Returns sent messages
See moreDeclaration
Swift
public struct SendMessageAlbum : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SendBotStartMessage : Codable, Equatable, TDFunction
-
Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message
See moreDeclaration
Swift
public struct SendInlineQueryResultMessage : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct ForwardMessages : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct ResendMessages : Codable, Equatable, TDFunction
-
Changes the current TTL setting (sets a new self-destruct timer) in a secret chat and sends the corresponding message
See moreDeclaration
Swift
public struct SendChatSetTtlMessage : Codable, Equatable, TDFunction
-
Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats
See moreDeclaration
Swift
public struct SendChatScreenshotTakenNotification : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct AddLocalMessage : Codable, Equatable, TDFunction
-
Deletes messages
See moreDeclaration
Swift
public struct DeleteMessages : Codable, Equatable, TDFunction
-
Deletes all messages sent by the specified user to a chat. Supported only for supergroups; requires can_delete_messages administrator privileges
See moreDeclaration
Swift
public struct DeleteChatMessagesFromUser : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct EditMessageText : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct EditMessageLiveLocation : Codable, Equatable, TDFunction
-
Edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can’t be replaced if the message was set to self-destruct. Media can’t be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. Returns the edited message after the edit is completed on the server side
See moreDeclaration
Swift
public struct EditMessageMedia : Codable, Equatable, TDFunction
-
Edits the message content caption. Returns the edited message after the edit is completed on the server side
See moreDeclaration
Swift
public struct EditMessageCaption : Codable, Equatable, TDFunction
-
Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side
See moreDeclaration
Swift
public struct EditMessageReplyMarkup : Codable, Equatable, TDFunction
-
Edits the text of an inline text or game message sent via a bot; for bots only
See moreDeclaration
Swift
public struct EditInlineMessageText : Codable, Equatable, TDFunction
-
Edits the content of a live location in an inline message sent via a bot; for bots only
See moreDeclaration
Swift
public struct EditInlineMessageLiveLocation : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct EditInlineMessageMedia : Codable, Equatable, TDFunction
-
Edits the caption of an inline message sent via a bot; for bots only
See moreDeclaration
Swift
public struct EditInlineMessageCaption : Codable, Equatable, TDFunction
-
Edits the reply markup of an inline message sent via a bot; for bots only
See moreDeclaration
Swift
public struct EditInlineMessageReplyMarkup : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct EditMessageSchedulingState : Codable, Equatable, TDFunction
-
Returns all entities (mentions, hashtags, cashtags, bot commands, URLs, and email addresses) contained in the text. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct GetTextEntities : Codable, Equatable, TDFunction
-
Parses Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities contained in the text. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct ParseTextEntities : Codable, Equatable, TDFunction
-
Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct GetFileMimeType : Codable, Equatable, TDFunction
-
Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct GetFileExtension : Codable, Equatable, TDFunction
-
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. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct CleanFileName : Codable, Equatable, TDFunction
-
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. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct GetLanguagePackString : Codable, Equatable, TDFunction
-
Converts a JSON-serialized string to corresponding JsonValue object. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct GetJsonValue : Codable, Equatable, TDFunction
-
Converts a JsonValue object to corresponding JSON-serialized string. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct GetJsonString : Codable, Equatable, TDFunction
-
Changes the user answer to a poll. A poll in quiz mode can be answered only once
See moreDeclaration
Swift
public struct SetPollAnswer : Codable, Equatable, TDFunction
-
Returns users voted for the specified option in a non-anonymous polls. For the optimal performance the number of returned users is chosen by the library
See moreDeclaration
Swift
public struct GetPollVoters : Codable, Equatable, TDFunction
-
Stops a poll. A poll in a message can be stopped when the message has can_be_edited flag set
See moreDeclaration
Swift
public struct StopPoll : Codable, Equatable, TDFunction
-
Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button
See moreDeclaration
Swift
public struct GetLoginUrlInfo : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetLoginUrl : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetInlineQueryResults : Codable, Equatable, TDFunction
-
Sets the result of an inline query; for bots only
See moreDeclaration
Swift
public struct AnswerInlineQuery : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetCallbackQueryAnswer : Codable, Equatable, TDFunction
-
Sets the result of a callback query; for bots only
See moreDeclaration
Swift
public struct AnswerCallbackQuery : Codable, Equatable, TDFunction
-
Sets the result of a shipping query; for bots only
See moreDeclaration
Swift
public struct AnswerShippingQuery : Codable, Equatable, TDFunction
-
Sets the result of a pre-checkout query; for bots only
See moreDeclaration
Swift
public struct AnswerPreCheckoutQuery : Codable, Equatable, TDFunction
-
Updates the game score of the specified user in the game; for bots only
See moreDeclaration
Swift
public struct SetGameScore : Codable, Equatable, TDFunction
-
Updates the game score of the specified user in a game; for bots only
See moreDeclaration
Swift
public struct SetInlineGameScore : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetGameHighScores : Codable, Equatable, TDFunction
-
Returns game high scores and some part of the high score table in the range of the specified user; for bots only
See moreDeclaration
Swift
public struct GetInlineGameHighScores : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct DeleteChatReplyMarkup : Codable, Equatable, TDFunction
-
Sends a notification about user activity in a chat
See moreDeclaration
Swift
public struct SendChatAction : Codable, Equatable, TDFunction
-
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)
See moreDeclaration
Swift
public struct OpenChat : Codable, Equatable, TDFunction
-
Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed
See moreDeclaration
Swift
public struct CloseChat : Codable, Equatable, TDFunction
-
Informs TDLib that messages are being viewed by the user. Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels)
See moreDeclaration
Swift
public struct ViewMessages : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct OpenMessageContent : Codable, Equatable, TDFunction
-
Marks all mentions in a chat as read
See moreDeclaration
Swift
public struct ReadAllChatMentions : Codable, Equatable, TDFunction
-
Returns an existing chat corresponding to a given user
See moreDeclaration
Swift
public struct CreatePrivateChat : Codable, Equatable, TDFunction
-
Returns an existing chat corresponding to a known basic group
See moreDeclaration
Swift
public struct CreateBasicGroupChat : Codable, Equatable, TDFunction
-
Returns an existing chat corresponding to a known supergroup or channel
See moreDeclaration
Swift
public struct CreateSupergroupChat : Codable, Equatable, TDFunction
-
Returns an existing chat corresponding to a known secret chat
See moreDeclaration
Swift
public struct CreateSecretChat : Codable, Equatable, TDFunction
-
Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat
See moreDeclaration
Swift
public struct CreateNewBasicGroupChat : Codable, Equatable, TDFunction
-
Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat
See moreDeclaration
Swift
public struct CreateNewSupergroupChat : Codable, Equatable, TDFunction
-
Creates a new secret chat. Returns the newly created chat
See moreDeclaration
Swift
public struct CreateNewSecretChat : Codable, Equatable, TDFunction
-
Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group
See moreDeclaration
Swift
public struct UpgradeBasicGroupChatToSupergroupChat : Codable, Equatable, TDFunction
-
Moves a chat to a different chat list. Current chat list of the chat must ne non-null
See moreDeclaration
Swift
public struct SetChatChatList : Codable, Equatable, TDFunction
-
Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info rights. The title will not be changed until the request to the server has been completed
See moreDeclaration
Swift
public struct SetChatTitle : Codable, Equatable, TDFunction
-
Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info rights. The photo will not be changed before request to the server has been completed
See moreDeclaration
Swift
public struct SetChatPhoto : Codable, Equatable, TDFunction
-
Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right
See moreDeclaration
Swift
public struct SetChatPermissions : Codable, Equatable, TDFunction
-
Changes the draft message in a chat
See moreDeclaration
Swift
public struct SetChatDraftMessage : Codable, Equatable, TDFunction
-
Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can’t be changed
See moreDeclaration
Swift
public struct SetChatNotificationSettings : Codable, Equatable, TDFunction
-
Changes the pinned state of a chat. You can pin up to GetOption(“pinned_chat_count_max”)/GetOption(“pinned_archived_chat_count_max”) non-secret chats and the same number of secret chats in the main/archive chat list
See moreDeclaration
Swift
public struct ToggleChatIsPinned : Codable, Equatable, TDFunction
-
Changes the marked as unread state of a chat
See moreDeclaration
Swift
public struct ToggleChatIsMarkedAsUnread : Codable, Equatable, TDFunction
-
Changes the value of the default disable_notification parameter, used when a message is sent to a chat
See moreDeclaration
Swift
public struct ToggleChatDefaultDisableNotification : Codable, Equatable, TDFunction
-
Changes client data associated with a chat
See moreDeclaration
Swift
public struct SetChatClientData : Codable, Equatable, TDFunction
-
Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info rights
See moreDeclaration
Swift
public struct SetChatDescription : Codable, Equatable, TDFunction
-
Changes the discussion group of a channel chat; requires can_change_info rights in the channel if it is specified
See moreDeclaration
Swift
public struct SetChatDiscussionGroup : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SetChatLocation : Codable, Equatable, TDFunction
-
Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members rights
See moreDeclaration
Swift
public struct SetChatSlowModeDelay : Codable, Equatable, TDFunction
-
Pins a message in a chat; requires can_pin_messages rights
See moreDeclaration
Swift
public struct PinChatMessage : Codable, Equatable, TDFunction
-
Removes the pinned message from a chat; requires can_pin_messages rights in the group or channel
See moreDeclaration
Swift
public struct UnpinChatMessage : Codable, Equatable, TDFunction
-
Adds current user as a new member to a chat. Private and secret chats can’t be joined using this method
See moreDeclaration
Swift
public struct JoinChat : Codable, Equatable, TDFunction
-
Removes current user from chat members. Private and secret chats can’t be left using this method
See moreDeclaration
Swift
public struct LeaveChat : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct AddChatMember : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct AddChatMembers : Codable, Equatable, TDFunction
-
Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for adding new members to the chat and transferring chat ownership; instead, use addChatMember or transferChatOwnership. The chat member status will not be changed until it has been synchronized with the server
See moreDeclaration
Swift
public struct SetChatMemberStatus : Codable, Equatable, TDFunction
-
Checks whether the current session can be used to transfer a chat ownership to another user
See moreDeclaration
Swift
public struct CanTransferOwnership : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct TransferChatOwnership : Codable, Equatable, TDFunction
-
Returns information about a single member of a chat
See moreDeclaration
Swift
public struct GetChatMember : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SearchChatMembers : Codable, Equatable, TDFunction
-
Returns a list of administrators of the chat with their custom titles
See moreDeclaration
Swift
public struct GetChatAdministrators : Codable, Equatable, TDFunction
-
Clears draft messages in all chats
See moreDeclaration
Swift
public struct ClearAllDraftMessages : Codable, Equatable, TDFunction
-
Returns list of chats with non-default notification settings
See moreDeclaration
Swift
public struct GetChatNotificationSettingsExceptions : Codable, Equatable, TDFunction
-
Returns the notification settings for chats of a given type
See moreDeclaration
Swift
public struct GetScopeNotificationSettings : Codable, Equatable, TDFunction
-
Changes notification settings for chats of a given type
See moreDeclaration
Swift
public struct SetScopeNotificationSettings : Codable, Equatable, TDFunction
-
Resets all notification settings to their default values. By default, all chats are unmuted, the sound is set to “default” and message previews are shown
See moreDeclaration
Swift
public struct ResetAllNotificationSettings : Codable, Equatable, TDFunction
-
Changes the order of pinned chats
See moreDeclaration
Swift
public struct SetPinnedChats : Codable, Equatable, TDFunction
-
Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates
See moreDeclaration
Swift
public struct DownloadFile : Codable, Equatable, TDFunction
-
Returns file downloaded prefix size from a given offset
See moreDeclaration
Swift
public struct GetFileDownloadedPrefixSize : Codable, Equatable, TDFunction
-
Stops the downloading of a file. If a file has already been downloaded, does nothing
See moreDeclaration
Swift
public struct CancelDownloadFile : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct UploadFile : Codable, Equatable, TDFunction
-
Stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined
See moreDeclaration
Swift
public struct CancelUploadFile : Codable, Equatable, TDFunction
-
Writes a part of a generated file. This method is intended to be used only if the client has no direct access to TDLib’s file system, because it is usually slower than a direct write to the destination file
See moreDeclaration
Swift
public struct WriteGeneratedFilePart : Codable, Equatable, TDFunction
-
Informs TDLib on a file generation progress
See moreDeclaration
Swift
public struct SetFileGenerationProgress : Codable, Equatable, TDFunction
-
Finishes the file generation
See moreDeclaration
Swift
public struct FinishFileGeneration : Codable, Equatable, TDFunction
-
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 client has no direct access to TDLib’s file system, because it is usually slower than a direct read from the file
See moreDeclaration
Swift
public struct ReadFilePart : Codable, Equatable, TDFunction
-
Deletes a file from the TDLib file cache
See moreDeclaration
Swift
public struct DeleteFile : Codable, Equatable, TDFunction
-
Generates a new invite link for a chat; the previously generated link is revoked. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right
See moreDeclaration
Swift
public struct GenerateChatInviteLink : Codable, Equatable, TDFunction
-
Checks the validity of an invite link for a chat and returns information about the corresponding chat
See moreDeclaration
Swift
public struct CheckChatInviteLink : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct JoinChatByInviteLink : Codable, Equatable, TDFunction
-
Creates a new call
See moreDeclaration
Swift
public struct CreateCall : Codable, Equatable, TDFunction
-
Accepts an incoming call
See moreDeclaration
Swift
public struct AcceptCall : Codable, Equatable, TDFunction
-
Discards a call
See moreDeclaration
Swift
public struct DiscardCall : Codable, Equatable, TDFunction
-
Sends a call rating
See moreDeclaration
Swift
public struct SendCallRating : Codable, Equatable, TDFunction
-
Sends debug information for a call
See moreDeclaration
Swift
public struct SendCallDebugInformation : Codable, Equatable, TDFunction
-
Adds a user to the blacklist
See moreDeclaration
Swift
public struct BlockUser : Codable, Equatable, TDFunction
-
Removes a user from the blacklist
See moreDeclaration
Swift
public struct UnblockUser : Codable, Equatable, TDFunction
-
Returns users that were blocked by the current user
See moreDeclaration
Swift
public struct GetBlockedUsers : Codable, Equatable, TDFunction
-
Adds a user to the contact list or edits an existing contact by their user identifier
See moreDeclaration
Swift
public struct AddContact : Codable, Equatable, TDFunction
-
Adds new contacts or edits existing contacts by their phone numbers; contacts’ user identifiers are ignored
See moreDeclaration
Swift
public struct ImportContacts : Codable, Equatable, TDFunction
-
Returns all user contacts
See moreDeclaration
Swift
public struct GetContacts : Codable, Equatable, TDFunction
-
Searches for the specified query in the first names, last names and usernames of the known user contacts
See moreDeclaration
Swift
public struct SearchContacts : Codable, Equatable, TDFunction
-
Removes users from the contact list
See moreDeclaration
Swift
public struct RemoveContacts : Codable, Equatable, TDFunction
-
Returns the total number of imported contacts
See moreDeclaration
Swift
public struct GetImportedContactCount : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct ChangeImportedContacts : Codable, Equatable, TDFunction
-
Clears all imported contacts, contact list remains unchanged
See moreDeclaration
Swift
public struct ClearImportedContacts : Codable, Equatable, TDFunction
-
Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber
See moreDeclaration
Swift
public struct SharePhoneNumber : Codable, Equatable, TDFunction
-
Returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already
See moreDeclaration
Swift
public struct GetUserProfilePhotos : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetStickers : Codable, Equatable, TDFunction
-
Searches for stickers from public sticker sets that correspond to a given emoji
See moreDeclaration
Swift
public struct SearchStickers : Codable, Equatable, TDFunction
-
Returns a list of installed sticker sets
See moreDeclaration
Swift
public struct GetInstalledStickerSets : Codable, Equatable, TDFunction
-
Returns a list of archived sticker sets
See moreDeclaration
Swift
public struct GetArchivedStickerSets : Codable, Equatable, TDFunction
-
Returns a list of trending sticker sets
See moreDeclaration
Swift
public struct GetTrendingStickerSets : Codable, Equatable, TDFunction
-
Returns a list of sticker sets attached to a file. Currently only photos and videos can have attached sticker sets
See moreDeclaration
Swift
public struct GetAttachedStickerSets : Codable, Equatable, TDFunction
-
Returns information about a sticker set by its identifier
See moreDeclaration
Swift
public struct GetStickerSet : Codable, Equatable, TDFunction
-
Searches for a sticker set by its name
See moreDeclaration
Swift
public struct SearchStickerSet : Codable, Equatable, TDFunction
-
Searches for installed sticker sets by looking for specified query in their title and name
See moreDeclaration
Swift
public struct SearchInstalledStickerSets : Codable, Equatable, TDFunction
-
Searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results
See moreDeclaration
Swift
public struct SearchStickerSets : Codable, Equatable, TDFunction
-
Installs/uninstalls or activates/archives a sticker set
See moreDeclaration
Swift
public struct ChangeStickerSet : Codable, Equatable, TDFunction
-
Informs the server that some trending sticker sets have been viewed by the user
See moreDeclaration
Swift
public struct ViewTrendingStickerSets : Codable, Equatable, TDFunction
-
Changes the order of installed sticker sets
See moreDeclaration
Swift
public struct ReorderInstalledStickerSets : Codable, Equatable, TDFunction
-
Returns a list of recently used stickers
See moreDeclaration
Swift
public struct GetRecentStickers : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct AddRecentSticker : Codable, Equatable, TDFunction
-
Removes a sticker from the list of recently used stickers
See moreDeclaration
Swift
public struct RemoveRecentSticker : Codable, Equatable, TDFunction
-
Clears the list of recently used stickers
See moreDeclaration
Swift
public struct ClearRecentStickers : Codable, Equatable, TDFunction
-
Returns favorite stickers
See moreDeclaration
Swift
public struct GetFavoriteStickers : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct AddFavoriteSticker : Codable, Equatable, TDFunction
-
Removes a sticker from the list of favorite stickers
See moreDeclaration
Swift
public struct RemoveFavoriteSticker : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetStickerEmojis : Codable, Equatable, TDFunction
-
Searches for emojis by keywords. Supported only if the file database is enabled
See moreDeclaration
Swift
public struct SearchEmojis : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetEmojiSuggestionsUrl : Codable, Equatable, TDFunction
-
Returns saved animations
See moreDeclaration
Swift
public struct GetSavedAnimations : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct AddSavedAnimation : Codable, Equatable, TDFunction
-
Removes an animation from the list of saved animations
See moreDeclaration
Swift
public struct RemoveSavedAnimation : Codable, Equatable, TDFunction
-
Returns up to 20 recently used inline bots in the order of their last usage
See moreDeclaration
Swift
public struct GetRecentInlineBots : Codable, Equatable, TDFunction
-
Searches for recently used hashtags by their prefix
See moreDeclaration
Swift
public struct SearchHashtags : Codable, Equatable, TDFunction
-
Removes a hashtag from the list of recently used hashtags
See moreDeclaration
Swift
public struct RemoveRecentHashtag : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetWebPagePreview : Codable, Equatable, TDFunction
-
Returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page
See moreDeclaration
Swift
public struct GetWebPageInstantView : Codable, Equatable, TDFunction
-
Uploads a new profile photo for the current user. If something changes, updateUser will be sent
See moreDeclaration
Swift
public struct SetProfilePhoto : Codable, Equatable, TDFunction
-
Deletes a profile photo. If something changes, updateUser will be sent
See moreDeclaration
Swift
public struct DeleteProfilePhoto : Codable, Equatable, TDFunction
-
Changes the first and last name of the current user. If something changes, updateUser will be sent
See moreDeclaration
Swift
public struct SetName : Codable, Equatable, TDFunction
-
Changes the bio of the current user
See moreDeclaration
Swift
public struct SetBio : Codable, Equatable, TDFunction
-
Changes the username of the current user. If something changes, updateUser will be sent
See moreDeclaration
Swift
public struct SetUsername : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct ChangePhoneNumber : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct ResendChangePhoneNumberCode : Codable, Equatable, TDFunction
-
Checks the authentication code sent to confirm a new phone number of the user
See moreDeclaration
Swift
public struct CheckChangePhoneNumberCode : Codable, Equatable, TDFunction
-
Returns all active sessions of the current user
See moreDeclaration
Swift
public struct GetActiveSessions : Codable, Equatable, TDFunction
-
Terminates a session of the current user
See moreDeclaration
Swift
public struct TerminateSession : Codable, Equatable, TDFunction
-
Terminates all other sessions of the current user
See moreDeclaration
Swift
public struct TerminateAllOtherSessions : Codable, Equatable, TDFunction
-
Returns all website where the current user used Telegram to log in
See moreDeclaration
Swift
public struct GetConnectedWebsites : Codable, Equatable, TDFunction
-
Disconnects website from the current user’s Telegram account
See moreDeclaration
Swift
public struct DisconnectWebsite : Codable, Equatable, TDFunction
-
Disconnects all websites from the current user’s Telegram account
See moreDeclaration
Swift
public struct DisconnectAllWebsites : Codable, Equatable, TDFunction
-
Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel
See moreDeclaration
Swift
public struct SetSupergroupUsername : Codable, Equatable, TDFunction
-
Changes the sticker set of a supergroup; requires can_change_info rights
See moreDeclaration
Swift
public struct SetSupergroupStickerSet : Codable, Equatable, TDFunction
-
Toggles sender signatures messages sent in a channel; requires can_change_info rights
See moreDeclaration
Swift
public struct ToggleSupergroupSignMessages : Codable, Equatable, TDFunction
-
Toggles whether the message history of a supergroup is available to new members; requires can_change_info rights
See moreDeclaration
Swift
public struct ToggleSupergroupIsAllHistoryAvailable : Codable, Equatable, TDFunction
-
Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup
See moreDeclaration
Swift
public struct ReportSupergroupSpam : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetSupergroupMembers : Codable, Equatable, TDFunction
-
Deletes a supergroup or channel along with all messages in the corresponding chat. This will release the supergroup or channel username and remove all members; requires owner privileges in the supergroup or channel. Chats with more than 1000 members can’t be deleted using this method
See moreDeclaration
Swift
public struct DeleteSupergroup : Codable, Equatable, TDFunction
-
Closes a secret chat, effectively transferring its state to secretChatStateClosed
See moreDeclaration
Swift
public struct CloseSecretChat : Codable, Equatable, TDFunction
-
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)
See moreDeclaration
Swift
public struct GetChatEventLog : Codable, Equatable, TDFunction
-
Returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy
See moreDeclaration
Swift
public struct GetPaymentForm : Codable, Equatable, TDFunction
-
Validates the order information provided by a user and returns the available shipping options for a flexible invoice
See moreDeclaration
Swift
public struct ValidateOrderInfo : Codable, Equatable, TDFunction
-
Sends a filled-out payment form to the bot for final verification
See moreDeclaration
Swift
public struct SendPaymentForm : Codable, Equatable, TDFunction
-
Returns information about a successful payment
See moreDeclaration
Swift
public struct GetPaymentReceipt : Codable, Equatable, TDFunction
-
Returns saved order info, if any
See moreDeclaration
Swift
public struct GetSavedOrderInfo : Codable, Equatable, TDFunction
-
Deletes saved order info
See moreDeclaration
Swift
public struct DeleteSavedOrderInfo : Codable, Equatable, TDFunction
-
Deletes saved credentials for all payment provider bots
See moreDeclaration
Swift
public struct DeleteSavedCredentials : Codable, Equatable, TDFunction
-
Returns a user that can be contacted to get support
See moreDeclaration
Swift
public struct GetSupportUser : Codable, Equatable, TDFunction
-
Returns backgrounds installed by the user
See moreDeclaration
Swift
public struct GetBackgrounds : Codable, Equatable, TDFunction
-
Constructs a persistent HTTP URL for a background
See moreDeclaration
Swift
public struct GetBackgroundUrl : Codable, Equatable, TDFunction
-
Searches for a background by its name
See moreDeclaration
Swift
public struct SearchBackground : Codable, Equatable, TDFunction
-
Changes the background selected by the user; adds background to the list of installed backgrounds
See moreDeclaration
Swift
public struct SetBackground : Codable, Equatable, TDFunction
-
Removes background from the list of installed backgrounds
See moreDeclaration
Swift
public struct RemoveBackground : Codable, Equatable, TDFunction
-
Resets list of installed backgrounds to its default value
See moreDeclaration
Swift
public struct ResetBackgrounds : Codable, Equatable, TDFunction
-
Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization
See moreDeclaration
Swift
public struct GetLocalizationTargetInfo : Codable, Equatable, TDFunction
-
Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization
See moreDeclaration
Swift
public struct GetLanguagePackInfo : Codable, Equatable, TDFunction
-
Returns strings from a language pack in the current localization target by their keys. Can be called before authorization
See moreDeclaration
Swift
public struct GetLanguagePackStrings : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SynchronizeLanguagePack : Codable, Equatable, TDFunction
-
Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization
See moreDeclaration
Swift
public struct AddCustomServerLanguagePack : Codable, Equatable, TDFunction
-
Adds or changes a custom local language pack to the current localization target
See moreDeclaration
Swift
public struct SetCustomLanguagePack : Codable, Equatable, TDFunction
-
Edits information about a custom local language pack in the current localization target. Can be called before authorization
See moreDeclaration
Swift
public struct EditCustomLanguagePackInfo : Codable, Equatable, TDFunction
-
Adds, edits or deletes a string in a custom local language pack. Can be called before authorization
See moreDeclaration
Swift
public struct SetCustomLanguagePackString : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct DeleteLanguagePack : Codable, Equatable, TDFunction
-
Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription
See moreDeclaration
Swift
public struct RegisterDevice : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct ProcessPushNotification : Codable, Equatable, TDFunction
-
Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct GetPushReceiverId : Codable, Equatable, TDFunction
-
Returns t.me URLs recently visited by a newly registered user
See moreDeclaration
Swift
public struct GetRecentlyVisitedTMeUrls : Codable, Equatable, TDFunction
-
Changes user privacy settings
See moreDeclaration
Swift
public struct SetUserPrivacySettingRules : Codable, Equatable, TDFunction
-
Returns the current privacy settings
See moreDeclaration
Swift
public struct GetUserPrivacySettingRules : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetOption : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SetOption : Codable, Equatable, TDFunction
-
Changes the period of inactivity after which the account of the current user will automatically be deleted
See moreDeclaration
Swift
public struct SetAccountTtl : Codable, Equatable, TDFunction
-
Returns the period of inactivity after which the account of the current user will automatically be deleted
See moreDeclaration
Swift
public struct GetAccountTtl : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct DeleteAccount : Codable, Equatable, TDFunction
-
Removes a chat action bar without any other action
See moreDeclaration
Swift
public struct RemoveChatActionBar : Codable, Equatable, TDFunction
-
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, or when the report is done from the chat action bar
See moreDeclaration
Swift
public struct ReportChat : Codable, Equatable, TDFunction
-
Returns an HTTP URL with the chat statistics. Currently this method can be used only for channels. Can be used only if SupergroupFullInfo.can_view_statistics == true
See moreDeclaration
Swift
public struct GetChatStatisticsUrl : Codable, Equatable, TDFunction
-
Returns storage usage statistics. Can be called before authorization
See moreDeclaration
Swift
public struct GetStorageStatistics : Codable, Equatable, TDFunction
-
Quickly returns approximate storage usage statistics. Can be called before authorization
See moreDeclaration
Swift
public struct GetStorageStatisticsFast : Codable, Equatable, TDFunction
-
Returns database statistics
See moreDeclaration
Swift
public struct GetDatabaseStatistics : Codable, Equatable, TDFunction
-
Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can’t be deleted
See moreDeclaration
Swift
public struct OptimizeStorage : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SetNetworkType : Codable, Equatable, TDFunction
-
Returns network data usage statistics. Can be called before authorization
See moreDeclaration
Swift
public struct GetNetworkStatistics : Codable, Equatable, TDFunction
-
Adds the specified data to data usage statistics. Can be called before authorization
See moreDeclaration
Swift
public struct AddNetworkStatistics : Codable, Equatable, TDFunction
-
Resets all network data usage statistics to zero. Can be called before authorization
See moreDeclaration
Swift
public struct ResetNetworkStatistics : Codable, Equatable, TDFunction
-
Returns auto-download settings presets for the currently logged in user
See moreDeclaration
Swift
public struct GetAutoDownloadSettingsPresets : Codable, Equatable, TDFunction
-
Sets auto-download settings
See moreDeclaration
Swift
public struct SetAutoDownloadSettings : Codable, Equatable, TDFunction
-
Returns one of the available Telegram Passport elements
See moreDeclaration
Swift
public struct GetPassportElement : Codable, Equatable, TDFunction
-
Returns all available Telegram Passport elements
See moreDeclaration
Swift
public struct GetAllPassportElements : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SetPassportElement : Codable, Equatable, TDFunction
-
Deletes a Telegram Passport element
See moreDeclaration
Swift
public struct DeletePassportElement : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SetPassportElementErrors : Codable, Equatable, TDFunction
-
Returns an IETF language tag of the language preferred in the country, which should be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown
See moreDeclaration
Swift
public struct GetPreferredCountryLanguage : Codable, Equatable, TDFunction
-
Sends a code to verify a phone number to be added to a user’s Telegram Passport
See moreDeclaration
Swift
public struct SendPhoneNumberVerificationCode : Codable, Equatable, TDFunction
-
Re-sends the code to verify a phone number to be added to a user’s Telegram Passport
See moreDeclaration
Swift
public struct ResendPhoneNumberVerificationCode : Codable, Equatable, TDFunction
-
Checks the phone number verification code for Telegram Passport
See moreDeclaration
Swift
public struct CheckPhoneNumberVerificationCode : Codable, Equatable, TDFunction
-
Sends a code to verify an email address to be added to a user’s Telegram Passport
See moreDeclaration
Swift
public struct SendEmailAddressVerificationCode : Codable, Equatable, TDFunction
-
Re-sends the code to verify an email address to be added to a user’s Telegram Passport
See moreDeclaration
Swift
public struct ResendEmailAddressVerificationCode : Codable, Equatable, TDFunction
-
Checks the email address verification code for Telegram Passport
See moreDeclaration
Swift
public struct CheckEmailAddressVerificationCode : Codable, Equatable, TDFunction
-
Returns a Telegram Passport authorization form for sharing data with a service
See moreDeclaration
Swift
public struct GetPassportAuthorizationForm : Codable, Equatable, TDFunction
-
Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form
See moreDeclaration
Swift
public struct GetPassportAuthorizationFormAvailableElements : Codable, Equatable, TDFunction
-
Sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements need to be used
See moreDeclaration
Swift
public struct SendPassportAuthorizationForm : Codable, Equatable, TDFunction
-
Sends phone number confirmation code. Should be called when user presses “https://t.me/confirmphone?phone=*******&hash=**********” or “tg://confirmphone?phone=****&hash=*******” link
See moreDeclaration
Swift
public struct SendPhoneNumberConfirmationCode : Codable, Equatable, TDFunction
-
Resends phone number confirmation code
See moreDeclaration
Swift
public struct ResendPhoneNumberConfirmationCode : Codable, Equatable, TDFunction
-
Checks phone number confirmation code
See moreDeclaration
Swift
public struct CheckPhoneNumberConfirmationCode : Codable, Equatable, TDFunction
-
Informs the server about the number of pending bot updates if they haven’t been processed for a long time; for bots only
See moreDeclaration
Swift
public struct SetBotUpdatesStatus : Codable, Equatable, TDFunction
-
Uploads a PNG image with a sticker; for bots only; returns the uploaded file
See moreDeclaration
Swift
public struct UploadStickerFile : Codable, Equatable, TDFunction
-
Creates a new sticker set; for bots only. Returns the newly created sticker set
See moreDeclaration
Swift
public struct CreateNewStickerSet : Codable, Equatable, TDFunction
-
Adds a new sticker to a set; for bots only. Returns the sticker set
See moreDeclaration
Swift
public struct AddStickerToSet : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct SetStickerPositionInSet : Codable, Equatable, TDFunction
-
Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot
See moreDeclaration
Swift
public struct RemoveStickerFromSet : Codable, Equatable, TDFunction
-
Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded
See moreDeclaration
Swift
public struct GetMapThumbnailFile : Codable, Equatable, TDFunction
-
Accepts Telegram terms of services
See moreDeclaration
Swift
public struct AcceptTermsOfService : Codable, Equatable, TDFunction
-
Sends a custom request; for bots only
See moreDeclaration
Swift
public struct SendCustomRequest : Codable, Equatable, TDFunction
-
Answers a custom query; for bots only
See moreDeclaration
Swift
public struct AnswerCustomQuery : Codable, Equatable, TDFunction
-
Succeeds after a specified amount of time has passed. Can be called before authorization. Can be called before initialization
See moreDeclaration
Swift
public struct SetAlarm : Codable, Equatable, TDFunction
-
Uses current user IP to found their country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization
See moreDeclaration
Swift
public struct GetCountryCode : Codable, Equatable, TDFunction
-
Returns the default text for invitation messages to be used as a placeholder when the current user invites friends to Telegram
See moreDeclaration
Swift
public struct GetInviteText : Codable, Equatable, TDFunction
-
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
See moreDeclaration
Swift
public struct GetDeepLinkInfo : Codable, Equatable, TDFunction
-
Returns application config, provided by the server. Can be called before authorization
See moreDeclaration
Swift
public struct GetApplicationConfig : Codable, Equatable, TDFunction
-
Saves application log event on the server. Can be called before authorization
See moreDeclaration
Swift
public struct SaveApplicationLogEvent : Codable, Equatable, TDFunction
-
Adds a proxy server for network requests. Can be called before authorization
See moreDeclaration
Swift
public struct AddProxy : Codable, Equatable, TDFunction
-
Edits an existing proxy server for network requests. Can be called before authorization
See moreDeclaration
Swift
public struct EditProxy : Codable, Equatable, TDFunction
-
Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization
See moreDeclaration
Swift
public struct EnableProxy : Codable, Equatable, TDFunction
-
Disables the currently enabled proxy. Can be called before authorization
See moreDeclaration
Swift
public struct DisableProxy : Codable, Equatable, TDFunction
-
Removes a proxy server. Can be called before authorization
See moreDeclaration
Swift
public struct RemoveProxy : Codable, Equatable, TDFunction
-
Returns list of proxies that are currently set up. Can be called before authorization
See moreDeclaration
Swift
public struct GetProxies : Codable, Equatable, TDFunction
-
Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization
See moreDeclaration
Swift
public struct GetProxyLink : Codable, Equatable, TDFunction
-
Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization
See moreDeclaration
Swift
public struct PingProxy : Codable, Equatable, TDFunction
-
Sets new log stream for internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct SetLogStream : Codable, Equatable, TDFunction
-
Returns information about currently used log stream for internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct GetLogStream : Codable, Equatable, TDFunction
-
Sets the verbosity level of the internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct SetLogVerbosityLevel : Codable, Equatable, TDFunction
-
Returns current verbosity level of the internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct GetLogVerbosityLevel : Codable, Equatable, TDFunction
-
Returns list of available TDLib internal log tags, for example, [“actor”, “binlog”, “connections”, “notifications”, “proxy”]. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct GetLogTags : Codable, Equatable, TDFunction
-
Sets the verbosity level for a specified TDLib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct SetLogTagVerbosityLevel : Codable, Equatable, TDFunction
-
Returns current verbosity level for a specified TDLib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct GetLogTagVerbosityLevel : Codable, Equatable, TDFunction
-
Adds a message to TDLib internal log. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct AddLogMessage : Codable, Equatable, TDFunction
-
Does nothing; for testing only. This is an offline method. Can be called before authorization
See moreDeclaration
Swift
public struct TestCallEmpty : Codable, Equatable, TDFunction
-
Returns the received string; for testing only. This is an offline method. Can be called before authorization
See moreDeclaration
Swift
public struct TestCallString : Codable, Equatable, TDFunction
-
Returns the received bytes; for testing only. This is an offline method. Can be called before authorization
See moreDeclaration
Swift
public struct TestCallBytes : Codable, Equatable, TDFunction
-
Returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization
See moreDeclaration
Swift
public struct TestCallVectorInt : Codable, Equatable, TDFunction
-
Returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization
See moreDeclaration
Swift
public struct TestCallVectorIntObject : Codable, Equatable, TDFunction
-
Returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization
See moreDeclaration
Swift
public struct TestCallVectorString : Codable, Equatable, TDFunction
-
Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization
See moreDeclaration
Swift
public struct TestCallVectorStringObject : Codable, Equatable, TDFunction
-
Returns the squared received number; for testing only. This is an offline method. Can be called before authorization
See moreDeclaration
Swift
public struct TestSquareInt : Codable, Equatable, TDFunction
-
Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization
See moreDeclaration
Swift
public struct TestNetwork : Codable, Equatable, TDFunction
-
Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization
See moreDeclaration
Swift
public struct TestProxy : Codable, Equatable, TDFunction
-
Forces an updates.getDifference call to the Telegram servers; for testing only
See moreDeclaration
Swift
public struct TestGetDifference : Codable, Equatable, TDFunction
-
Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization
See moreDeclaration
Swift
public struct TestUseUpdate : Codable, Equatable, TDFunction
-
Returns the specified error and ensures that the Error object is used; for testing only. This is an offline method. Can be called before authorization. Can be called synchronously
See moreDeclaration
Swift
public struct TestReturnError : Codable, Equatable, TDFunction