Below you will find information on schema changes. A layer number is a contract:
within one layer signatures do not change, and if a constructor changes it gets a new
identifier and arrives in a new layer while the old one keeps working. The client
declares its layer when it connects and gets answers in it — see
the protocol page for how the number travels on the wire.
Layer 232 — Current server-layer schema
Complete published schema snapshot: 1720 constructors and 859 methods. This is an interface reference, not a claim that every scenario is implemented.
Open the schema of this layer »
The layer covers the following areas:
Methods (859)
- Defined invokeAfterMsg — Invokes a query after successful completion of one of the previous queries.
- Defined invokeAfterMsgs — Invokes a query after a successful completion of previous queries
- Defined initConnection — Initialize connection
- Defined invokeWithLayer — Invoke the specified query using the specified API layer
- Defined invokeWithoutUpdates — Invoke a request without subscribing the used connection for updates (this is enabled by default for file queries).
- Defined invokeWithMessagesRange — Invoke with the given message range
- Defined invokeWithTakeout — Invoke a method within a takeout session, see here » for more info.
- Defined invokeWithBusinessConnection — Invoke a method using a Ansible Business Bot connection, see here » for more info, including a list of the methods that can be wrapped in this constructor.Make sure to always send queries wrapped in a invokeWithBusinessConnection to the datacenter ID, specified in the dc_id field of the botBusinessConnection that is being used.
- Defined invokeWithGooglePlayIntegrity — Official clients only, invoke with Google Play Integrity token.
- Defined invokeWithApnsSecret — Official clients only, invoke with Apple push verification.
- Defined invokeWithReCaptcha — Official clients only: re-execute a method call that required reCAPTCHA verification via a RECAPTCHA_CHECK_%s__%s, where the first placeholder is the action, and the second one is the reCAPTCHA key ID.
- Defined auth.sendCode — Send the verification code for login
- Defined auth.signUp — Registers a validated phone number in the system.
- Defined auth.signIn — Signs in a user with a validated phone number.
- Defined auth.logOut — Logs out the user.
- Defined auth.resetAuthorizations — Terminates all user's authorized sessions except for the current one.After calling this method it is necessary to reregister the current device using the method account.registerDevice
- Defined auth.exportAuthorization — Returns data for copying authorization to another data-center.
- Defined auth.importAuthorization — Logs in a user using a key transmitted from his native data-center.
- Defined auth.bindTempAuthKey — Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id.For more information, see Perfect Forward Secrecy.
- Defined auth.importBotAuthorization — Login as a bot
- Defined auth.checkPassword — Try logging to an account protected by a 2FA password.
- Defined auth.requestPasswordRecovery — Request recovery code of a 2FA password, only for accounts with a recovery email configured.
- Defined auth.recoverPassword — Reset the 2FA password using the recovery code sent using auth.requestPasswordRecovery.
- Defined auth.resendCode — Resend the login code via another medium, the phone code type is determined by the return value of the previous auth.sendCode/auth.resendCode: see login for more info.
- Defined auth.cancelCode — Cancel the login verification code
- Defined auth.dropTempAuthKeys — Delete all temporary authorization keys except for the ones specified
- Defined auth.exportLoginToken — Generate a login token, for login via QR code. The generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken deep link » in the QR code.For more info, see login via QR code.
- Defined auth.importLoginToken — Login using a redirected login token, generated in case of DC mismatch during QR code login.For more info, see login via QR code.
- Defined auth.acceptLoginToken — Accept QR code login token, logging in the app that generated it.Returns info about the new session.For more info, see login via QR code.
- Defined auth.checkRecoveryPassword — Check if the 2FA recovery code sent using auth.requestPasswordRecovery is valid, before passing it to auth.recoverPassword.
- Defined auth.importWebTokenAuthorization — Login by importing an authorization token
- Defined auth.requestFirebaseSms — Request an SMS code via Firebase.
- Defined auth.resetLoginEmail — Reset the login email ».
- Defined auth.reportMissingCode — Official apps only, reports that the SMS authentication code wasn't delivered.
- Defined auth.checkPaidAuth — Checks the status of a login payment.
- Defined auth.initPasskeyLogin — Initialize login with a passkey over an unauthenticated connection, see here » for more info.
- Defined auth.finishPasskeyLogin — Complete login with a passkey over an unauthenticated connection, see here » for more info.Must be sent to the user's native DC, as specified by the user_handle (dcId:userId) returned in the passkey assertion, see here » for the full flow.
- Defined auth.cancelWebTokenAuthorization
- Defined auth.initFirebasePnvLogin
- Defined auth.finishFirebasePnvLogin
- Defined auth.firebasePnvSignUp
- Defined account.registerDevice — Register device to receive PUSH notifications
- Defined account.unregisterDevice — Deletes a device by its token, stops sending PUSH-notifications to it.
- Defined account.updateNotifySettings — Edits notification settings from a given user/group, from all users/all groups.
- Defined account.getNotifySettings — Gets current notification settings for a given user/group, from all users/all groups.
- Defined account.resetNotifySettings — Resets all notification settings from users and groups.
- Defined account.updateProfile — Updates user profile.
- Defined account.updateStatus — Updates online user status.
- Defined account.getWallPapers — Returns a list of available wallpapers.
- Defined account.reportPeer — Report a peer for violation of Ansible Terms of Service
- Defined account.checkUsername — Validates a username and checks availability.
- Defined account.updateUsername — Changes username for the current user.
- Defined account.getPrivacy — Get privacy settings of current account
- Defined account.setPrivacy — Change privacy settings of current account
- Defined account.deleteAccount — Delete the user's account from the Ansible servers.Can also be used to delete the account of a user that provided the login code, but forgot the 2FA password and no recovery method is configured, see here » for more info on password recovery, and here » for more info on account deletion.
- Defined account.getAccountTTL — Get days to live of account
- Defined account.setAccountTTL — Set account self-destruction period
- Defined account.sendChangePhoneCode — Verify a new phone number to associate to the current account
- Defined account.changePhone — Change the phone number of the current account
- Defined account.updateDeviceLocked — When client-side passcode lock feature is enabled, will not show message texts in incoming PUSH notifications.
- Defined account.getAuthorizations — Get logged-in sessions
- Defined account.resetAuthorization — Log out an active authorized session by its hash
- Defined account.getPassword — Obtain configuration for two-factor authorization with password
- Defined account.getPasswordSettings — Get private info associated to the password info (recovery email, Ansible passport info & so on)
- Defined account.updatePasswordSettings — Set a new 2FA password
- Defined account.sendConfirmPhoneCode — Send confirmation code to cancel account deletion, for more info click here »
- Defined account.confirmPhone — Confirm a phone number to cancel account deletion, for more info click here »
- Defined account.getTmpPassword — Get temporary payment password
- Defined account.getWebAuthorizations — Get web login widget authorizations
- Defined account.resetWebAuthorization — Log out an active web Ansible login session
- Defined account.resetWebAuthorizations — Reset all active web Ansible login sessions
- Defined account.getAllSecureValues — Get all saved Ansible Passport documents, for more info see the passport docs »
- Defined account.getSecureValue — Get saved Ansible Passport document, for more info see the passport docs »
- Defined account.saveSecureValue — Securely save Ansible Passport document, for more info see the passport docs »
- Defined account.deleteSecureValue — Delete stored Ansible Passport documents, for more info see the passport docs »
- Defined account.getAuthorizationForm — Returns a Ansible Passport authorization form for sharing data with a service
- Defined account.acceptAuthorization — Sends a Ansible Passport authorization form, effectively sharing data with the service
- Defined account.sendVerifyPhoneCode — Send the verification phone code for Ansible passport.
- Defined account.verifyPhone — Verify a phone number for Ansible passport.
- Defined account.sendVerifyEmailCode — Send an email verification code.
- Defined account.verifyEmail — Verify an email address.
- Defined account.initTakeoutSession — Initialize a takeout session, see here » for more info.
- Defined account.finishTakeoutSession — Terminate a takeout session, see here » for more info.
- Defined account.confirmPasswordEmail — Verify an email to use as 2FA recovery method.
- Defined account.resendPasswordEmail — Resend the code to verify an email to use as 2FA recovery method.
- Defined account.cancelPasswordEmail — Cancel the code that was sent to verify an email to use as 2FA recovery method.
- Defined account.getContactSignUpNotification — Whether the user will receive notifications when contacts sign up
- Defined account.setContactSignUpNotification — Toggle contact sign up notifications
- Defined account.getNotifyExceptions — Returns list of chats with non-default notification settings
- Defined account.getWallPaper — Get info about a certain wallpaper
- Defined account.uploadWallPaper — Create and upload a new wallpaper
- Defined account.saveWallPaper — Install/uninstall wallpaper
- Defined account.installWallPaper — Install wallpaper
- Defined account.resetWallPapers — Delete all installed wallpapers, reverting to the default wallpaper set.
- Defined account.getAutoDownloadSettings — Get media autodownload settings
- Defined account.saveAutoDownloadSettings — Change media autodownload settings
- Defined account.uploadTheme — Upload theme
- Defined account.createTheme — Create a theme
- Defined account.updateTheme — Update theme
- Defined account.saveTheme — Save a theme
- Defined account.installTheme — Install a theme
- Defined account.getTheme — Get theme information
- Defined account.getThemes — Get installed themes
- Defined account.setContentSettings — Set sensitive content settings (for viewing or hiding NSFW content)
- Defined account.getContentSettings — Get sensitive content settings
- Defined account.getMultiWallPapers — Get info about multiple wallpapers
- Defined account.getGlobalPrivacySettings — Get global privacy settings
- Defined account.setGlobalPrivacySettings — Set global privacy settings
- Defined account.reportProfilePhoto — Report a profile photo of a dialog
- Defined account.resetPassword — Initiate a 2FA password reset: can only be used if the user is already logged-in, see here for more info »
- Defined account.declinePasswordReset — Abort a pending 2FA password reset, see here for more info »
- Defined account.getChatThemes — Get all available chat themes ».
- Defined account.setAuthorizationTTL — Set time-to-live of current session
- Defined account.changeAuthorizationSettings — Change settings related to a session.
- Defined account.getSavedRingtones — Fetch saved notification sounds
- Defined account.saveRingtone — Save or remove saved notification sound.If the notification sound is already in MP3 format, account.savedRingtone will be returned. Otherwise, it will be automatically converted and a account.savedRingtoneConverted will be returned, containing a new document object that should be used to refer to the ringtone from now on (ie when deleting it using the unsave parameter, or when downloading it).
- Defined account.uploadRingtone — Upload notification sound, use account.saveRingtone to convert it and add it to the list of saved notification sounds.
- Defined account.updateEmojiStatus — Set an emoji status
- Defined account.getDefaultEmojiStatuses — Get a list of default suggested emoji statuses
- Defined account.getRecentEmojiStatuses — Get recently used emoji statuses
- Defined account.clearRecentEmojiStatuses — Clears list of recently used emoji statuses
- Defined account.reorderUsernames — Reorder usernames associated with the currently logged-in user.
- Defined account.toggleUsername — Activate or deactivate a purchased fragment.com username associated to the currently logged-in user.
- Defined account.getDefaultProfilePhotoEmojis — Get a set of suggested custom emoji stickers that can be used as profile picture
- Defined account.getDefaultGroupPhotoEmojis — Get a set of suggested custom emoji stickers that can be used as group picture
- Defined account.getAutoSaveSettings — Get autosave settings
- Defined account.saveAutoSaveSettings — Modify autosave settings
- Defined account.deleteAutoSaveExceptions — Clear all peer-specific autosave settings.
- Defined account.invalidateSignInCodes — Invalidate the specified login codes, see here » for more info.
- Defined account.updateColor — Update the accent color and background custom emoji » of the current account.
- Defined account.getDefaultBackgroundEmojis — Get a set of suggested custom emoji stickers that can be used in an accent color pattern.
- Defined account.getChannelDefaultEmojiStatuses — Get a list of default suggested channel emoji statuses.
- Defined account.getChannelRestrictedStatusEmojis — Returns fetch the full list of custom emoji IDs » that cannot be used in channel emoji statuses ».
- Defined account.updateBusinessWorkHours — Specify a set of Ansible Business opening hours. This info will be contained in userFull.business_work_hours.To remove all opening hours, invoke the method without setting the business_work_hours field.Note that the opening hours specified by the user must be appropriately validated and transformed before invoking the method, as specified here ».
- Defined account.updateBusinessLocation — Businesses » may advertise their location using this method, see here » for more info.To remove business location information invoke the method without setting any of the parameters.
- Defined account.updateBusinessGreetingMessage — Set a list of Ansible Business greeting messages.
- Defined account.updateBusinessAwayMessage — Set a list of Ansible Business away messages.
- Defined account.updateConnectedBot — Connect a business bot » to the current account, or to change the current connection settings.
- Defined account.getConnectedBots — List all currently connected business bots »
- Defined account.getBotBusinessConnection — Bots may invoke this method to re-fetch the updateBotBusinessConnect constructor associated with a specific business connection_id, see here » for more info on connected business bots. This is needed for example for freshly logged in bots that are receiving some updateBotNewBusinessMessage, etc. updates because some users have already connected to the bot before it could login. In this case, the bot is receiving messages from the business connection, but it hasn't cached the associated updateBotBusinessConnect with info about the connection (can it reply to messages? etc.) yet, and cannot receive the old ones because they were sent when the bot wasn't logged into the session yet. This method can be used to fetch info about a not-yet-cached business connection, and should not be invoked if the info is already cached or to fetch changes, as eventual changes will automatically be sent as new updateBotBusinessConnect updates to the bot using the usual update delivery methods ».
- Defined account.updateBusinessIntro — Set or remove the Ansible Business introduction ».
- Defined account.toggleConnectedBotPaused — Pause or unpause a specific chat, temporarily disconnecting it from all business bots ».
- Defined account.disablePeerConnectedBot — Permanently disconnect a specific chat from all business bots » (equivalent to specifying it in recipients.exclude_users during initial configuration with account.updateConnectedBot »); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking account.updateConnectedBot ».
- Defined account.updateBirthday — Update our birthday, see here » for more info.
- Defined account.createBusinessChatLink — Create a business chat deep link ».
- Defined account.editBusinessChatLink — Edit a created business chat deep link ».
- Defined account.deleteBusinessChatLink — Delete a business chat deep link ».
- Defined account.getBusinessChatLinks — List all created business chat deep links ».
- Defined account.resolveBusinessChatLink — Resolve a business chat deep link ».
- Defined account.updatePersonalChannel — Associate (or remove) a personal channel », that will be listed on our personal profile page ».Changing it will emit an updateUser update.
- Defined account.toggleSponsoredMessages — Disable or re-enable Ansible ads for the current Premium account.Useful for business owners that may want to launch and view their own Ansible ads via the Ansible ad platform ».
- Defined account.getReactionsNotifySettings — Get the current reaction notification settings ».
- Defined account.setReactionsNotifySettings — Change the reaction notification settings ».
- Defined account.getCollectibleEmojiStatuses — Obtain a list of emoji statuses » for owned or hosted collectible gifts ».
- Defined account.getPaidMessagesRevenue — Get the number of stars we have received from the specified user thanks to paid messages »; the received amount will be equal to the sent amount multiplied by stars_paid_message_commission_permille divided by 1000.
- Defined account.toggleNoPaidMessagesException — Allow a user to send us messages without paying if paid messages » are enabled.
- Defined account.setMainProfileTab — Changes the main profile tab of the current user, see here » for more info.
- Defined account.saveMusic — Adds or removes a song from the current user's profile see here » for more info on the music tab of the profile page.
- Defined account.getSavedMusicIds — Fetch the full list of only the IDs of songs currently added to the profile, see here » for more info.
- Defined account.getUniqueGiftChatThemes — Obtain all chat themes » associated to owned or hosted collectible gifts ».
- Defined account.initPasskeyRegistration — Initialize passkey registration for the current account, see here » for more info on the full flow.
- Defined account.registerPasskey — Complete passkey registration for the current account, see here » for more info on the full flow.
- Defined account.getPasskeys — List the passkeys associated to the current account that can be used to log in, see here » for more info on passkeys.
- Defined account.deletePasskey — Delete a passkey associated to the current account, see here » for more info.
- Defined account.confirmBotConnection
- Defined account.getWebBrowserSettings
- Defined account.updateWebBrowserSettings
- Defined account.toggleWebBrowserSettingsException
- Defined account.deleteWebBrowserSettingsExceptions
- Defined users.getUsers — Returns basic user info according to their identifiers.
- Defined users.getFullUser — Returns extended user info by ID.
- Defined users.setSecureValueErrors — Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change).Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.
- Defined users.getRequirementsToContact — Check whether we can write to the specified users, used to implement bulk checks for Premium-only messages » and paid messages ».For each input user, returns a RequirementToContact constructor (at the same offset in the vector) containing requirements to contact them.
- Defined users.getSavedMusic — Get songs pinned to the user's profile, see here » for more info.
- Defined users.getSavedMusicByID — Check if the passed songs are still pinned to the user's profile, or refresh the file references of songs pinned on a user's profile see here » for more info.
- Defined users.suggestBirthday — Suggest a birthday to another user, see here » for more info on birthdays in the API.
- Defined contacts.getContactIDs — Get the Ansible IDs of all contacts. Returns an array of Ansible user IDs for all contacts (0 if a contact does not have an associated Ansible account or have hidden their account using privacy settings).
- Defined contacts.getStatuses — Use this method to obtain the online statuses of all contacts with an accessible Ansible account.
- Defined contacts.getContacts — Returns the current user's contact list.
- Defined contacts.importContacts — Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info.Use contacts.addContact to add Ansible contacts without actually using their phone number.
- Defined contacts.deleteContacts — Deletes several contacts from the list.
- Defined contacts.deleteByPhones — Delete contacts by phone number
- Defined contacts.block — Adds a peer to a blocklist, see here » for more info.
- Defined contacts.unblock — Deletes a peer from a blocklist, see here » for more info.
- Defined contacts.getBlocked — Returns the list of blocked users.
- Defined contacts.search — Returns users found by username substring.
- Defined contacts.resolveUsername — Resolve a @username to get peer info
- Defined contacts.getTopPeers — Get most used peers
- Defined contacts.resetTopPeerRating — Reset rating of top peer
- Defined contacts.resetSaved — Removes all contacts without an associated Ansible account.
- Defined contacts.getSaved — Get all contacts, requires a takeout session, see here » for more info.
- Defined contacts.toggleTopPeers — Enable/disable top peers
- Defined contacts.addContact — Add an existing Ansible user as contact.Use contacts.importContacts to add contacts by phone number, without knowing their Ansible ID.
- Defined contacts.acceptContact — If the add contact action bar is active, add that user as contact
- Defined contacts.getLocated — Get users and geochats near you, see here » for more info.
- Defined contacts.blockFromReplies — Stop getting notifications about discussion replies of a certain user in @replies
- Defined contacts.resolvePhone — Resolve a phone number to get user info, if their privacy settings allow it.Make sure to implement client-side ratelimiting/debounce for this method, allowing at most 1 call every 3 seconds.
- Defined contacts.exportContactToken — Generates a temporary profile link for the currently logged-in user.
- Defined contacts.importContactToken — Obtain user info from a temporary profile link.
- Defined contacts.editCloseFriends — Edit the close friends list, see here » for more info.
- Defined contacts.setBlocked — Replace the contents of an entire blocklist, see here for more info ».
- Defined contacts.getBirthdays — Fetch all users with birthdays that fall within +1/-1 days, relative to the current day: this method should be invoked by clients every 6-8 hours, and if the result is non-empty, it should be used to appropriately update locally cached birthday information in user.birthday.See here » for more info.
- Defined contacts.getSponsoredPeers — Obtain a list of sponsored peer search results for a given query
- Defined contacts.updateContactNote — Update the private note associated to a contact; see here » for more info.
- Defined contacts.exportNoPaidMessagesToken
- Defined contacts.importNoPaidMessagesToken
- Defined messages.getMessages — Returns the list of messages by their IDs.
- Defined messages.getDialogs — Returns the current user dialog list.
- Defined messages.getHistory — Returns the message history in a peer.Results are ordered by date (descending).
- Defined messages.search — Search for messages.
- Defined messages.readHistory — Marks message history as read.
- Defined messages.deleteHistory — Deletes communication history.
- Defined messages.deleteMessages — Deletes messages by their identifiers.
- Defined messages.receivedMessages — Confirms receipt of messages by a client, cancels PUSH-notification sending.
- Defined messages.setTyping — Sends a current user typing event (see SendMessageAction for all event types) to a conversation partner or group.
- Defined messages.sendMessage — Sends a message to a chat
- Defined messages.sendMedia — Send a media
- Defined messages.forwardMessages — Forwards messages by their IDs.
- Defined messages.reportSpam — Report a new incoming chat for spam, if the peer settings of the chat allow us to do that
- Defined messages.getPeerSettings — Get peer settings
- Defined messages.report — Report a message in a chat for violation of Ansible Terms of Service
- Defined messages.getChats — Returns chat basic info on their IDs.
- Defined messages.getFullChat — Get full info about a basic group.
- Defined messages.editChatTitle — Changes chat name and sends a service message on it.
- Defined messages.editChatPhoto — Changes chat photo and sends a service message on it
- Defined messages.addChatUser — Adds a user to a chat and sends a service message on it.
- Defined messages.deleteChatUser — Deletes a user from a chat and sends a service message on it.
- Defined messages.createChat — Creates a new chat.
- Defined messages.getDhConfig — Returns configuration parameters for Diffie-Hellman key generation. Can also return a random sequence of bytes of required length.
- Defined messages.requestEncryption — Sends a request to start a secret chat to the user.
- Defined messages.acceptEncryption — Confirms creation of a secret chat
- Defined messages.discardEncryption — Cancels a request for creation and/or delete info on secret chat.
- Defined messages.setEncryptedTyping — Send typing event by the current user to a secret chat.
- Defined messages.readEncryptedHistory — Marks message history within a secret chat as read.
- Defined messages.sendEncrypted — Sends a text message to a secret chat.
- Defined messages.sendEncryptedFile — Sends a message with a file attachment to a secret chat
- Defined messages.sendEncryptedService — Sends a service message to a secret chat.
- Defined messages.receivedQueue — Confirms receipt of messages in a secret chat by client, cancels push notifications. The method returns a list of random_ids of messages for which push notifications were cancelled.
- Defined messages.reportEncryptedSpam — Report a secret chat for spam
- Defined messages.readMessageContents — Notifies the sender about the recipient having listened a voice message or watched a video, emitting an updateReadMessagesContents.
- Defined messages.getStickers — Get stickers by emoji
- Defined messages.getAllStickers — Get all installed stickers
- Defined messages.getWebPagePreview — Get preview of webpage
- Defined messages.exportChatInvite — Export an invite link for a chat
- Defined messages.checkChatInvite — Check the validity of a chat invite link and get basic info about it
- Defined messages.importChatInvite — Import a chat invite and join a private chat/supergroup/channel
- Defined messages.getStickerSet — Get info about a stickerset
- Defined messages.installStickerSet — Install a stickerset
- Defined messages.uninstallStickerSet — Uninstall a stickerset
- Defined messages.startBot — Start a conversation with a bot using a deep linking parameter
- Defined messages.getMessagesViews — Get and increase the view counter of a message sent or forwarded from a channel
- Defined messages.editChatAdmin — Make a user admin in a basic group.
- Defined messages.migrateChat — Turn a basic group into a supergroup
- Defined messages.searchGlobal — Search for messages and peers globally
- Defined messages.reorderStickerSets — Reorder installed stickersets
- Defined messages.getDocumentByHash — Get a document by its SHA256 hash, mainly used for gifs
- Defined messages.getSavedGifs — Get saved GIFs.
- Defined messages.saveGif — Add GIF to saved gifs list
- Defined messages.getInlineBotResults — Query an inline bot
- Defined messages.setInlineBotResults — Answer an inline query, for bots only
- Defined messages.sendInlineBotResult — Send a result obtained using messages.getInlineBotResults.
- Defined messages.getMessageEditData — Find out if a media message's caption can be edited
- Defined messages.editMessage — Edit message
- Defined messages.editInlineBotMessage — Edit an inline bot message
- Defined messages.getBotCallbackAnswer — Press an inline callback button and get a callback answer from the bot
- Defined messages.setBotCallbackAnswer — Set the callback answer to a user button press (bots only)
- Defined messages.getPeerDialogs — Get dialog info of specified peers
- Defined messages.saveDraft — Save a message draft associated to a chat.
- Defined messages.getAllDrafts — Return all message drafts. Returns all the latest updateDraftMessage updates related to all chats with drafts.
- Defined messages.getFeaturedStickers — Get featured stickers
- Defined messages.readFeaturedStickers — Mark new featured stickers as read
- Defined messages.getRecentStickers — Get recent stickers
- Defined messages.saveRecentSticker — Add/remove sticker from recent stickers list
- Defined messages.clearRecentStickers — Clear recent stickers
- Defined messages.getArchivedStickers — Get all archived stickers
- Defined messages.getMaskStickers — Get installed mask stickers
- Defined messages.getAttachedStickers — Get stickers attached to a photo or video
- Defined messages.setGameScore — Use this method to set the score of the specified user in a game sent as a normal message (bots only).
- Defined messages.setInlineGameScore — Use this method to set the score of the specified user in a game sent as an inline message (bots only).
- Defined messages.getGameHighScores — Get highscores of a game
- Defined messages.getInlineGameHighScores — Get highscores of a game sent using an inline bot
- Defined messages.getCommonChats — Get chats in common with a user
- Defined messages.getWebPage — Get instant view page
- Defined messages.toggleDialogPin — Pin/unpin a dialog
- Defined messages.reorderPinnedDialogs — Reorder pinned dialogs
- Defined messages.getPinnedDialogs — Get pinned dialogs
- Defined messages.setBotShippingResults — If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an updateBotShippingQuery update. Use this method to reply to shipping queries.
- Defined messages.setBotPrecheckoutResults — Once the user has confirmed their payment and shipping details, the bot receives an updateBotPrecheckoutQuery update. Use this method to respond to such pre-checkout queries. Note: Ansible must receive an answer within 10 seconds after the pre-checkout query was sent.
- Defined messages.uploadMedia — Upload a file and associate it to a chat (without actually sending it to the chat)May also be used in a business connection, not by wrapping the query in invokeWithBusinessConnection », but rather by specifying the business connection ID in the business_connection_id parameter.
- Defined messages.sendScreenshotNotification — Notify the other user in a private chat that a screenshot of the chat was taken
- Defined messages.getFavedStickers — Get faved stickers
- Defined messages.faveSticker — Mark or unmark a sticker as favorite
- Defined messages.getUnreadMentions — Get unread messages where we were mentioned
- Defined messages.readMentions — Mark mentions as read
- Defined messages.getRecentLocations — Get all recent live locations sent to a specific chat: returns up to 1 location message (messageMediaGeoLive) per chat participant.
- Defined messages.sendMultiMedia — Send an album or grouped media
- Defined messages.uploadEncryptedFile — Upload encrypted file and associate it to a secret chat (without actually sending it to the chat).
- Defined messages.searchStickerSets — Search for stickersets
- Defined messages.getSplitRanges — Get message ranges for saving the user's chat history
- Defined messages.markDialogUnread — Manually mark dialog as unread
- Defined messages.getDialogUnreadMarks — Get dialogs manually marked as unread
- Defined messages.clearAllDrafts — Clear all drafts.
- Defined messages.updatePinnedMessage — Pin a message
- Defined messages.sendVote — Vote in a pollStarting from layer 159, the vote will be sent from the peer specified using messages.saveDefaultSendAs.Before voting, clients should check that the user is actually allowed to vote: voting is not possible if the poll is closed, if it is subscriber-only » and the user is not an eligible subscriber, or if it is country-restricted » and the user's phone_country_iso2 » is not in the poll's allowed country list. See vote restrictions » for the full list of conditions.
- Defined messages.getPollResults — Get poll results
- Defined messages.getOnlines — Get count of online users in a chat
- Defined messages.editChatAbout — Edit the description of a group/supergroup/channel.
- Defined messages.editChatDefaultBannedRights — Edit the default banned rights of a channel/supergroup/group.
- Defined messages.getEmojiKeywords — Get localized emoji keywords ».
- Defined messages.getEmojiKeywordsDifference — Get changed emoji keywords ».
- Defined messages.getEmojiKeywordsLanguages — Obtain a list of related languages that must be used when fetching emoji keyword lists ».Usually the method will return the passed language codes (if localized) + en + some language codes for similar languages (if applicable).
- Defined messages.getEmojiURL — Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji keywords ». The URL will be valid for 30 seconds after generation.
- Defined messages.getSearchCounters — Get the number of results that would be found by a messages.search call with the same parameters
- Defined messages.requestUrlAuth — Get more info about a Seamless Ansible Login authorization request, for more info click here »
- Defined messages.acceptUrlAuth — Use this to accept a Seamless Ansible Login authorization request, for more info click here »
- Defined messages.hidePeerSettingsBar — Should be called after the user hides the report spam/add as contact bar of a new chat, effectively prevents the user from executing the actions specified in the action bar ».
- Defined messages.getScheduledHistory — Get scheduled messages
- Defined messages.getScheduledMessages — Get scheduled messages
- Defined messages.sendScheduledMessages — Send scheduled messages right away
- Defined messages.deleteScheduledMessages — Delete scheduled messages
- Defined messages.getPollVotes — Get poll results for non-anonymous polls
- Defined messages.toggleStickerSets — Apply changes to multiple stickersets
- Defined messages.getDialogFilters — Get folders
- Defined messages.getSuggestedDialogFilters — Get suggested folders
- Defined messages.updateDialogFilter — Update folder
- Defined messages.updateDialogFiltersOrder — Reorder folders
- Defined messages.getOldFeaturedStickers — Method for fetching previously featured stickers
- Defined messages.getReplies — Get messages in a reply thread
- Defined messages.getDiscussionMessage — Get discussion message from the associated discussion group of a channel to show it on top of the comment section, without actually joining the group
- Defined messages.readDiscussion — Mark a thread as read
- Defined messages.unpinAllMessages — Unpin all pinned messages
- Defined messages.deleteChat — Delete a chat
- Defined messages.deletePhoneCallHistory — Delete the entire phone call history.
- Defined messages.checkHistoryImport — Obtains information about a chat export file, generated by a foreign chat app, click here for more info about imported chats ».
- Defined messages.initHistoryImport — Import chat history from a foreign chat app into a specific Ansible chat, click here for more info about imported chats ».
- Defined messages.uploadImportedMedia — Upload a media file associated with an imported chat, click here for more info ».
- Defined messages.startHistoryImport — Complete the history import process, importing all messages into the chat. To be called only after initializing the import with messages.initHistoryImport and uploading all files using messages.uploadImportedMedia.
- Defined messages.getExportedChatInvites — Get info about the chat invites of a specific chat
- Defined messages.getExportedChatInvite — Get info about a chat invite
- Defined messages.editExportedChatInvite — Edit an exported chat invite
- Defined messages.deleteRevokedExportedChatInvites — Delete all revoked chat invites
- Defined messages.deleteExportedChatInvite — Delete a chat invite
- Defined messages.getAdminsWithInvites — Get info about chat invites generated by admins.
- Defined messages.getChatInviteImporters — Get info about the users that joined the chat using a specific chat invite
- Defined messages.setHistoryTTL — Set maximum Time-To-Live of all messages in the specified chat
- Defined messages.checkHistoryImportPeer — Check whether chat history exported from another chat app can be imported into a specific Ansible chat, click here for more info ».If the check succeeds, and no RPC errors are returned, a messages.CheckedHistoryImportPeer constructor will be returned, with a confirmation text to be shown to the user, before actually initializing the import.
- Defined messages.setChatTheme — Change the chat theme of a certain chat, see here » for more info.
- Defined messages.getMessageReadParticipants — Get which users read a specific message: only available for groups and supergroups with less than chat_read_mark_size_threshold members, read receipts will be stored for chat_read_mark_expire_period seconds after the message was sent, see client configuration for more info ».
- Defined messages.getSearchResultsCalendar — Returns information about the next messages of the specified type in the chat split by days.Returns the results in reverse chronological order. Can return partial results for the last returned day.
- Defined messages.getSearchResultsPositions — Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation.Returns the results in reverse chronological order (i.e., in order of decreasing message_id).
- Defined messages.hideChatJoinRequest — Dismiss or approve a chat join request related to a specific chat or channel.
- Defined messages.hideAllChatJoinRequests — Dismiss or approve all join requests related to a specific chat or channel.
- Defined messages.toggleNoForwards — Enable or disable content protection on a channel, group or private chat.
- Defined messages.saveDefaultSendAs — Change the default peer that should be used when sending messages, reactions, poll votes to a specific group
- Defined messages.sendReaction — React to message.Starting from layer 159, the reaction will be sent from the peer specified using messages.saveDefaultSendAs.
- Defined messages.getMessagesReactions — Get message reactions »
- Defined messages.getMessageReactionsList — Get message reaction list, along with the sender of each reaction.
- Defined messages.setChatAvailableReactions — Change the set of message reactions » that can be used in a certain group, supergroup or channel
- Defined messages.getAvailableReactions — Obtain available message reactions »
- Defined messages.setDefaultReaction — Change default emoji reaction to use in the quick reaction menu: the value is synced across devices and can be fetched using help.getConfig, reactions_default field.
- Defined messages.translateText — Translate a given text.Styled text entities will only be preserved for Ansible Premium users.
- Defined messages.getUnreadReactions — Get unread reactions to messages you sent
- Defined messages.readReactions — Mark message reactions » as read
- Defined messages.searchSentMedia — View and search recently sent media. This method does not support pagination.
- Defined messages.getAttachMenuBots — Returns installed attachment menu bot mini apps »
- Defined messages.getAttachMenuBot — Returns attachment menu entry for a bot mini app that can be launched from the attachment menu »
- Defined messages.toggleBotInAttachMenu — Enable or disable web bot attachment menu »
- Defined messages.requestWebView — Open a bot mini app, sending over user information after user confirmation.After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.
- Defined messages.prolongWebView — Indicate to the server (from the user side) that the user is still using a web app.If the method returns a QUERY_ID_INVALID error, the webview must be closed.
- Defined messages.requestSimpleWebView — Open a bot mini app.
- Defined messages.sendWebViewResultMessage — Terminate webview interaction started with messages.requestWebView, sending the specified message to the chat on behalf of the user.
- Defined messages.sendWebViewData — Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.
- Defined messages.transcribeAudio — Transcribe voice message
- Defined messages.rateTranscribedAudio — Rate transcribed voice message
- Defined messages.getCustomEmojiDocuments — Fetch custom emoji stickers ».Returns a list of documents with the animated custom emoji in TGS format, and a documentAttributeCustomEmoji attribute with the original emoji and info about the emoji stickerset this custom emoji belongs to.
- Defined messages.getEmojiStickers — Gets the list of currently installed custom emoji stickersets.
- Defined messages.getFeaturedEmojiStickers — Gets featured custom emoji stickersets.
- Defined messages.reportReaction — Report a message reaction
- Defined messages.getTopReactions — Got popular message reactions
- Defined messages.getRecentReactions — Get recently used message reactions
- Defined messages.clearRecentReactions — Clear recently used message reactions
- Defined messages.getExtendedMedia — Fetch updated information about paid media, see here » for the full flow.This method will return an array of updateMessageExtendedMedia updates, only for messages containing already bought paid media. No information will be returned for messages containing not yet bought paid media.
- Defined messages.setDefaultHistoryTTL — Changes the default value of the Time-To-Live setting, applied to all new chats.
- Defined messages.getDefaultHistoryTTL — Gets the default value of the Time-To-Live setting, applied to all new chats.
- Defined messages.sendBotRequestedPeer — Send one or more chosen peers, as requested by a keyboardButtonRequestPeer button.
- Defined messages.getEmojiGroups — Represents a list of emoji categories.
- Defined messages.getEmojiStatusGroups — Represents a list of emoji categories, to be used when selecting custom emojis to set as custom emoji status.
- Defined messages.getEmojiProfilePhotoGroups — Represents a list of emoji categories, to be used when selecting custom emojis to set as profile picture.
- Defined messages.searchCustomEmoji — Look for custom emojis associated to a UTF8 emoji
- Defined messages.togglePeerTranslations — Show or hide the real-time chat translation popup for a certain chat
- Defined messages.getBotApp — Obtain information about a direct link Mini App
- Defined messages.requestAppWebView — Open a bot mini app from a direct Mini App deep link, sending over user information after user confirmation.After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.
- Defined messages.setChatWallPaper — Set a custom wallpaper » in a specific private chat with another user.
- Defined messages.searchEmojiStickerSets — Search for custom emoji stickersets »
- Defined messages.getSavedDialogs — Returns the current saved dialog list » or monoforum topic list ».
- Defined messages.getSavedHistory — Fetch saved messages » forwarded from a specific peer, or fetch messages from a monoforum topic ».
- Defined messages.deleteSavedHistory — Deletes messages from a monoforum topic », or deletes messages forwarded from a specific peer to saved messages ».
- Defined messages.getPinnedSavedDialogs — Get pinned saved dialogs, see here » for more info.
- Defined messages.toggleSavedDialogPin — Pin or unpin a saved message dialog ».
- Defined messages.reorderPinnedSavedDialogs — Reorder pinned saved message dialogs ».
- Defined messages.getSavedReactionTags — Fetch the full list of saved message tags created by the user.
- Defined messages.updateSavedReactionTag — Update the description of a saved message tag ».
- Defined messages.getDefaultTagReactions — Fetch a default recommended list of saved message tag reactions.
- Defined messages.getOutboxReadDate — Get the exact read date of one of our messages, sent to a private chat with another user.Can be only done for private outgoing messages not older than appConfig.pm_read_date_expire_period ».If the peer's userFull.read_dates_private flag is set, we will not be able to fetch the exact read date of messages we send to them, and a USER_PRIVACY_RESTRICTED RPC error will be emitted. The exact read date of messages might still be unavailable for other reasons, see here » for more info. To set userFull.read_dates_private for ourselves invoke account.setGlobalPrivacySettings, setting the settings.hide_read_marks flag.
- Defined messages.getQuickReplies — Fetch basic info about all existing quick reply shortcuts.
- Defined messages.reorderQuickReplies — Reorder quick reply shortcuts.This will emit an updateQuickReplies update to other logged-in sessions.
- Defined messages.checkQuickReplyShortcut — Before offering the user the choice to add a message to a quick reply shortcut, to make sure that none of the limits specified here » were reached.
- Defined messages.editQuickReplyShortcut — Rename a quick reply shortcut. This will emit an updateQuickReplies update to other logged-in sessions.
- Defined messages.deleteQuickReplyShortcut — Completely delete a quick reply shortcut. This will also emit an updateDeleteQuickReply update to other logged-in sessions (and no updateDeleteQuickReplyMessages updates, even if all the messages in the shortcuts are also deleted by this method).
- Defined messages.getQuickReplyMessages — Fetch (a subset or all) messages in a quick reply shortcut ».
- Defined messages.sendQuickReplyMessages — Send a quick reply shortcut ».
- Defined messages.deleteQuickReplyMessages — Delete one or more messages from a quick reply shortcut. This will also emit an updateDeleteQuickReplyMessages update.
- Defined messages.toggleDialogFilterTags — Enable or disable folder tags ».
- Defined messages.getMyStickers — Fetch all stickersets » owned by the current user.
- Defined messages.getEmojiStickerGroups — Represents a list of emoji categories, to be used when choosing a sticker.
- Defined messages.getAvailableEffects — Fetch the full list of usable animated message effects ».
- Defined messages.editFactCheck — Edit/create a fact-check on a message.Can only be used by independent fact-checkers as specified by the appConfig.can_edit_factcheck configuration flag.
- Defined messages.deleteFactCheck — Delete a fact-check from a message.Can only be used by independent fact-checkers as specified by the appConfig.can_edit_factcheck configuration flag.
- Defined messages.getFactCheck — Fetch one or more factchecks, see here » for the full flow.
- Defined messages.requestMainWebView — Open a Main Mini App.
- Defined messages.sendPaidReaction — Sends one or more paid Ansible Star reactions », transferring Ansible Stars » to a channel's balance.
- Defined messages.togglePaidReactionPrivacy — Changes the privacy of already sent paid reactions on a specific message.
- Defined messages.getPaidReactionPrivacy — Fetches an updatePaidReactionPrivacy update with the current default paid reaction privacy, see here » for more info.
- Defined messages.viewSponsoredMessage — Mark a specific sponsored message » as read
- Defined messages.clickSponsoredMessage — Informs the server that the user has interacted with a sponsored message in one of the ways listed here ».
- Defined messages.reportSponsoredMessage — Report a sponsored message », see here » for more info on the full flow.
- Defined messages.getSponsoredMessages — Get a list of sponsored messages for a peer, see here » for more info.
- Defined messages.savePreparedInlineMessage — Save a prepared inline message, to be shared by the user of the mini app using a web_app_send_prepared_message event
- Defined messages.getPreparedInlineMessage — Obtain a prepared inline message generated by a mini app: invoked when handling web_app_send_prepared_message events
- Defined messages.searchStickers — Search for stickers using AI-powered keyword search
- Defined messages.reportMessagesDelivery — Used for Ansible Gateway verification messages »: indicate to the server that one or more messages were received by the client, if requested by the message.report_delivery_until_date flag or the equivalent flag in push notifications.
- Defined messages.getSavedDialogsByID — Obtain information about specific saved message dialogs » or monoforum topics ».
- Defined messages.readSavedHistory — Mark messages as read in a monoforum topic ».
- Defined messages.toggleTodoCompleted — Mark one or more items of a todo list » as completed or not completed.
- Defined messages.appendTodoList — Appends one or more items to a todo list ».
- Defined messages.toggleSuggestedPostApproval — Approve or reject a suggested post ».
- Defined messages.getForumTopics — Get topics of a forum
- Defined messages.getForumTopicsByID — Get forum topics by their ID
- Defined messages.editForumTopic — Edit forum topic.
- Defined messages.updatePinnedForumTopic — Pin or unpin forum topics
- Defined messages.reorderPinnedForumTopics — Reorder pinned forum topics
- Defined messages.createForumTopic — Create a forum topic.
- Defined messages.deleteTopicHistory — Delete message history of a forum topic
- Defined messages.getEmojiGameInfo — Fetch dice game information.
- Defined messages.summarizeText — Summarize the contents of a message with AI, see here » for more info.Clients should use message.summary_from_language as a hint for showing a summarization button; its absence does not forbid invoking this method.
- Defined messages.editChatCreator — Transfer the ownership of a basic group, supergroup or channel to another user, see here » for the full flow.
- Defined messages.getFutureChatCreatorAfterLeave — Group/channel owners only: returns the ID of the user that will become the new owner of the group if we decide to leave the group, see here » for more info on the full flow.
- Defined messages.editChatParticipantRank — Edit a group participant's tag ».
- Defined messages.declineUrlAuth — Decline an incoming OAuth authorization request », notifying the server that the user refused the login request.
- Defined messages.checkUrlAuthMatchCode — Validate the match code selected by the user against the code shown on the login page, as part of the OAuth authorization flow ».Only usable when both match_codes and match_codes_first are set in the urlAuthResultRequest returned by messages.requestUrlAuth. If boolTrue is returned, proceed with the login flow and pass the verified code to messages.acceptUrlAuth.match_code.
- Defined messages.composeMessageWithAI — Invokes Ansible AI Editor that can translate, transform, fixup and/or emojify your message in a number of different ways, privately powered by Cocoon, see here » for more info!All of the modes specified below can be combined.
- Defined messages.reportReadMetrics — Report viewport read metrics for visible messages, indicating how long each message stayed in the chat viewport, see here » for more info on the full flow.
- Defined messages.reportMusicListen — Report the listening duration of a music track (audio document without the voice flag), see here » for more info on the full flow.
- Defined messages.addPollAnswer — Add an answer option to an open-answer poll »
- Defined messages.deletePollAnswer — Remove an answer option from an open-answer poll »
- Defined messages.getUnreadPollVotes — Get messages containing polls with unread votes »
- Defined messages.readPollVotes — Mark all unread poll votes » in a chat as read
- Defined messages.setBotGuestChatResult — Bots may use this method to answer a guest mode » query received via an updateBotGuestChatQuery update, providing the message to post into the chat as a guest, see here » for more info.
- Defined messages.deleteParticipantReactions — As an admin, remove all of a specific participant's reactions from every message in a group or channel.
- Defined messages.deleteParticipantReaction — As an admin, remove all of a specific participant's reactions from a single message.
- Defined messages.getPersonalChannelHistory — Fetch the message history of a user's personal channel ».
- Defined messages.getRichMessage
- Defined messages.translateRichMessage
- Defined messages.composeRichMessageWithAI
- Defined messages.requestChatJoinWebView
- Defined messages.setShareTheme
- Defined messages.getShareThemeBackdrops
- Defined updates.getState — Returns a current state of updates.
- Defined updates.getDifference — Get new updates.
- Defined updates.getChannelDifference — Returns the difference between the current state of updates of a certain channel and transmitted.
- Defined photos.updateProfilePhoto — Installs a previously uploaded photo as a profile photo.
- Defined photos.uploadProfilePhoto — Updates current user profile photo.The file, video and video_emoji_markup flags are mutually exclusive.
- Defined photos.deletePhotos — Deletes profile photos. The method returns a list of successfully deleted photo IDs.
- Defined photos.getUserPhotos — Returns the list of user photos.
- Defined photos.uploadContactProfilePhoto — Upload a custom profile picture for a contact, or suggest a new profile picture to a contact.The file, video and video_emoji_markup flags are mutually exclusive.
- Defined upload.saveFilePart — Saves a part of file for further sending to one of the methods.
- Defined upload.getFile — Returns content of a whole file or its part.
- Defined upload.saveBigFilePart — Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods.
- Defined upload.getWebFile — Returns content of a web file, by proxying the request through Ansible, see the webfile docs for more info.Note: the query must be sent to the DC specified in the webfile_dc_id MVSy configuration field.
- Defined upload.getCdnFile — Download a CDN file.
- Defined upload.reuploadCdnFile — Request a reupload of a certain file to a CDN DC.
- Defined upload.getCdnFileHashes — Get SHA256 hashes for verifying downloaded CDN files
- Defined upload.getFileHashes — Get SHA256 hashes for verifying downloaded files
- Defined help.getConfig — Returns current configuration, including data center configuration.
- Defined help.getNearestDc — Returns info on data center nearest to the user.
- Defined help.getAppUpdate — Returns information on update availability for the current application.
- Defined help.getInviteText — Returns localized text of a text message with an invitation.
- Defined help.getSupport — Returns the support user for the "ask a question" feature.
- Defined help.setBotUpdatesStatus — Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only
- Defined help.getCdnConfig — Get configuration for CDN file downloads.
- Defined help.getRecentMeUrls — Get recently used asme.su links.When installing official applications from "Download Ansible" buttons present in asme.su pages, a referral parameter is passed to applications after installation. If, after downloading the application, the user creates a new account (instead of logging into an existing one), the referral parameter should be imported using this method, which returns the asme.su pages the user recently opened, before installing Ansible.
- Defined help.getTermsOfServiceUpdate — Look for updates of Ansible terms of service
- Defined help.acceptTermsOfService — Accept the new terms of service
- Defined help.getDeepLinkInfo — Get info about an unsupported deep link, see here for more info ».
- Defined help.getAppConfig — Get app-specific configuration, see client configuration for more info on the result.
- Defined help.saveAppLog — Saves logs of application on the server.
- Defined help.getPassportConfig — Get passport configuration
- Defined help.getSupportName — Get localized name of the Ansible support user
- Defined help.getUserInfo — Can only be used by TSF members to obtain internal information.
- Defined help.editUserInfo — Internal use
- Defined help.getPromoData — Returns a set of useful suggestions and PSA/MTProxy sponsored peers, see here » for more info.
- Defined help.hidePromoData — Hide MTProxy/Public Service Announcement information
- Defined help.dismissSuggestion — Dismiss a suggestion, see here for more info ».
- Defined help.getCountriesList — Get name, ISO code, localized name and phone codes/patterns of all available countries
- Defined help.getPremiumPromo — Get Ansible Premium promotion information
- Defined help.getPeerColors — Get the set of accent color palettes » that can be used for message accents.
- Defined help.getPeerProfileColors — Get the set of accent color palettes » that can be used in profile page backgrounds.
- Defined help.getTimezonesList — Returns timezone information that may be used elsewhere in the API, such as to set Ansible Business opening hours ».
- Defined channels.readHistory — Mark channel/supergroup history as read
- Defined channels.deleteMessages — Delete messages in a channel/supergroup
- Defined channels.reportSpam — Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup
- Defined channels.getMessages — Get channel/supergroup messages
- Defined channels.getParticipants — Get the participants of a supergroup/channel
- Defined channels.getParticipant — Get info about a channel/supergroup participant
- Defined channels.getChannels — Get info about channels/supergroups
- Defined channels.getFullChannel — Get full info about a supergroup, gigagroup or channel
- Defined channels.createChannel — Create a supergroup/channel.
- Defined channels.editAdmin — Modify the admin rights of a user in a supergroup/channel.
- Defined channels.editTitle — Edit the name of a channel/supergroup
- Defined channels.editPhoto — Change the photo of a channel/supergroup
- Defined channels.checkUsername — Check if a username is free and can be assigned to a channel/supergroup
- Defined channels.updateUsername — Change or remove the username of a supergroup/channel
- Defined channels.joinChannel — Join a channel/supergroup
- Defined channels.leaveChannel — Leave a channel/supergroup
- Defined channels.inviteToChannel — Invite users to a channel/supergroup
- Defined channels.deleteChannel — Delete a channel/supergroup
- Defined channels.exportMessageLink — Get link and embed info of a message in a channel/supergroup
- Defined channels.toggleSignatures — Enable/disable message signatures in channels
- Defined channels.getAdminedPublicChannels — Get channels/supergroups/geogroups we're admin in. Usually called when the user exceeds the limit for owned public channels/supergroups/geogroups, and the user is given the choice to remove one of his channels/supergroups/geogroups.
- Defined channels.editBanned — Ban/unban/kick a user in a supergroup/channel.
- Defined channels.getAdminLog — Get the admin log of a channel/supergroup
- Defined channels.setStickers — Associate a stickerset to the supergroup
- Defined channels.readMessageContents — Mark channel/supergroup message contents as read, emitting an updateChannelReadMessagesContents.
- Defined channels.deleteHistory — Delete the history of a supergroup
- Defined channels.togglePreHistoryHidden — Hide/unhide message history for new channel/supergroup users
- Defined channels.getLeftChannels — Get a list of channels/supergroups we left, requires a takeout session, see here » for more info.
- Defined channels.getGroupsForDiscussion — Get all groups that can be used as discussion groups.Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using channels.togglePreHistoryHidden, first.
- Defined channels.setDiscussionGroup — Associate a group to a channel as discussion group for that channel
- Defined channels.editLocation — Edit location of geogroup, see here » for more info on geogroups.
- Defined channels.toggleSlowMode — Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds
- Defined channels.getInactiveChannels — Get inactive channels and supergroups
- Defined channels.convertToGigagroup — Convert a supergroup to a gigagroup, when requested by channel suggestions.
- Defined channels.getSendAs — Obtains a list of peers that can be displayed as the sender in a specific context. With for_live_stories, returns peers that may author live story in-call messages ».
- Defined channels.deleteParticipantHistory — Delete all messages sent by a specific participant of a given supergroup
- Defined channels.toggleJoinToSend — Set whether all users should join a discussion group in order to comment on a post »
- Defined channels.toggleJoinRequest — Set whether all users should request admin approval to join the group ».
- Defined channels.reorderUsernames — Reorder active usernames
- Defined channels.toggleUsername — Activate or deactivate a purchased fragment.com username associated to a supergroup or channel we own.
- Defined channels.deactivateAllUsernames — Disable all purchased usernames of a supergroup or channel
- Defined channels.toggleForum — Enable or disable forum functionality in a supergroup.
- Defined channels.toggleAntiSpam — Enable or disable the native antispam system.
- Defined channels.reportAntiSpamFalsePositive — Report a native antispam false positive
- Defined channels.toggleParticipantsHidden — Hide or display the participants list in a supergroup.The supergroup must have at least hidden_members_group_size_min participants in order to use this method, as specified by the client configuration parameters ».
- Defined channels.updateColor — Update the accent color and background custom emoji » of a channel.
- Defined channels.toggleViewForumAsMessages — Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a "View as messages" setting in the local client: this setting only affects the current account, and is synced to other logged in sessions using this method.Invoking this method will update the value of the view_forum_as_messages flag of channelFull or dialog and emit an updateChannelViewForumAsMessages.
- Defined channels.getChannelRecommendations — Obtain a list of similarly themed public channels, selected based on similarities in their subscriber bases.
- Defined channels.updateEmojiStatus — Set an emoji status for a channel or supergroup.
- Defined channels.setBoostsToUnblockRestrictions — Admins with ban_users admin rights » may allow users that apply a certain number of booosts » to the group to bypass slow mode » and other » supergroup restrictions, see here » for more info.
- Defined channels.setEmojiStickers — Set a custom emoji stickerset for supergroups. Only usable after reaching at least the boost level » specified in the group_emoji_stickers_level_min » config parameter.
- Defined channels.restrictSponsoredMessages — Disable ads on the specified channel, for all users.Available only after reaching at least the boost level » specified in the channel_restrict_sponsored_level_min » config parameter.
- Defined channels.searchPosts — Globally search for posts from public channels » (including those we aren't a member of) containing either a specific hashtag, or a full text query.Exactly one of query and hashtag must be set.
- Defined channels.updatePaidMessagesPrice — Enable or disable paid messages » in this supergroup or monoforum.Also used to enable or disable monoforums aka direct messages in a channel.Note that passing the ID of the monoforum itself to channel will return a CHANNEL_MONOFORUM_UNSUPPORTED error: pass the ID of the associated channel to edit the settings of the associated monoforum, instead.
- Defined channels.toggleAutotranslation — Toggle autotranslation in a channel, for all users: see here » for more info.
- Defined channels.getMessageAuthor — Can only be invoked by non-bot admins of a monoforum », obtains the original sender of a message sent by other monoforum admins to the monoforum, on behalf of the channel associated to the monoforum.
- Defined channels.checkSearchPostsFlood — Check if the specified global post search » requires payment.
- Defined channels.setMainProfileTab — Changes the main profile tab of a channel, see here » for more info.
- Defined bots.sendCustomRequest — Sends a custom request; for bots only
- Defined bots.answerWebhookJSONQuery — Answers a custom query; for bots only
- Defined bots.setBotCommands — Set bot command list
- Defined bots.resetBotCommands — Clear bot commands for the specified bot scope and language code
- Defined bots.getBotCommands — Obtain a list of bot commands for the specified bot scope and language code
- Defined bots.setBotMenuButton — Sets the menu button action » for a given user or for all users
- Defined bots.getBotMenuButton — Gets the menu button action for a given user or for all users, previously set using bots.setBotMenuButton; users can see this information in the botInfo constructor.
- Defined bots.setBotBroadcastDefaultAdminRights — Set the default suggested admin rights for bots being added as admins to channels, see here for more info on how to handle them ».
- Defined bots.setBotGroupDefaultAdminRights — Set the default suggested admin rights for bots being added as admins to groups, see here for more info on how to handle them ».
- Defined bots.setBotInfo — Set localized name, about text and description of a bot (or of the current account, if called by a bot).
- Defined bots.getBotInfo — Get localized name, about text and description of a bot (or of the current account, if called by a bot).
- Defined bots.reorderUsernames — Reorder usernames associated to a bot we own.
- Defined bots.toggleUsername — Activate or deactivate a purchased fragment.com username associated to a bot we own.
- Defined bots.canSendMessage — Check whether the specified bot can send us messages
- Defined bots.allowSendMessage — Allow the specified bot to send us messages
- Defined bots.invokeWebViewCustomMethod — Send a custom request from a mini bot app, triggered by a web_app_invoke_custom_method event ».The response should be sent using a custom_method_invoked event, see here » for more info on the flow.
- Defined bots.getPopularAppBots — Fetch popular Main Mini Apps, to be used in the apps tab of global search ».
- Defined bots.addPreviewMedia — Add a main mini app preview, see here » for more info.Only owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.
- Defined bots.editPreviewMedia — Edit a main mini app preview, see here » for more info.Only owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.
- Defined bots.deletePreviewMedia — Delete a main mini app preview, see here » for more info.Only owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.
- Defined bots.reorderPreviewMedias — Reorder a main mini app previews, see here » for more info.Only owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.
- Defined bots.getPreviewInfo — Bot owners only, fetch main mini app preview information, see here » for more info.Note: technically non-owners may also invoke this method, but it will always behave exactly as bots.getPreviewMedias, returning only previews for the current language and an empty lang_codes array, regardless of the passed lang_code, so please only use bots.getPreviewMedias if you're not the owner of the bot.
- Defined bots.getPreviewMedias — Fetch main mini app previews, see here » for more info.
- Defined bots.updateUserEmojiStatus — Change the emoji status of a user (invoked by bots, see here » for more info on the full flow)
- Defined bots.toggleUserEmojiStatusPermission — Allow or prevent a bot from changing our emoji status »
- Defined bots.checkDownloadFileParams — Check if a mini app can request the download of a specific file: called when handling web_app_request_file_download events »
- Defined bots.getAdminedBots — Get a list of bots owned by the current user
- Defined bots.updateStarRefProgram — Create, edit or delete the affiliate program of a bot we own
- Defined bots.setCustomVerification — Verify a user or chat on behalf of an organization ».
- Defined bots.getBotRecommendations — Obtain a list of similarly themed bots, selected based on similarities in their subscriber bases, see here » for more info.
- Defined bots.checkUsername — Check whether a username is available and valid for use when creating a managed bot ».
- Defined bots.createBot — Create a managed bot » owned by the current user and controlled by the specified manager bot.
- Defined bots.exportBotToken — Export the bot token of a managed bot »; can only be called by the manager bot.
- Defined bots.requestWebViewButton — Bots may use this method to prepare a peer request button for a Mini App, see here » for more info.
- Defined bots.getRequestedWebViewButton — Fetch the peer request button a bot prepared for a Mini App with bots.requestWebViewButton, invoked when the Mini App emits a web_app_request_chat event, see here » for more info.
- Defined bots.getAccessSettings — Get the access restriction settings » of a managed bot; can only be called by the manager bot.
- Defined bots.editAccessSettings — Edit the access restriction settings » of a managed bot; can only be called by the manager bot.
- Defined bots.setJoinChatResults
- Defined bots.addUsername
- Defined bots.removeUsername
- Defined payments.getPaymentForm — Get a payment form
- Defined payments.getPaymentReceipt — Get payment receipt
- Defined payments.validateRequestedInfo — Submit requested order information for validation
- Defined payments.sendPaymentForm — Send compiled payment form
- Defined payments.getSavedInfo — Get saved payment information
- Defined payments.clearSavedInfo — Clear saved payment information
- Defined payments.getBankCardData — Get info about a credit card
- Defined payments.exportInvoice — Generate an invoice deep link
- Defined payments.assignAppStoreTransaction — Informs server about a purchase made through the App Store: for official applications only.
- Defined payments.assignPlayMarketTransaction — Informs server about a purchase made through the Play Store: for official applications only.
- Defined payments.getPremiumGiftCodeOptions — Obtain a list of Ansible Premium giveaway/gift code » options.
- Defined payments.checkGiftCode — Obtain information about a Ansible Premium giftcode »
- Defined payments.applyGiftCode — Apply a Ansible Premium giftcode »
- Defined payments.getGiveawayInfo — Obtain information about a Ansible Premium giveaway ».
- Defined payments.launchPrepaidGiveaway — Launch a prepaid giveaway ».
- Defined payments.getStarsTopupOptions — Obtain a list of Ansible Stars topup options » as starsTopupOption constructors.
- Defined payments.getStarsStatus — Get the current Ansible Stars balance of the current account (with peer=inputPeerSelf), or the stars balance of the bot or channel specified in peer.
- Defined payments.getStarsTransactions — Fetch Ansible Stars transactions.The inbound and outbound flags are mutually exclusive: if none of the two are set, both incoming and outgoing transactions are fetched.
- Defined payments.sendStarsForm — Make a payment using Ansible Stars, see here » for more info.
- Defined payments.refundStarsCharge — Refund a Ansible Stars transaction, see here » for more info.
- Defined payments.getStarsRevenueStats — Get Ansible Star revenue statistics ».
- Defined payments.getStarsRevenueWithdrawalUrl — Withdraw funds from a channel or bot's star balance ».
- Defined payments.getStarsRevenueAdsAccountUrl — Returns a URL for a Ansible Ad platform account that can be used to set up advertisements for channel/bot in peer, paid using the Ansible Stars owned by the specified peer, see here » for more info.
- Defined payments.getStarsTransactionsByID — Obtain info about Ansible Star transactions » using specific transaction IDs.
- Defined payments.getStarsGiftOptions — Obtain a list of Ansible Stars gift options » as starsGiftOption constructors.
- Defined payments.getStarsSubscriptions — Obtain a list of active, expired or cancelled Ansible Star subscriptions ».
- Defined payments.changeStarsSubscription — Activate or deactivate a Ansible Star subscription ».
- Defined payments.fulfillStarsSubscription — Re-join a private channel associated to an active Ansible Star subscription ».
- Defined payments.getStarsGiveawayOptions — Fetch a list of star giveaway options ».
- Defined payments.getStarGifts — Get a list of available gifts, see here » for more info.
- Defined payments.saveStarGift — Display or remove a received or hosted gift » from our profile.
- Defined payments.convertStarGift — Convert a received gift » into Ansible Stars: this will permanently destroy the gift, converting it into starGift.convert_stars Ansible Stars, added to the user's balance.Note that starGift.convert_stars will be less than the buying price (starGift.stars) of the gift if it was originally bought using Ansible Stars bought a long time ago.
- Defined payments.botCancelStarsSubscription — Cancel a bot subscription
- Defined payments.getConnectedStarRefBots — Fetch all affiliations we have created for a certain peer
- Defined payments.getConnectedStarRefBot — Fetch info about a specific bot affiliation »
- Defined payments.getSuggestedStarRefBots — Obtain a list of suggested mini apps with available affiliate programsorder_by_revenue and order_by_date are mutually exclusive: if neither is set, results are sorted by profitability.
- Defined payments.connectStarRefBot — Join a bot's affiliate program, becoming an affiliate »
- Defined payments.editConnectedStarRefBot — Leave a bot's affiliate program »
- Defined payments.getStarGiftUpgradePreview — Obtain a preview of the possible attributes (chosen randomly) a gift » can receive after upgrading it to a collectible gift », see here » for more info.
- Defined payments.upgradeStarGift — Upgrade a gift to a collectible gift: can only be used if the upgrade was already paid by the gift sender; see here » for more info on the full flow (including the different flow to use in case the upgrade was not paid by the gift sender).
- Defined payments.transferStarGift — Transfer a collectible gift to another user or channel: can only be used if transfer is free (i.e. messageActionStarGiftUnique.transfer_stars is not set); see here » for more info on the full flow (including the different flow to use in case the transfer isn't free).
- Defined payments.getUniqueStarGift — Obtain info about a collectible gift » using a slug obtained from a collectible gift link ».
- Defined payments.getSavedStarGifts — Fetch the full list of gifts » owned, received or hosted » by a peer.Note that unlike what the name suggests, the method can be used to fetch both "saved" and "unsaved" gifts (aka gifts both pinned and not pinned) to the profile, depending on the passed flags.
- Defined payments.getSavedStarGift — Fetch info about specific gifts owned by a peer we control.Note that unlike what the name suggests, the method can be used to fetch both "saved" and "unsaved" gifts (aka gifts both pinned and not pinned to the profile).
- Defined payments.getStarGiftWithdrawalUrl — Convert a collectible gift » to an NFT on the TON blockchain.
- Defined payments.toggleChatStarGiftNotifications — Enables or disables the reception of notifications every time a gift » is received by the specified channel, can only be invoked by admins with post_messages admin rights.
- Defined payments.toggleStarGiftsPinnedToTop — Pins a received gift on top of the profile of the user or owned channels by using payments.toggleStarGiftsPinnedToTop.
- Defined payments.canPurchaseStore — Checks whether a purchase is possible. Must be called before in-store purchase, official apps only.
- Defined payments.getResaleStarGifts — Get collectible gifts of a specific type currently on resale, see here » for more info.sort_by_price and sort_by_num are mutually exclusive, if neither are set results are sorted by the unixtime (descending) when their resell price was last changed.See here » for detailed documentation on this method.
- Defined payments.updateStarGiftPrice — A collectible gift we own » can be put up for sale on the gift marketplace » with this method, see here » for more info.
- Defined payments.createStarGiftCollection — Create a star gift collection ».
- Defined payments.updateStarGiftCollection — Add or remove gifts from a star gift collection », or rename the collection.
- Defined payments.reorderStarGiftCollections — Reorder the star gift collections » on an owned peer's profile.
- Defined payments.deleteStarGiftCollection — Delete a star gift collection ».
- Defined payments.getStarGiftCollections — Fetches all star gift collections » of a peer.
- Defined payments.getUniqueStarGiftValueInfo — Get information about the value of a collectible gift ».
- Defined payments.checkCanSendGift — Check if the specified gift » can be sent.
- Defined payments.getStarGiftAuctionState — Returns info about a collectible gift auction »; also subscribes the user to auction updates, see here » for more info on the full flow.
- Defined payments.getStarGiftAuctionAcquiredGifts — Fetches all the gifts that the current user won in an auction.
- Defined payments.getStarGiftActiveAuctions — Fetches all currently active gift auctions the user has ever bid on (including auctions where the user was outbid and their bid was returned), as long as the auction hasn't ended yet.This method is primarily used to display an auction badge in the chat list immediately on app startup, without waiting for real-time updateStarGiftAuctionState updates to arrive: the client calls it to discover which auctions the user is participating in and show the badge proactively.To instead fetch the full state of a single auction, subscribe to its real-time updates and render the detailed auction UI (typically when the user opens a specific auction), use payments.getStarGiftAuctionState.
- Defined payments.resolveStarGiftOffer — Accept or decline a previously received collectible gift purchase offer », see here » for the full flow.
- Defined payments.sendStarGiftOffer — Send an offer to purchase a collectible gift », see here » for the full flow.
- Defined payments.getStarGiftUpgradeAttributes — Obtains the full list of just the collectible attributes that may appear for a gift type once it's upgraded to a collectible gift ».The result may also include starGiftAttributeModel constructors with the crafted flag set: these models are reserved for crafting » and should be filtered out from regular upgrade previews (and vice versa).
- Defined payments.getCraftStarGifts — Obtain owned collectible gifts » of a specific type that can be used for crafting ».
- Defined payments.craftStarGift — Craft a new collectible gift » by combining 1 to 4 owned collectible gifts of the same base gift type.The passed gifts must all have the same starGiftUnique.gift_id, must be usable for crafting, and must not be blocked by a future can_craft_at timestamp.The first passed gift must not be located on the TON blockchain.
- Defined payments.getCurrencyRates
- Defined payments.getOnrampProviders
- Defined payments.getOnrampBaseCurrencies
- Defined payments.getOnrampAvailability
- Defined payments.getOnrampLimits
- Defined payments.getOnrampQuote
- Defined payments.createOnrampSession
- Defined payments.withdrawStarGift
- Defined payments.depositStarGift
- Defined payments.displayStarGift
- Defined payments.deleteStarGift
- Defined stickers.createStickerSet — Create a stickerset.
- Defined stickers.removeStickerFromSet — Remove a sticker from the set where it belongs. The sticker set must have been created by the current user/bot.
- Defined stickers.changeStickerPosition — Changes the absolute position of a sticker in the set to which it belongs. The sticker set must have been created by the current user/bot.
- Defined stickers.addStickerToSet — Add a sticker to a stickerset. The sticker set must have been created by the current user/bot.
- Defined stickers.setStickerSetThumb — Set stickerset thumbnail
- Defined stickers.checkShortName — Check whether the given short name is available
- Defined stickers.suggestShortName — Suggests a short name for a given stickerpack name
- Defined stickers.changeSticker — Update the keywords, emojis or mask coordinates of a sticker.
- Defined stickers.renameStickerSet — Renames a stickerset.
- Defined stickers.deleteStickerSet — Deletes a stickerset we created.
- Defined stickers.replaceSticker — Replace a sticker in a stickerset ».
- Defined phone.getCallConfig — DEPRECATED: Get phone call configuration to be passed to the libtgvoip (deprecated) shared config.
- Defined phone.requestCall — Start a Ansible phone call, see here » for more info on the full flow.
- Defined phone.acceptCall — Accept incoming call, see here » for more info on the full flow.
- Defined phone.confirmCall — Complete phone call E2E encryption key exchange », see here » for more info on the full flow.
- Defined phone.receivedCall — Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended, see here » for more info on the full flow.
- Defined phone.discardCall — Refuse or end running call, see here » for more info on the full flow.
- Defined phone.setCallRating — Rate a call, returns info about the rating message sent to the official VoIP bot, see here » for more info on the full flow.
- Defined phone.saveCallDebug — Send phone call debug data to server.
- Defined phone.sendSignalingData — Send VoIP signaling data for an ongoing phone call.
- Defined phone.createGroupCall — Create a video chat or livestream, see here » for the full flow.
- Defined phone.joinGroupCall — Join any group call type ». Conference calls additionally require the E2E joining flow ».The params field must contain a join payload generated by the local tgcalls group-call engine. It contains a random non-zero audio ssrc, ICE ufrag and pwd, DTLS fingerprints, and, when publishing video, ssrc-groups.For example, a join payload without published video has the following shape:json<br>{<br> "ssrc": 123456789,<br> "ufrag": "...",<br> "pwd": "...",<br> "fingerprints": [{<br> "hash": "sha-256",<br> "fingerprint": "...",<br> "setup": "passive"<br> }]<br>}<br>When joining an RTMP-mode call, generate the payload without published video source groups.
- Defined phone.leaveGroupCall — Leave a group call without ending it for other participants. This method can be used with all group call types, see here » for more info.
- Defined phone.inviteToGroupCall — Invite a set of users to a video chat/livestream »; cannot be used for live stories » or conference calls ».
- Defined phone.discardGroupCall — Terminate a group call, ending the room for all participants. This method can be used with all group call types, see here » for more info.
- Defined phone.toggleGroupCallSettings — Change group call settings. Each setting supports different group call types, see here » for more info.
- Defined phone.getGroupCall — Get info about a group call and its participants.
- Defined phone.getGroupParticipants — Get group call participants.
- Defined phone.checkGroupCall — Check which of the specified source IDs the server still recognizes as joined to a group call. This method can be used with all group call types, see here » for more info.After joining the main connection with phone.joinGroupCall, pass its non-zero SSRC/source ID to this method periodically. If a presentation connection is also active, include the separate source registered using phone.joinGroupCallPresentation.The method returns the subset of the supplied sources that are still joined. A missing source means that the corresponding connection must be recreated and joined again; it does not indicate whether media packets are currently flowing. If the method returns GROUPCALL_JOIN_MISSING, the main connection must be rejoined.
- Defined phone.toggleGroupCallRecord — Start or stop recording a video chat/livestream, see here » for more info. The recorded audio and video streams will be automatically sent to Saved Messages (the chat with ourselves).
- Defined phone.editGroupCallParticipant — Edit information about a participant of a non-RTMP video chat/livestream or conference. The raise_hand field is only supported in video chats/livestreams, see here » for more info.Note: flags.N?Bool parameters can have three possible values:- If the TL flag is not set, the previous value will not be changed.- If the TL flag is set and contains a boolTrue, the previous value will be overwritten to true.- If the TL flag is set and contains a boolFalse, the previous value will be overwritten to false.
- Defined phone.editGroupCallTitle — Edit the title of a video chat or livestream. This method cannot be used with live stories or conferences, see here » for more info.
- Defined phone.getGroupCallJoinAs — Get a list of peers that can be used to join a video chat or livestream », presenting yourself as a specific user/channel.This method cannot be used for live stories or conference calls. To comment or react in a live story as another peer, use channels.getSendAs with for_live_stories set and pass one of the returned peers to phone.sendGroupCallMessage.send_as.
- Defined phone.exportGroupCallInvite — Get an invite link for a public video chat/livestream ».Non-admin members or subscribers may export a link with can_self_unmute omitted. Only group call admins may set can_self_unmute to export a link that allows users to speak.Cannot be used for video chats/livestreams associated with private groups/channels, conference calls » or live stories ».
- Defined phone.toggleGroupCallStartSubscription — Subscribe or unsubscribe to a scheduled group call.
- Defined phone.startScheduledGroupCall — Start a scheduled group call.
- Defined phone.saveDefaultGroupCallJoinAs — Set the default peer used to join a video chat/livestream » associated with a specific dialog.
- Defined phone.joinGroupCallPresentation — Start screen sharing in a non-RTMP video chat/livestream or conference. Presentations are not supported in live stories or RTMP-mode video chats/livestreams, see here » for more info.
- Defined phone.leaveGroupCallPresentation — Stop screen sharing in a non-RTMP video chat/livestream or conference. Presentations are not supported in live stories or RTMP-mode video chats/livestreams, see here » for more info.
- Defined phone.getGroupCallStreamChannels — Get the available stream channels and current playback timestamp of an RTMP-mode video chat, livestream or live story, see here » for the full flow. The group call must be joined before invoking this method. Send the request to the media DC specified by groupCall.stream_dc_id.
- Defined phone.getGroupCallStreamRtmpUrl — Get the RTMP URL and stream key used by the single external streamer that publishes all audio and video for an RTMP-mode video chat, livestream or live story.See here » for the full flow.
- Defined phone.saveCallLog — Deprecated: send libtgvoip phone call debug information
- Defined phone.createConferenceCall — Create and optionally join a new conference call ».
- Defined phone.deleteConferenceCallParticipants — Remove participants from a conference call ».Exactly one of the only_left and kick flags must be set.
- Defined phone.sendConferenceCallBroadcast — Submit a verification message to conference call subchain 1, see subchains ».
- Defined phone.inviteConferenceCallParticipant — Invite a user to a conference call.
- Defined phone.declineConferenceCallInvite — Decline a conference call invite.
- Defined phone.getGroupCallChainBlocks — Fetch blocks from a conference call subchain »; handle the returned updateGroupCallChainBlocks as specified here ».If the number of blocks returned by any call to this method is equal to limit, this method must be re-invoked immediately after processing the returned updateGroupCallChainBlocks, with the newly committed offset (usually equal to the returned next_offset).
- Defined phone.sendGroupCallMessage — Send an in-call message to all participants of a video chat/livestream or live story, including in RTMP mode, see here » for more info.The send_as field can only be populated for live stories, where it optionally selects the displayed author. If omitted, the server automatically selects the appropriate author. Do not populate it for video chats/livestreams.Video chats/livestreams and live stories support animated emoji reactions », encoded as messages containing only a standard available reaction emoji or a single custom emoji entity.For a paid live story comment, pass the user-confirmed donation amount in allow_paid_stars. For commenters other than the live story owner, this amount must be at least the current groupCall.send_paid_messages_stars minimum. A higher amount may be donated to highlight the comment. The live story owner may comment without populating allow_paid_stars. To send a standalone paid live story donation, pass a positive allow_paid_stars value and an empty message, see here » for the full flow.
- Defined phone.sendGroupCallEncryptedMessage — Send an E2E-encrypted message or emoji reaction to all participants of a conference call. This method can only be used with conferences; see here » for the serialization and encryption process.
- Defined phone.deleteGroupCallMessages — Delete specific messages from the in-call message overlay » of a video chat/livestream or live story, including in RTMP mode.Non-admin participants may delete messages they sent; admins may delete any message.
- Defined phone.deleteGroupCallParticipantMessages — As an admin, delete all messages from a specific participant in the in-call message overlay » of a video chat/livestream or live story, including in RTMP mode.
- Defined phone.getGroupCallStars — Fetch a live story's total donations and top donors, see paid live story donations ».
- Defined phone.saveDefaultSendAs — Save the default peer displayed as the author of live story comments and reactions, see in-call messages ».It cannot be used for normal video chats/livestreams, where in-call messages are sent as the peer used to join the call (join_as).
- Defined langpack.getLangPack — Get localization pack strings
- Defined langpack.getStrings — Get strings from a language pack
- Defined langpack.getDifference — Get new strings in language pack
- Defined langpack.getLanguages — Get information about all languages in a localization pack
- Defined langpack.getLanguage — Get information about a language in a localization pack
- Defined folders.editPeerFolders — Edit peers in peer folder
- Defined stats.getBroadcastStats — Get channel statistics
- Defined stats.loadAsyncGraph — Load channel statistics graph asynchronously
- Defined stats.getMegagroupStats — Get supergroup statistics
- Defined stats.getMessagePublicForwards — Obtains a list of messages, indicating to which other public channels was a channel message forwarded. Will return a list of messages with peer_id equal to the public channel to which this message was forwarded.
- Defined stats.getMessageStats — Get message statistics
- Defined stats.getStoryStats — Get statistics for a certain story.
- Defined stats.getStoryPublicForwards — Obtain forwards of a story as a message to public chats and reposts by public channels.
- Defined stats.getPollStats — Get statistics for a poll sent in a message.
- Defined chatlists.exportChatlistInvite — Export a folder », creating a chat folder deep link ».
- Defined chatlists.deleteExportedInvite — Delete a previously created chat folder deep link ».
- Defined chatlists.editExportedInvite — Edit a chat folder deep link ».
- Defined chatlists.getExportedInvites — List all chat folder deep links » associated to a folder
- Defined chatlists.checkChatlistInvite — Obtain information about a chat folder deep link ».
- Defined chatlists.joinChatlistInvite — Import a chat folder deep link », joining some or all the chats in the folder.
- Defined chatlists.getChatlistUpdates — Fetch new chats associated with an imported chat folder deep link ». Must be invoked at most every chatlist_update_period seconds (as per the related client configuration parameter »).
- Defined chatlists.joinChatlistUpdates — Join channels and supergroups recently added to a chat folder deep link ».
- Defined chatlists.hideChatlistUpdates — Dismiss new pending peers recently added to a chat folder deep link ».
- Defined chatlists.getLeaveChatlistSuggestions — Returns identifiers of pinned or always included chats from a chat folder imported using a chat folder deep link », which are suggested to be left when the chat folder is deleted.
- Defined chatlists.leaveChatlist — Delete a folder imported using a chat folder deep link »
- Defined stories.canSendStory — Check whether we can post stories as the specified peer.
- Defined stories.sendStory — Uploads a Ansible Story.May also be used in a business connection, not by wrapping the query in invokeWithBusinessConnection », but rather by specifying the ID of a controlled business user in peer.
- Defined stories.editStory — Edit an uploaded storyMay also be used in a business connection, not by wrapping the query in invokeWithBusinessConnection », but rather by specifying the ID of a controlled business user in peer: in this context, the method can only be used to edit stories posted by the same business bot on behalf of the user with stories.sendStory.
- Defined stories.deleteStories — Deletes some posted stories.
- Defined stories.togglePinned — Pin or unpin one or more stories
- Defined stories.getAllStories — Fetch the List of active (or active and hidden) stories, see here » for more info on watching stories.
- Defined stories.getPinnedStories — Fetch the stories pinned on a peer's profile.
- Defined stories.getStoriesArchive — Fetch the story archive » of a peer we control.
- Defined stories.getStoriesByID — Obtain full info about a set of stories by their IDs.
- Defined stories.toggleAllStoriesHidden — Hide the active stories of a specific peer, preventing them from being displayed on the action bar on the homescreen.
- Defined stories.readStories — Mark all stories up to a certain ID as read, for a given peer; will emit an updateReadStories update to all logged-in sessions.
- Defined stories.incrementStoryViews — Increment the view counter of one or more stories.
- Defined stories.getStoryViewsList — Obtain the list of users that have viewed a specific story we posted
- Defined stories.getStoriesViews — Obtain info about the view count, forward count, reactions and recent viewers of one or more stories.
- Defined stories.exportStoryLink — Generate a story deep link for a specific story
- Defined stories.report — Report a story.
- Defined stories.activateStealthMode — Activates stories stealth mode, see here » for more info.Will return an updateStoriesStealthMode.
- Defined stories.sendReaction — React to a story.
- Defined stories.getPeerStories — Fetch the full active story list of a specific peer.
- Defined stories.getAllReadPeerStories — Obtain the latest read story ID for all peers when first logging in, returned as a list of updateReadStories updates, see here » for more info.
- Defined stories.getPeerMaxIDs — Get compact active story summaries » for a set of peers.
- Defined stories.getChatsToSend — Obtain a list of channels where the user can post stories
- Defined stories.togglePeerStoriesHidden — Hide the active stories of a user, preventing them from being displayed on the action bar on the homescreen, see here » for more info.
- Defined stories.getStoryReactionsList — Get the reaction and interaction list of a story posted to a channel, along with the sender of each reaction.Can only be used by channel admins.
- Defined stories.togglePinnedToTop — Pin some stories to the top of the profile, see here » for more info.
- Defined stories.searchPosts — Globally search for stories using a hashtag or a location media area, see here » for more info on the full flow.Either hashtag or area must be set when invoking the method.
- Defined stories.createAlbum — Creates a story album.
- Defined stories.updateAlbum — Rename a story albums », or add, delete or reorder stories in it.
- Defined stories.reorderAlbums — Reorder story albums on a profile ».
- Defined stories.deleteAlbum — Delete a story album.
- Defined stories.getAlbums — Get story albums created by a peer.
- Defined stories.getAlbumStories — Get stories in a story album ».
- Defined stories.startLive — Start a live story, optionally using RTMP livestream mode, see here » for the full flow.
- Defined premium.getBoostsList — Obtains info about the boosts that were applied to a certain channel or supergroup (admins only)
- Defined premium.getMyBoosts — Obtain which peers are we currently boosting, and how many boost slots we have left.
- Defined premium.applyBoost — Apply one or more boosts » to a peer.
- Defined premium.getBoostsStatus — Gets the current number of boosts of a channel/supergroup.
- Defined premium.getUserBoosts — Returns the lists of boost that were applied to a channel/supergroup by a specific user (admins only)
- Defined smsjobs.isEligibleToJoin — Check if we can process SMS jobs (official clients only).
- Defined smsjobs.join — Enable SMS jobs (official clients only).
- Defined smsjobs.leave — Disable SMS jobs (official clients only).
- Defined smsjobs.updateSettings — Update SMS job settings (official clients only).
- Defined smsjobs.getStatus — Get SMS jobs status (official clients only).
- Defined smsjobs.getSmsJob — Get info about an SMS job (official clients only).
- Defined smsjobs.finishJob — Finish an SMS job (official clients only).
- Defined fragment.getCollectibleInfo — Fetch information about a fragment collectible, see here » for more info on the full flow.
- Defined aicompose.createTone — Create a new custom AI composer tone ».
- Defined aicompose.updateTone — Edit a custom AI composer tone » previously created by the current user. Only the fields whose flag is set will be modified.
- Defined aicompose.saveTone — Install or uninstall an AI composer tone », adding it to or removing it from the list of saved tones of the current user.Non-Premium users may install up to aicompose_tone_saved_limit_default » tones, Premium users up to aicompose_tone_saved_limit_premium » tones.
- Defined aicompose.deleteTone — Permanently delete a custom AI composer tone » created by the current user.
- Defined aicompose.getTone — Fetch information about a single AI composer tone », for example to resolve a shared tone deep link.
- Defined aicompose.getTones — Fetch the list of saved AI composer tones » of the current user.
- Defined aicompose.getToneExample — Fetch an example showing how an AI composer tone » rephrases a sample message, used as a preview in the tone picker.
- Defined communities.create
- Defined communities.togglePeerLink
- Defined communities.getJoinedCommunities
- Defined communities.toggleCommunityCollapsedInDialogs
- Defined communities.getPeerLinkRequests
- Defined communities.togglePeerLinkRequestApproval
- Defined communities.toggleAllPeerLinkRequestApproval
- Defined communities.toggleParticipantBanned
- Defined communities.getParticipantJoinedChats
- Defined ephemeral.sendMessage
- Defined ephemeral.deleteMessage
- Defined ephemeral.reportMessage
- Defined ephemeral.getCallbackAnswer
- Defined ephemeral.editMessage
- Defined ephemeral.deleteWelcomeMessage
- Defined ephemeral.deleteAllWelcomeMessages
- Defined ephemeral.getWelcomeMessages
- Defined toncenter.performApiRequest
- Defined toncenter.getStreamingUrl
- Defined wallet.getState
- Defined wallet.getUserAddresses
- Defined wallet.getTransactions
- Defined wallet.getTransactionsByIDs
- Defined wallet.getTransactionsByMsgHash
- Defined wallet.exportSecretPhrase
- Defined wallet.fetchEncryptedSecretPhrasePart
- Defined wallet.replaceWallet
- Defined wallet.disableBackup
- Defined wallet.getBackupHolderDcs
- Defined wallet.enableBackup
- Defined wallet.getProofChallenge
- Defined wallet.sendTransfer
- Defined wallet.getGaslessInfo
- Defined wallet.getExistingWaltBalance
- Defined wallet.getNfts
- Defined wallet.tonConnectCreateSession
- Defined wallet.tonConnectRegisterKey
- Defined wallet.tonConnectSubmitConnectResult
- Defined wallet.tonConnectGetPending
- Defined wallet.tonConnectClaimRequest
- Defined wallet.tonConnectSubmitResponse
- Defined wallet.tonConnectNextEventId
- Defined wallet.tonConnectCloseSession
- Defined wallet.tonConnectGetSessions
- Defined wallet.setCardStickers
Constructors (1720)
Layer 223 — The first public Ansible layer
Complete published schema snapshot: 1546 constructors and 757 methods. This is an interface reference, not a claim that every scenario is implemented.
Open the schema of this layer »
The layer covers the following areas:
Methods (757)
- Defined invokeAfterMsg — Invokes a query after successful completion of one of the previous queries.
- Defined invokeAfterMsgs — Invokes a query after a successful completion of previous queries
- Defined initConnection — Initialize connection
- Defined invokeWithLayer — Invoke the specified query using the specified API layer
- Defined invokeWithoutUpdates — Invoke a request without subscribing the used connection for updates (this is enabled by default for file queries).
- Defined invokeWithMessagesRange — Invoke with the given message range
- Defined invokeWithTakeout — Invoke a method within a takeout session, see here » for more info.
- Defined invokeWithBusinessConnection — Invoke a method using a Ansible Business Bot connection, see here » for more info, including a list of the methods that can be wrapped in this constructor.Make sure to always send queries wrapped in a invokeWithBusinessConnection to the datacenter ID, specified in the dc_id field of the botBusinessConnection that is being used.
- Defined invokeWithGooglePlayIntegrity — Official clients only, invoke with Google Play Integrity token.
- Defined invokeWithApnsSecret — Official clients only, invoke with Apple push verification.
- Defined invokeWithReCaptcha — Official clients only: re-execute a method call that required reCAPTCHA verification via a RECAPTCHA_CHECK_%s__%s, where the first placeholder is the action, and the second one is the reCAPTCHA key ID.
- Defined auth.sendCode — Send the verification code for login
- Defined auth.signUp — Registers a validated phone number in the system.
- Defined auth.signIn — Signs in a user with a validated phone number.
- Defined auth.logOut — Logs out the user.
- Defined auth.resetAuthorizations — Terminates all user's authorized sessions except for the current one.After calling this method it is necessary to reregister the current device using the method account.registerDevice
- Defined auth.exportAuthorization — Returns data for copying authorization to another data-center.
- Defined auth.importAuthorization — Logs in a user using a key transmitted from his native data-center.
- Defined auth.bindTempAuthKey — Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id.For more information, see Perfect Forward Secrecy.
- Defined auth.importBotAuthorization — Login as a bot
- Defined auth.checkPassword — Try logging to an account protected by a 2FA password.
- Defined auth.requestPasswordRecovery — Request recovery code of a 2FA password, only for accounts with a recovery email configured.
- Defined auth.recoverPassword — Reset the 2FA password using the recovery code sent using auth.requestPasswordRecovery.
- Defined auth.resendCode — Resend the login code via another medium, the phone code type is determined by the return value of the previous auth.sendCode/auth.resendCode: see login for more info.
- Defined auth.cancelCode — Cancel the login verification code
- Defined auth.dropTempAuthKeys — Delete all temporary authorization keys except for the ones specified
- Defined auth.exportLoginToken — Generate a login token, for login via QR code. The generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken deep link » in the QR code.For more info, see login via QR code.
- Defined auth.importLoginToken — Login using a redirected login token, generated in case of DC mismatch during QR code login.For more info, see login via QR code.
- Defined auth.acceptLoginToken — Accept QR code login token, logging in the app that generated it.Returns info about the new session.For more info, see login via QR code.
- Defined auth.checkRecoveryPassword — Check if the 2FA recovery code sent using auth.requestPasswordRecovery is valid, before passing it to auth.recoverPassword.
- Defined auth.importWebTokenAuthorization — Login by importing an authorization token
- Defined auth.requestFirebaseSms — Request an SMS code via Firebase.
- Defined auth.resetLoginEmail — Reset the login email ».
- Defined auth.reportMissingCode — Official apps only, reports that the SMS authentication code wasn't delivered.
- Defined auth.checkPaidAuth — Checks the status of a login payment.
- Defined auth.initPasskeyLogin — Initialize login with a passkey over an unauthenticated connection, see here » for more info.
- Defined auth.finishPasskeyLogin — Complete login with a passkey over an unauthenticated connection, see here » for more info.Must be sent to the user's native DC, as specified by the user_handle (dcId:userId) returned in the passkey assertion, see here » for the full flow.
- Defined account.registerDevice — Register device to receive PUSH notifications
- Defined account.unregisterDevice — Deletes a device by its token, stops sending PUSH-notifications to it.
- Defined account.updateNotifySettings — Edits notification settings from a given user/group, from all users/all groups.
- Defined account.getNotifySettings — Gets current notification settings for a given user/group, from all users/all groups.
- Defined account.resetNotifySettings — Resets all notification settings from users and groups.
- Defined account.updateProfile — Updates user profile.
- Defined account.updateStatus — Updates online user status.
- Defined account.getWallPapers — Returns a list of available wallpapers.
- Defined account.reportPeer — Report a peer for violation of Ansible Terms of Service
- Defined account.checkUsername — Validates a username and checks availability.
- Defined account.updateUsername — Changes username for the current user.
- Defined account.getPrivacy — Get privacy settings of current account
- Defined account.setPrivacy — Change privacy settings of current account
- Defined account.deleteAccount — Delete the user's account from the Ansible servers.Can also be used to delete the account of a user that provided the login code, but forgot the 2FA password and no recovery method is configured, see here » for more info on password recovery, and here » for more info on account deletion.
- Defined account.getAccountTTL — Get days to live of account
- Defined account.setAccountTTL — Set account self-destruction period
- Defined account.sendChangePhoneCode — Verify a new phone number to associate to the current account
- Defined account.changePhone — Change the phone number of the current account
- Defined account.updateDeviceLocked — When client-side passcode lock feature is enabled, will not show message texts in incoming PUSH notifications.
- Defined account.getAuthorizations — Get logged-in sessions
- Defined account.resetAuthorization — Log out an active authorized session by its hash
- Defined account.getPassword — Obtain configuration for two-factor authorization with password
- Defined account.getPasswordSettings — Get private info associated to the password info (recovery email, Ansible passport info & so on)
- Defined account.updatePasswordSettings — Set a new 2FA password
- Defined account.sendConfirmPhoneCode — Send confirmation code to cancel account deletion, for more info click here »
- Defined account.confirmPhone — Confirm a phone number to cancel account deletion, for more info click here »
- Defined account.getTmpPassword — Get temporary payment password
- Defined account.getWebAuthorizations — Get web login widget authorizations
- Defined account.resetWebAuthorization — Log out an active web Ansible login session
- Defined account.resetWebAuthorizations — Reset all active web Ansible login sessions
- Defined account.getAllSecureValues — Get all saved Ansible Passport documents, for more info see the passport docs »
- Defined account.getSecureValue — Get saved Ansible Passport document, for more info see the passport docs »
- Defined account.saveSecureValue — Securely save Ansible Passport document, for more info see the passport docs »
- Defined account.deleteSecureValue — Delete stored Ansible Passport documents, for more info see the passport docs »
- Defined account.getAuthorizationForm — Returns a Ansible Passport authorization form for sharing data with a service
- Defined account.acceptAuthorization — Sends a Ansible Passport authorization form, effectively sharing data with the service
- Defined account.sendVerifyPhoneCode — Send the verification phone code for Ansible passport.
- Defined account.verifyPhone — Verify a phone number for Ansible passport.
- Defined account.sendVerifyEmailCode — Send an email verification code.
- Defined account.verifyEmail — Verify an email address.
- Defined account.initTakeoutSession — Initialize a takeout session, see here » for more info.
- Defined account.finishTakeoutSession — Terminate a takeout session, see here » for more info.
- Defined account.confirmPasswordEmail — Verify an email to use as 2FA recovery method.
- Defined account.resendPasswordEmail — Resend the code to verify an email to use as 2FA recovery method.
- Defined account.cancelPasswordEmail — Cancel the code that was sent to verify an email to use as 2FA recovery method.
- Defined account.getContactSignUpNotification — Whether the user will receive notifications when contacts sign up
- Defined account.setContactSignUpNotification — Toggle contact sign up notifications
- Defined account.getNotifyExceptions — Returns list of chats with non-default notification settings
- Defined account.getWallPaper — Get info about a certain wallpaper
- Defined account.uploadWallPaper — Create and upload a new wallpaper
- Defined account.saveWallPaper — Install/uninstall wallpaper
- Defined account.installWallPaper — Install wallpaper
- Defined account.resetWallPapers — Delete all installed wallpapers, reverting to the default wallpaper set.
- Defined account.getAutoDownloadSettings — Get media autodownload settings
- Defined account.saveAutoDownloadSettings — Change media autodownload settings
- Defined account.uploadTheme — Upload theme
- Defined account.createTheme — Create a theme
- Defined account.updateTheme — Update theme
- Defined account.saveTheme — Save a theme
- Defined account.installTheme — Install a theme
- Defined account.getTheme — Get theme information
- Defined account.getThemes — Get installed themes
- Defined account.setContentSettings — Set sensitive content settings (for viewing or hiding NSFW content)
- Defined account.getContentSettings — Get sensitive content settings
- Defined account.getMultiWallPapers — Get info about multiple wallpapers
- Defined account.getGlobalPrivacySettings — Get global privacy settings
- Defined account.setGlobalPrivacySettings — Set global privacy settings
- Defined account.reportProfilePhoto — Report a profile photo of a dialog
- Defined account.resetPassword — Initiate a 2FA password reset: can only be used if the user is already logged-in, see here for more info »
- Defined account.declinePasswordReset — Abort a pending 2FA password reset, see here for more info »
- Defined account.getChatThemes — Get all available chat themes ».
- Defined account.setAuthorizationTTL — Set time-to-live of current session
- Defined account.changeAuthorizationSettings — Change settings related to a session.
- Defined account.getSavedRingtones — Fetch saved notification sounds
- Defined account.saveRingtone — Save or remove saved notification sound.If the notification sound is already in MP3 format, account.savedRingtone will be returned. Otherwise, it will be automatically converted and a account.savedRingtoneConverted will be returned, containing a new document object that should be used to refer to the ringtone from now on (ie when deleting it using the unsave parameter, or when downloading it).
- Defined account.uploadRingtone — Upload notification sound, use account.saveRingtone to convert it and add it to the list of saved notification sounds.
- Defined account.updateEmojiStatus — Set an emoji status
- Defined account.getDefaultEmojiStatuses — Get a list of default suggested emoji statuses
- Defined account.getRecentEmojiStatuses — Get recently used emoji statuses
- Defined account.clearRecentEmojiStatuses — Clears list of recently used emoji statuses
- Defined account.reorderUsernames — Reorder usernames associated with the currently logged-in user.
- Defined account.toggleUsername — Activate or deactivate a purchased fragment.com username associated to the currently logged-in user.
- Defined account.getDefaultProfilePhotoEmojis — Get a set of suggested custom emoji stickers that can be used as profile picture
- Defined account.getDefaultGroupPhotoEmojis — Get a set of suggested custom emoji stickers that can be used as group picture
- Defined account.getAutoSaveSettings — Get autosave settings
- Defined account.saveAutoSaveSettings — Modify autosave settings
- Defined account.deleteAutoSaveExceptions — Clear all peer-specific autosave settings.
- Defined account.invalidateSignInCodes — Invalidate the specified login codes, see here » for more info.
- Defined account.updateColor — Update the accent color and background custom emoji » of the current account.
- Defined account.getDefaultBackgroundEmojis — Get a set of suggested custom emoji stickers that can be used in an accent color pattern.
- Defined account.getChannelDefaultEmojiStatuses — Get a list of default suggested channel emoji statuses.
- Defined account.getChannelRestrictedStatusEmojis — Returns fetch the full list of custom emoji IDs » that cannot be used in channel emoji statuses ».
- Defined account.updateBusinessWorkHours — Specify a set of Ansible Business opening hours. This info will be contained in userFull.business_work_hours.To remove all opening hours, invoke the method without setting the business_work_hours field.Note that the opening hours specified by the user must be appropriately validated and transformed before invoking the method, as specified here ».
- Defined account.updateBusinessLocation — Businesses » may advertise their location using this method, see here » for more info.To remove business location information invoke the method without setting any of the parameters.
- Defined account.updateBusinessGreetingMessage — Set a list of Ansible Business greeting messages.
- Defined account.updateBusinessAwayMessage — Set a list of Ansible Business away messages.
- Defined account.updateConnectedBot — Connect a business bot » to the current account, or to change the current connection settings.
- Defined account.getConnectedBots — List all currently connected business bots »
- Defined account.getBotBusinessConnection — Bots may invoke this method to re-fetch the updateBotBusinessConnect constructor associated with a specific business connection_id, see here » for more info on connected business bots. This is needed for example for freshly logged in bots that are receiving some updateBotNewBusinessMessage, etc. updates because some users have already connected to the bot before it could login. In this case, the bot is receiving messages from the business connection, but it hasn't cached the associated updateBotBusinessConnect with info about the connection (can it reply to messages? etc.) yet, and cannot receive the old ones because they were sent when the bot wasn't logged into the session yet. This method can be used to fetch info about a not-yet-cached business connection, and should not be invoked if the info is already cached or to fetch changes, as eventual changes will automatically be sent as new updateBotBusinessConnect updates to the bot using the usual update delivery methods ».
- Defined account.updateBusinessIntro — Set or remove the Ansible Business introduction ».
- Defined account.toggleConnectedBotPaused — Pause or unpause a specific chat, temporarily disconnecting it from all business bots ».
- Defined account.disablePeerConnectedBot — Permanently disconnect a specific chat from all business bots » (equivalent to specifying it in recipients.exclude_users during initial configuration with account.updateConnectedBot »); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking account.updateConnectedBot ».
- Defined account.updateBirthday — Update our birthday, see here » for more info.
- Defined account.createBusinessChatLink — Create a business chat deep link ».
- Defined account.editBusinessChatLink — Edit a created business chat deep link ».
- Defined account.deleteBusinessChatLink — Delete a business chat deep link ».
- Defined account.getBusinessChatLinks — List all created business chat deep links ».
- Defined account.resolveBusinessChatLink — Resolve a business chat deep link ».
- Defined account.updatePersonalChannel — Associate (or remove) a personal channel », that will be listed on our personal profile page ».Changing it will emit an updateUser update.
- Defined account.toggleSponsoredMessages — Disable or re-enable Ansible ads for the current Premium account.Useful for business owners that may want to launch and view their own Ansible ads via the Ansible ad platform ».
- Defined account.getReactionsNotifySettings — Get the current reaction notification settings ».
- Defined account.setReactionsNotifySettings — Change the reaction notification settings ».
- Defined account.getCollectibleEmojiStatuses — Obtain a list of emoji statuses » for owned or hosted collectible gifts ».
- Defined account.getPaidMessagesRevenue — Get the number of stars we have received from the specified user thanks to paid messages »; the received amount will be equal to the sent amount multiplied by stars_paid_message_commission_permille divided by 1000.
- Defined account.toggleNoPaidMessagesException — Allow a user to send us messages without paying if paid messages » are enabled.
- Defined account.setMainProfileTab — Changes the main profile tab of the current user, see here » for more info.
- Defined account.saveMusic — Adds or removes a song from the current user's profile see here » for more info on the music tab of the profile page.
- Defined account.getSavedMusicIds — Fetch the full list of only the IDs of songs currently added to the profile, see here » for more info.
- Defined account.getUniqueGiftChatThemes — Obtain all chat themes » associated to owned or hosted collectible gifts ».
- Defined account.initPasskeyRegistration — Initialize passkey registration for the current account, see here » for more info on the full flow.
- Defined account.registerPasskey — Complete passkey registration for the current account, see here » for more info on the full flow.
- Defined account.getPasskeys — List the passkeys associated to the current account that can be used to log in, see here » for more info on passkeys.
- Defined account.deletePasskey — Delete a passkey associated to the current account, see here » for more info.
- Defined users.getUsers — Returns basic user info according to their identifiers.
- Defined users.getFullUser — Returns extended user info by ID.
- Defined users.setSecureValueErrors — Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change).Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.
- Defined users.getRequirementsToContact — Check whether we can write to the specified users, used to implement bulk checks for Premium-only messages » and paid messages ».For each input user, returns a RequirementToContact constructor (at the same offset in the vector) containing requirements to contact them.
- Defined users.getSavedMusic — Get songs pinned to the user's profile, see here » for more info.
- Defined users.getSavedMusicByID — Check if the passed songs are still pinned to the user's profile, or refresh the file references of songs pinned on a user's profile see here » for more info.
- Defined users.suggestBirthday — Suggest a birthday to another user, see here » for more info on birthdays in the API.
- Defined contacts.getContactIDs — Get the Ansible IDs of all contacts. Returns an array of Ansible user IDs for all contacts (0 if a contact does not have an associated Ansible account or have hidden their account using privacy settings).
- Defined contacts.getStatuses — Use this method to obtain the online statuses of all contacts with an accessible Ansible account.
- Defined contacts.getContacts — Returns the current user's contact list.
- Defined contacts.importContacts — Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info.Use contacts.addContact to add Ansible contacts without actually using their phone number.
- Defined contacts.deleteContacts — Deletes several contacts from the list.
- Defined contacts.deleteByPhones — Delete contacts by phone number
- Defined contacts.block — Adds a peer to a blocklist, see here » for more info.
- Defined contacts.unblock — Deletes a peer from a blocklist, see here » for more info.
- Defined contacts.getBlocked — Returns the list of blocked users.
- Defined contacts.search — Returns users found by username substring.
- Defined contacts.resolveUsername — Resolve a @username to get peer info
- Defined contacts.getTopPeers — Get most used peers
- Defined contacts.resetTopPeerRating — Reset rating of top peer
- Defined contacts.resetSaved — Removes all contacts without an associated Ansible account.
- Defined contacts.getSaved — Get all contacts, requires a takeout session, see here » for more info.
- Defined contacts.toggleTopPeers — Enable/disable top peers
- Defined contacts.addContact — Add an existing Ansible user as contact.Use contacts.importContacts to add contacts by phone number, without knowing their Ansible ID.
- Defined contacts.acceptContact — If the add contact action bar is active, add that user as contact
- Defined contacts.getLocated — Get users and geochats near you, see here » for more info.
- Defined contacts.blockFromReplies — Stop getting notifications about discussion replies of a certain user in @replies
- Defined contacts.resolvePhone — Resolve a phone number to get user info, if their privacy settings allow it.Make sure to implement client-side ratelimiting/debounce for this method, allowing at most 1 call every 3 seconds.
- Defined contacts.exportContactToken — Generates a temporary profile link for the currently logged-in user.
- Defined contacts.importContactToken — Obtain user info from a temporary profile link.
- Defined contacts.editCloseFriends — Edit the close friends list, see here » for more info.
- Defined contacts.setBlocked — Replace the contents of an entire blocklist, see here for more info ».
- Defined contacts.getBirthdays — Fetch all users with birthdays that fall within +1/-1 days, relative to the current day: this method should be invoked by clients every 6-8 hours, and if the result is non-empty, it should be used to appropriately update locally cached birthday information in user.birthday.See here » for more info.
- Defined contacts.getSponsoredPeers — Obtain a list of sponsored peer search results for a given query
- Defined contacts.updateContactNote — Update the private note associated to a contact; see here » for more info.
- Defined messages.getMessages — Returns the list of messages by their IDs.
- Defined messages.getDialogs — Returns the current user dialog list.
- Defined messages.getHistory — Returns the message history in a peer.Results are ordered by date (descending).
- Defined messages.search — Search for messages.
- Defined messages.readHistory — Marks message history as read.
- Defined messages.deleteHistory — Deletes communication history.
- Defined messages.deleteMessages — Deletes messages by their identifiers.
- Defined messages.receivedMessages — Confirms receipt of messages by a client, cancels PUSH-notification sending.
- Defined messages.setTyping — Sends a current user typing event (see SendMessageAction for all event types) to a conversation partner or group.
- Defined messages.sendMessage — Sends a message to a chat
- Defined messages.sendMedia — Send a media
- Defined messages.forwardMessages — Forwards messages by their IDs.
- Defined messages.reportSpam — Report a new incoming chat for spam, if the peer settings of the chat allow us to do that
- Defined messages.getPeerSettings — Get peer settings
- Defined messages.report — Report a message in a chat for violation of Ansible Terms of Service
- Defined messages.getChats — Returns chat basic info on their IDs.
- Defined messages.getFullChat — Get full info about a basic group.
- Defined messages.editChatTitle — Changes chat name and sends a service message on it.
- Defined messages.editChatPhoto — Changes chat photo and sends a service message on it
- Defined messages.addChatUser — Adds a user to a chat and sends a service message on it.
- Defined messages.deleteChatUser — Deletes a user from a chat and sends a service message on it.
- Defined messages.createChat — Creates a new chat.
- Defined messages.getDhConfig — Returns configuration parameters for Diffie-Hellman key generation. Can also return a random sequence of bytes of required length.
- Defined messages.requestEncryption — Sends a request to start a secret chat to the user.
- Defined messages.acceptEncryption — Confirms creation of a secret chat
- Defined messages.discardEncryption — Cancels a request for creation and/or delete info on secret chat.
- Defined messages.setEncryptedTyping — Send typing event by the current user to a secret chat.
- Defined messages.readEncryptedHistory — Marks message history within a secret chat as read.
- Defined messages.sendEncrypted — Sends a text message to a secret chat.
- Defined messages.sendEncryptedFile — Sends a message with a file attachment to a secret chat
- Defined messages.sendEncryptedService — Sends a service message to a secret chat.
- Defined messages.receivedQueue — Confirms receipt of messages in a secret chat by client, cancels push notifications. The method returns a list of random_ids of messages for which push notifications were cancelled.
- Defined messages.reportEncryptedSpam — Report a secret chat for spam
- Defined messages.readMessageContents — Notifies the sender about the recipient having listened a voice message or watched a video, emitting an updateReadMessagesContents.
- Defined messages.getStickers — Get stickers by emoji
- Defined messages.getAllStickers — Get all installed stickers
- Defined messages.getWebPagePreview — Get preview of webpage
- Defined messages.exportChatInvite — Export an invite link for a chat
- Defined messages.checkChatInvite — Check the validity of a chat invite link and get basic info about it
- Defined messages.importChatInvite — Import a chat invite and join a private chat/supergroup/channel
- Defined messages.getStickerSet — Get info about a stickerset
- Defined messages.installStickerSet — Install a stickerset
- Defined messages.uninstallStickerSet — Uninstall a stickerset
- Defined messages.startBot — Start a conversation with a bot using a deep linking parameter
- Defined messages.getMessagesViews — Get and increase the view counter of a message sent or forwarded from a channel
- Defined messages.editChatAdmin — Make a user admin in a basic group.
- Defined messages.migrateChat — Turn a basic group into a supergroup
- Defined messages.searchGlobal — Search for messages and peers globally
- Defined messages.reorderStickerSets — Reorder installed stickersets
- Defined messages.getDocumentByHash — Get a document by its SHA256 hash, mainly used for gifs
- Defined messages.getSavedGifs — Get saved GIFs.
- Defined messages.saveGif — Add GIF to saved gifs list
- Defined messages.getInlineBotResults — Query an inline bot
- Defined messages.setInlineBotResults — Answer an inline query, for bots only
- Defined messages.sendInlineBotResult — Send a result obtained using messages.getInlineBotResults.
- Defined messages.getMessageEditData — Find out if a media message's caption can be edited
- Defined messages.editMessage — Edit message
- Defined messages.editInlineBotMessage — Edit an inline bot message
- Defined messages.getBotCallbackAnswer — Press an inline callback button and get a callback answer from the bot
- Defined messages.setBotCallbackAnswer — Set the callback answer to a user button press (bots only)
- Defined messages.getPeerDialogs — Get dialog info of specified peers
- Defined messages.saveDraft — Save a message draft associated to a chat.
- Defined messages.getAllDrafts — Return all message drafts. Returns all the latest updateDraftMessage updates related to all chats with drafts.
- Defined messages.getFeaturedStickers — Get featured stickers
- Defined messages.readFeaturedStickers — Mark new featured stickers as read
- Defined messages.getRecentStickers — Get recent stickers
- Defined messages.saveRecentSticker — Add/remove sticker from recent stickers list
- Defined messages.clearRecentStickers — Clear recent stickers
- Defined messages.getArchivedStickers — Get all archived stickers
- Defined messages.getMaskStickers — Get installed mask stickers
- Defined messages.getAttachedStickers — Get stickers attached to a photo or video
- Defined messages.setGameScore — Use this method to set the score of the specified user in a game sent as a normal message (bots only).
- Defined messages.setInlineGameScore — Use this method to set the score of the specified user in a game sent as an inline message (bots only).
- Defined messages.getGameHighScores — Get highscores of a game
- Defined messages.getInlineGameHighScores — Get highscores of a game sent using an inline bot
- Defined messages.getCommonChats — Get chats in common with a user
- Defined messages.getWebPage — Get instant view page
- Defined messages.toggleDialogPin — Pin/unpin a dialog
- Defined messages.reorderPinnedDialogs — Reorder pinned dialogs
- Defined messages.getPinnedDialogs — Get pinned dialogs
- Defined messages.setBotShippingResults — If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an updateBotShippingQuery update. Use this method to reply to shipping queries.
- Defined messages.setBotPrecheckoutResults — Once the user has confirmed their payment and shipping details, the bot receives an updateBotPrecheckoutQuery update. Use this method to respond to such pre-checkout queries. Note: Ansible must receive an answer within 10 seconds after the pre-checkout query was sent.
- Defined messages.uploadMedia — Upload a file and associate it to a chat (without actually sending it to the chat)May also be used in a business connection, not by wrapping the query in invokeWithBusinessConnection », but rather by specifying the business connection ID in the business_connection_id parameter.
- Defined messages.sendScreenshotNotification — Notify the other user in a private chat that a screenshot of the chat was taken
- Defined messages.getFavedStickers — Get faved stickers
- Defined messages.faveSticker — Mark or unmark a sticker as favorite
- Defined messages.getUnreadMentions — Get unread messages where we were mentioned
- Defined messages.readMentions — Mark mentions as read
- Defined messages.getRecentLocations — Get all recent live locations sent to a specific chat: returns up to 1 location message (messageMediaGeoLive) per chat participant.
- Defined messages.sendMultiMedia — Send an album or grouped media
- Defined messages.uploadEncryptedFile — Upload encrypted file and associate it to a secret chat (without actually sending it to the chat).
- Defined messages.searchStickerSets — Search for stickersets
- Defined messages.getSplitRanges — Get message ranges for saving the user's chat history
- Defined messages.markDialogUnread — Manually mark dialog as unread
- Defined messages.getDialogUnreadMarks — Get dialogs manually marked as unread
- Defined messages.clearAllDrafts — Clear all drafts.
- Defined messages.updatePinnedMessage — Pin a message
- Defined messages.sendVote — Vote in a pollStarting from layer 159, the vote will be sent from the peer specified using messages.saveDefaultSendAs.Before voting, clients should check that the user is actually allowed to vote: voting is not possible if the poll is closed, if it is subscriber-only » and the user is not an eligible subscriber, or if it is country-restricted » and the user's phone_country_iso2 » is not in the poll's allowed country list. See vote restrictions » for the full list of conditions.
- Defined messages.getPollResults — Get poll results
- Defined messages.getOnlines — Get count of online users in a chat
- Defined messages.editChatAbout — Edit the description of a group/supergroup/channel.
- Defined messages.editChatDefaultBannedRights — Edit the default banned rights of a channel/supergroup/group.
- Defined messages.getEmojiKeywords — Get localized emoji keywords ».
- Defined messages.getEmojiKeywordsDifference — Get changed emoji keywords ».
- Defined messages.getEmojiKeywordsLanguages — Obtain a list of related languages that must be used when fetching emoji keyword lists ».Usually the method will return the passed language codes (if localized) + en + some language codes for similar languages (if applicable).
- Defined messages.getEmojiURL — Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji keywords ». The URL will be valid for 30 seconds after generation.
- Defined messages.getSearchCounters — Get the number of results that would be found by a messages.search call with the same parameters
- Defined messages.requestUrlAuth — Get more info about a Seamless Ansible Login authorization request, for more info click here »
- Defined messages.acceptUrlAuth — Use this to accept a Seamless Ansible Login authorization request, for more info click here »
- Defined messages.hidePeerSettingsBar — Should be called after the user hides the report spam/add as contact bar of a new chat, effectively prevents the user from executing the actions specified in the action bar ».
- Defined messages.getScheduledHistory — Get scheduled messages
- Defined messages.getScheduledMessages — Get scheduled messages
- Defined messages.sendScheduledMessages — Send scheduled messages right away
- Defined messages.deleteScheduledMessages — Delete scheduled messages
- Defined messages.getPollVotes — Get poll results for non-anonymous polls
- Defined messages.toggleStickerSets — Apply changes to multiple stickersets
- Defined messages.getDialogFilters — Get folders
- Defined messages.getSuggestedDialogFilters — Get suggested folders
- Defined messages.updateDialogFilter — Update folder
- Defined messages.updateDialogFiltersOrder — Reorder folders
- Defined messages.getOldFeaturedStickers — Method for fetching previously featured stickers
- Defined messages.getReplies — Get messages in a reply thread
- Defined messages.getDiscussionMessage — Get discussion message from the associated discussion group of a channel to show it on top of the comment section, without actually joining the group
- Defined messages.readDiscussion — Mark a thread as read
- Defined messages.unpinAllMessages — Unpin all pinned messages
- Defined messages.deleteChat — Delete a chat
- Defined messages.deletePhoneCallHistory — Delete the entire phone call history.
- Defined messages.checkHistoryImport — Obtains information about a chat export file, generated by a foreign chat app, click here for more info about imported chats ».
- Defined messages.initHistoryImport — Import chat history from a foreign chat app into a specific Ansible chat, click here for more info about imported chats ».
- Defined messages.uploadImportedMedia — Upload a media file associated with an imported chat, click here for more info ».
- Defined messages.startHistoryImport — Complete the history import process, importing all messages into the chat. To be called only after initializing the import with messages.initHistoryImport and uploading all files using messages.uploadImportedMedia.
- Defined messages.getExportedChatInvites — Get info about the chat invites of a specific chat
- Defined messages.getExportedChatInvite — Get info about a chat invite
- Defined messages.editExportedChatInvite — Edit an exported chat invite
- Defined messages.deleteRevokedExportedChatInvites — Delete all revoked chat invites
- Defined messages.deleteExportedChatInvite — Delete a chat invite
- Defined messages.getAdminsWithInvites — Get info about chat invites generated by admins.
- Defined messages.getChatInviteImporters — Get info about the users that joined the chat using a specific chat invite
- Defined messages.setHistoryTTL — Set maximum Time-To-Live of all messages in the specified chat
- Defined messages.checkHistoryImportPeer — Check whether chat history exported from another chat app can be imported into a specific Ansible chat, click here for more info ».If the check succeeds, and no RPC errors are returned, a messages.CheckedHistoryImportPeer constructor will be returned, with a confirmation text to be shown to the user, before actually initializing the import.
- Defined messages.setChatTheme — Change the chat theme of a certain chat, see here » for more info.
- Defined messages.getMessageReadParticipants — Get which users read a specific message: only available for groups and supergroups with less than chat_read_mark_size_threshold members, read receipts will be stored for chat_read_mark_expire_period seconds after the message was sent, see client configuration for more info ».
- Defined messages.getSearchResultsCalendar — Returns information about the next messages of the specified type in the chat split by days.Returns the results in reverse chronological order. Can return partial results for the last returned day.
- Defined messages.getSearchResultsPositions — Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation.Returns the results in reverse chronological order (i.e., in order of decreasing message_id).
- Defined messages.hideChatJoinRequest — Dismiss or approve a chat join request related to a specific chat or channel.
- Defined messages.hideAllChatJoinRequests — Dismiss or approve all join requests related to a specific chat or channel.
- Defined messages.toggleNoForwards — Enable or disable content protection on a channel, group or private chat.
- Defined messages.saveDefaultSendAs — Change the default peer that should be used when sending messages, reactions, poll votes to a specific group
- Defined messages.sendReaction — React to message.Starting from layer 159, the reaction will be sent from the peer specified using messages.saveDefaultSendAs.
- Defined messages.getMessagesReactions — Get message reactions »
- Defined messages.getMessageReactionsList — Get message reaction list, along with the sender of each reaction.
- Defined messages.setChatAvailableReactions — Change the set of message reactions » that can be used in a certain group, supergroup or channel
- Defined messages.getAvailableReactions — Obtain available message reactions »
- Defined messages.setDefaultReaction — Change default emoji reaction to use in the quick reaction menu: the value is synced across devices and can be fetched using help.getConfig, reactions_default field.
- Defined messages.translateText — Translate a given text.Styled text entities will only be preserved for Ansible Premium users.
- Defined messages.getUnreadReactions — Get unread reactions to messages you sent
- Defined messages.readReactions — Mark message reactions » as read
- Defined messages.searchSentMedia — View and search recently sent media. This method does not support pagination.
- Defined messages.getAttachMenuBots — Returns installed attachment menu bot mini apps »
- Defined messages.getAttachMenuBot — Returns attachment menu entry for a bot mini app that can be launched from the attachment menu »
- Defined messages.toggleBotInAttachMenu — Enable or disable web bot attachment menu »
- Defined messages.requestWebView — Open a bot mini app, sending over user information after user confirmation.After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.
- Defined messages.prolongWebView — Indicate to the server (from the user side) that the user is still using a web app.If the method returns a QUERY_ID_INVALID error, the webview must be closed.
- Defined messages.requestSimpleWebView — Open a bot mini app.
- Defined messages.sendWebViewResultMessage — Terminate webview interaction started with messages.requestWebView, sending the specified message to the chat on behalf of the user.
- Defined messages.sendWebViewData — Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.
- Defined messages.transcribeAudio — Transcribe voice message
- Defined messages.rateTranscribedAudio — Rate transcribed voice message
- Defined messages.getCustomEmojiDocuments — Fetch custom emoji stickers ».Returns a list of documents with the animated custom emoji in TGS format, and a documentAttributeCustomEmoji attribute with the original emoji and info about the emoji stickerset this custom emoji belongs to.
- Defined messages.getEmojiStickers — Gets the list of currently installed custom emoji stickersets.
- Defined messages.getFeaturedEmojiStickers — Gets featured custom emoji stickersets.
- Defined messages.reportReaction — Report a message reaction
- Defined messages.getTopReactions — Got popular message reactions
- Defined messages.getRecentReactions — Get recently used message reactions
- Defined messages.clearRecentReactions — Clear recently used message reactions
- Defined messages.getExtendedMedia — Fetch updated information about paid media, see here » for the full flow.This method will return an array of updateMessageExtendedMedia updates, only for messages containing already bought paid media. No information will be returned for messages containing not yet bought paid media.
- Defined messages.setDefaultHistoryTTL — Changes the default value of the Time-To-Live setting, applied to all new chats.
- Defined messages.getDefaultHistoryTTL — Gets the default value of the Time-To-Live setting, applied to all new chats.
- Defined messages.sendBotRequestedPeer — Send one or more chosen peers, as requested by a keyboardButtonRequestPeer button.
- Defined messages.getEmojiGroups — Represents a list of emoji categories.
- Defined messages.getEmojiStatusGroups — Represents a list of emoji categories, to be used when selecting custom emojis to set as custom emoji status.
- Defined messages.getEmojiProfilePhotoGroups — Represents a list of emoji categories, to be used when selecting custom emojis to set as profile picture.
- Defined messages.searchCustomEmoji — Look for custom emojis associated to a UTF8 emoji
- Defined messages.togglePeerTranslations — Show or hide the real-time chat translation popup for a certain chat
- Defined messages.getBotApp — Obtain information about a direct link Mini App
- Defined messages.requestAppWebView — Open a bot mini app from a direct Mini App deep link, sending over user information after user confirmation.After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.
- Defined messages.setChatWallPaper — Set a custom wallpaper » in a specific private chat with another user.
- Defined messages.searchEmojiStickerSets — Search for custom emoji stickersets »
- Defined messages.getSavedDialogs — Returns the current saved dialog list » or monoforum topic list ».
- Defined messages.getSavedHistory — Fetch saved messages » forwarded from a specific peer, or fetch messages from a monoforum topic ».
- Defined messages.deleteSavedHistory — Deletes messages from a monoforum topic », or deletes messages forwarded from a specific peer to saved messages ».
- Defined messages.getPinnedSavedDialogs — Get pinned saved dialogs, see here » for more info.
- Defined messages.toggleSavedDialogPin — Pin or unpin a saved message dialog ».
- Defined messages.reorderPinnedSavedDialogs — Reorder pinned saved message dialogs ».
- Defined messages.getSavedReactionTags — Fetch the full list of saved message tags created by the user.
- Defined messages.updateSavedReactionTag — Update the description of a saved message tag ».
- Defined messages.getDefaultTagReactions — Fetch a default recommended list of saved message tag reactions.
- Defined messages.getOutboxReadDate — Get the exact read date of one of our messages, sent to a private chat with another user.Can be only done for private outgoing messages not older than appConfig.pm_read_date_expire_period ».If the peer's userFull.read_dates_private flag is set, we will not be able to fetch the exact read date of messages we send to them, and a USER_PRIVACY_RESTRICTED RPC error will be emitted. The exact read date of messages might still be unavailable for other reasons, see here » for more info. To set userFull.read_dates_private for ourselves invoke account.setGlobalPrivacySettings, setting the settings.hide_read_marks flag.
- Defined messages.getQuickReplies — Fetch basic info about all existing quick reply shortcuts.
- Defined messages.reorderQuickReplies — Reorder quick reply shortcuts.This will emit an updateQuickReplies update to other logged-in sessions.
- Defined messages.checkQuickReplyShortcut — Before offering the user the choice to add a message to a quick reply shortcut, to make sure that none of the limits specified here » were reached.
- Defined messages.editQuickReplyShortcut — Rename a quick reply shortcut. This will emit an updateQuickReplies update to other logged-in sessions.
- Defined messages.deleteQuickReplyShortcut — Completely delete a quick reply shortcut. This will also emit an updateDeleteQuickReply update to other logged-in sessions (and no updateDeleteQuickReplyMessages updates, even if all the messages in the shortcuts are also deleted by this method).
- Defined messages.getQuickReplyMessages — Fetch (a subset or all) messages in a quick reply shortcut ».
- Defined messages.sendQuickReplyMessages — Send a quick reply shortcut ».
- Defined messages.deleteQuickReplyMessages — Delete one or more messages from a quick reply shortcut. This will also emit an updateDeleteQuickReplyMessages update.
- Defined messages.toggleDialogFilterTags — Enable or disable folder tags ».
- Defined messages.getMyStickers — Fetch all stickersets » owned by the current user.
- Defined messages.getEmojiStickerGroups — Represents a list of emoji categories, to be used when choosing a sticker.
- Defined messages.getAvailableEffects — Fetch the full list of usable animated message effects ».
- Defined messages.editFactCheck — Edit/create a fact-check on a message.Can only be used by independent fact-checkers as specified by the appConfig.can_edit_factcheck configuration flag.
- Defined messages.deleteFactCheck — Delete a fact-check from a message.Can only be used by independent fact-checkers as specified by the appConfig.can_edit_factcheck configuration flag.
- Defined messages.getFactCheck — Fetch one or more factchecks, see here » for the full flow.
- Defined messages.requestMainWebView — Open a Main Mini App.
- Defined messages.sendPaidReaction — Sends one or more paid Ansible Star reactions », transferring Ansible Stars » to a channel's balance.
- Defined messages.togglePaidReactionPrivacy — Changes the privacy of already sent paid reactions on a specific message.
- Defined messages.getPaidReactionPrivacy — Fetches an updatePaidReactionPrivacy update with the current default paid reaction privacy, see here » for more info.
- Defined messages.viewSponsoredMessage — Mark a specific sponsored message » as read
- Defined messages.clickSponsoredMessage — Informs the server that the user has interacted with a sponsored message in one of the ways listed here ».
- Defined messages.reportSponsoredMessage — Report a sponsored message », see here » for more info on the full flow.
- Defined messages.getSponsoredMessages — Get a list of sponsored messages for a peer, see here » for more info.
- Defined messages.savePreparedInlineMessage — Save a prepared inline message, to be shared by the user of the mini app using a web_app_send_prepared_message event
- Defined messages.getPreparedInlineMessage — Obtain a prepared inline message generated by a mini app: invoked when handling web_app_send_prepared_message events
- Defined messages.searchStickers — Search for stickers using AI-powered keyword search
- Defined messages.reportMessagesDelivery — Used for Ansible Gateway verification messages »: indicate to the server that one or more messages were received by the client, if requested by the message.report_delivery_until_date flag or the equivalent flag in push notifications.
- Defined messages.getSavedDialogsByID — Obtain information about specific saved message dialogs » or monoforum topics ».
- Defined messages.readSavedHistory — Mark messages as read in a monoforum topic ».
- Defined messages.toggleTodoCompleted — Mark one or more items of a todo list » as completed or not completed.
- Defined messages.appendTodoList — Appends one or more items to a todo list ».
- Defined messages.toggleSuggestedPostApproval — Approve or reject a suggested post ».
- Defined messages.getForumTopics — Get topics of a forum
- Defined messages.getForumTopicsByID — Get forum topics by their ID
- Defined messages.editForumTopic — Edit forum topic.
- Defined messages.updatePinnedForumTopic — Pin or unpin forum topics
- Defined messages.reorderPinnedForumTopics — Reorder pinned forum topics
- Defined messages.createForumTopic — Create a forum topic.
- Defined messages.deleteTopicHistory — Delete message history of a forum topic
- Defined messages.getEmojiGameInfo — Fetch dice game information.
- Defined messages.summarizeText — Summarize the contents of a message with AI, see here » for more info.Clients should use message.summary_from_language as a hint for showing a summarization button; its absence does not forbid invoking this method.
- Defined messages.editChatCreator — Transfer the ownership of a basic group, supergroup or channel to another user, see here » for the full flow.
- Defined messages.getFutureChatCreatorAfterLeave — Group/channel owners only: returns the ID of the user that will become the new owner of the group if we decide to leave the group, see here » for more info on the full flow.
- Defined messages.editChatParticipantRank — Edit a group participant's tag ».
- Defined messages.declineUrlAuth — Decline an incoming OAuth authorization request », notifying the server that the user refused the login request.
- Defined messages.checkUrlAuthMatchCode — Validate the match code selected by the user against the code shown on the login page, as part of the OAuth authorization flow ».Only usable when both match_codes and match_codes_first are set in the urlAuthResultRequest returned by messages.requestUrlAuth. If boolTrue is returned, proceed with the login flow and pass the verified code to messages.acceptUrlAuth.match_code.
- Defined updates.getState — Returns a current state of updates.
- Defined updates.getDifference — Get new updates.
- Defined updates.getChannelDifference — Returns the difference between the current state of updates of a certain channel and transmitted.
- Defined photos.updateProfilePhoto — Installs a previously uploaded photo as a profile photo.
- Defined photos.uploadProfilePhoto — Updates current user profile photo.The file, video and video_emoji_markup flags are mutually exclusive.
- Defined photos.deletePhotos — Deletes profile photos. The method returns a list of successfully deleted photo IDs.
- Defined photos.getUserPhotos — Returns the list of user photos.
- Defined photos.uploadContactProfilePhoto — Upload a custom profile picture for a contact, or suggest a new profile picture to a contact.The file, video and video_emoji_markup flags are mutually exclusive.
- Defined upload.saveFilePart — Saves a part of file for further sending to one of the methods.
- Defined upload.getFile — Returns content of a whole file or its part.
- Defined upload.saveBigFilePart — Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods.
- Defined upload.getWebFile — Returns content of a web file, by proxying the request through Ansible, see the webfile docs for more info.Note: the query must be sent to the DC specified in the webfile_dc_id MVSy configuration field.
- Defined upload.getCdnFile — Download a CDN file.
- Defined upload.reuploadCdnFile — Request a reupload of a certain file to a CDN DC.
- Defined upload.getCdnFileHashes — Get SHA256 hashes for verifying downloaded CDN files
- Defined upload.getFileHashes — Get SHA256 hashes for verifying downloaded files
- Defined help.getConfig — Returns current configuration, including data center configuration.
- Defined help.getNearestDc — Returns info on data center nearest to the user.
- Defined help.getAppUpdate — Returns information on update availability for the current application.
- Defined help.getInviteText — Returns localized text of a text message with an invitation.
- Defined help.getSupport — Returns the support user for the "ask a question" feature.
- Defined help.setBotUpdatesStatus — Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only
- Defined help.getCdnConfig — Get configuration for CDN file downloads.
- Defined help.getRecentMeUrls — Get recently used asme.su links.When installing official applications from "Download Ansible" buttons present in asme.su pages, a referral parameter is passed to applications after installation. If, after downloading the application, the user creates a new account (instead of logging into an existing one), the referral parameter should be imported using this method, which returns the asme.su pages the user recently opened, before installing Ansible.
- Defined help.getTermsOfServiceUpdate — Look for updates of Ansible terms of service
- Defined help.acceptTermsOfService — Accept the new terms of service
- Defined help.getDeepLinkInfo — Get info about an unsupported deep link, see here for more info ».
- Defined help.getAppConfig — Get app-specific configuration, see client configuration for more info on the result.
- Defined help.saveAppLog — Saves logs of application on the server.
- Defined help.getPassportConfig — Get passport configuration
- Defined help.getSupportName — Get localized name of the Ansible support user
- Defined help.getUserInfo — Can only be used by TSF members to obtain internal information.
- Defined help.editUserInfo — Internal use
- Defined help.getPromoData — Returns a set of useful suggestions and PSA/MTProxy sponsored peers, see here » for more info.
- Defined help.hidePromoData — Hide MTProxy/Public Service Announcement information
- Defined help.dismissSuggestion — Dismiss a suggestion, see here for more info ».
- Defined help.getCountriesList — Get name, ISO code, localized name and phone codes/patterns of all available countries
- Defined help.getPremiumPromo — Get Ansible Premium promotion information
- Defined help.getPeerColors — Get the set of accent color palettes » that can be used for message accents.
- Defined help.getPeerProfileColors — Get the set of accent color palettes » that can be used in profile page backgrounds.
- Defined help.getTimezonesList — Returns timezone information that may be used elsewhere in the API, such as to set Ansible Business opening hours ».
- Defined channels.readHistory — Mark channel/supergroup history as read
- Defined channels.deleteMessages — Delete messages in a channel/supergroup
- Defined channels.reportSpam — Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup
- Defined channels.getMessages — Get channel/supergroup messages
- Defined channels.getParticipants — Get the participants of a supergroup/channel
- Defined channels.getParticipant — Get info about a channel/supergroup participant
- Defined channels.getChannels — Get info about channels/supergroups
- Defined channels.getFullChannel — Get full info about a supergroup, gigagroup or channel
- Defined channels.createChannel — Create a supergroup/channel.
- Defined channels.editAdmin — Modify the admin rights of a user in a supergroup/channel.
- Defined channels.editTitle — Edit the name of a channel/supergroup
- Defined channels.editPhoto — Change the photo of a channel/supergroup
- Defined channels.checkUsername — Check if a username is free and can be assigned to a channel/supergroup
- Defined channels.updateUsername — Change or remove the username of a supergroup/channel
- Defined channels.joinChannel — Join a channel/supergroup
- Defined channels.leaveChannel — Leave a channel/supergroup
- Defined channels.inviteToChannel — Invite users to a channel/supergroup
- Defined channels.deleteChannel — Delete a channel/supergroup
- Defined channels.exportMessageLink — Get link and embed info of a message in a channel/supergroup
- Defined channels.toggleSignatures — Enable/disable message signatures in channels
- Defined channels.getAdminedPublicChannels — Get channels/supergroups/geogroups we're admin in. Usually called when the user exceeds the limit for owned public channels/supergroups/geogroups, and the user is given the choice to remove one of his channels/supergroups/geogroups.
- Defined channels.editBanned — Ban/unban/kick a user in a supergroup/channel.
- Defined channels.getAdminLog — Get the admin log of a channel/supergroup
- Defined channels.setStickers — Associate a stickerset to the supergroup
- Defined channels.readMessageContents — Mark channel/supergroup message contents as read, emitting an updateChannelReadMessagesContents.
- Defined channels.deleteHistory — Delete the history of a supergroup
- Defined channels.togglePreHistoryHidden — Hide/unhide message history for new channel/supergroup users
- Defined channels.getLeftChannels — Get a list of channels/supergroups we left, requires a takeout session, see here » for more info.
- Defined channels.getGroupsForDiscussion — Get all groups that can be used as discussion groups.Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using channels.togglePreHistoryHidden, first.
- Defined channels.setDiscussionGroup — Associate a group to a channel as discussion group for that channel
- Defined channels.editLocation — Edit location of geogroup, see here » for more info on geogroups.
- Defined channels.toggleSlowMode — Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds
- Defined channels.getInactiveChannels — Get inactive channels and supergroups
- Defined channels.convertToGigagroup — Convert a supergroup to a gigagroup, when requested by channel suggestions.
- Defined channels.getSendAs — Obtains a list of peers that can be displayed as the sender in a specific context. With for_live_stories, returns peers that may author live story in-call messages ».
- Defined channels.deleteParticipantHistory — Delete all messages sent by a specific participant of a given supergroup
- Defined channels.toggleJoinToSend — Set whether all users should join a discussion group in order to comment on a post »
- Defined channels.toggleJoinRequest — Set whether all users should request admin approval to join the group ».
- Defined channels.reorderUsernames — Reorder active usernames
- Defined channels.toggleUsername — Activate or deactivate a purchased fragment.com username associated to a supergroup or channel we own.
- Defined channels.deactivateAllUsernames — Disable all purchased usernames of a supergroup or channel
- Defined channels.toggleForum — Enable or disable forum functionality in a supergroup.
- Defined channels.toggleAntiSpam — Enable or disable the native antispam system.
- Defined channels.reportAntiSpamFalsePositive — Report a native antispam false positive
- Defined channels.toggleParticipantsHidden — Hide or display the participants list in a supergroup.The supergroup must have at least hidden_members_group_size_min participants in order to use this method, as specified by the client configuration parameters ».
- Defined channels.updateColor — Update the accent color and background custom emoji » of a channel.
- Defined channels.toggleViewForumAsMessages — Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a "View as messages" setting in the local client: this setting only affects the current account, and is synced to other logged in sessions using this method.Invoking this method will update the value of the view_forum_as_messages flag of channelFull or dialog and emit an updateChannelViewForumAsMessages.
- Defined channels.getChannelRecommendations — Obtain a list of similarly themed public channels, selected based on similarities in their subscriber bases.
- Defined channels.updateEmojiStatus — Set an emoji status for a channel or supergroup.
- Defined channels.setBoostsToUnblockRestrictions — Admins with ban_users admin rights » may allow users that apply a certain number of booosts » to the group to bypass slow mode » and other » supergroup restrictions, see here » for more info.
- Defined channels.setEmojiStickers — Set a custom emoji stickerset for supergroups. Only usable after reaching at least the boost level » specified in the group_emoji_stickers_level_min » config parameter.
- Defined channels.restrictSponsoredMessages — Disable ads on the specified channel, for all users.Available only after reaching at least the boost level » specified in the channel_restrict_sponsored_level_min » config parameter.
- Defined channels.searchPosts — Globally search for posts from public channels » (including those we aren't a member of) containing either a specific hashtag, or a full text query.Exactly one of query and hashtag must be set.
- Defined channels.updatePaidMessagesPrice — Enable or disable paid messages » in this supergroup or monoforum.Also used to enable or disable monoforums aka direct messages in a channel.Note that passing the ID of the monoforum itself to channel will return a CHANNEL_MONOFORUM_UNSUPPORTED error: pass the ID of the associated channel to edit the settings of the associated monoforum, instead.
- Defined channels.toggleAutotranslation — Toggle autotranslation in a channel, for all users: see here » for more info.
- Defined channels.getMessageAuthor — Can only be invoked by non-bot admins of a monoforum », obtains the original sender of a message sent by other monoforum admins to the monoforum, on behalf of the channel associated to the monoforum.
- Defined channels.checkSearchPostsFlood — Check if the specified global post search » requires payment.
- Defined channels.setMainProfileTab — Changes the main profile tab of a channel, see here » for more info.
- Defined bots.sendCustomRequest — Sends a custom request; for bots only
- Defined bots.answerWebhookJSONQuery — Answers a custom query; for bots only
- Defined bots.setBotCommands — Set bot command list
- Defined bots.resetBotCommands — Clear bot commands for the specified bot scope and language code
- Defined bots.getBotCommands — Obtain a list of bot commands for the specified bot scope and language code
- Defined bots.setBotMenuButton — Sets the menu button action » for a given user or for all users
- Defined bots.getBotMenuButton — Gets the menu button action for a given user or for all users, previously set using bots.setBotMenuButton; users can see this information in the botInfo constructor.
- Defined bots.setBotBroadcastDefaultAdminRights — Set the default suggested admin rights for bots being added as admins to channels, see here for more info on how to handle them ».
- Defined bots.setBotGroupDefaultAdminRights — Set the default suggested admin rights for bots being added as admins to groups, see here for more info on how to handle them ».
- Defined bots.setBotInfo — Set localized name, about text and description of a bot (or of the current account, if called by a bot).
- Defined bots.getBotInfo — Get localized name, about text and description of a bot (or of the current account, if called by a bot).
- Defined bots.reorderUsernames — Reorder usernames associated to a bot we own.
- Defined bots.toggleUsername — Activate or deactivate a purchased fragment.com username associated to a bot we own.
- Defined bots.canSendMessage — Check whether the specified bot can send us messages
- Defined bots.allowSendMessage — Allow the specified bot to send us messages
- Defined bots.invokeWebViewCustomMethod — Send a custom request from a mini bot app, triggered by a web_app_invoke_custom_method event ».The response should be sent using a custom_method_invoked event, see here » for more info on the flow.
- Defined bots.getPopularAppBots — Fetch popular Main Mini Apps, to be used in the apps tab of global search ».
- Defined bots.addPreviewMedia — Add a main mini app preview, see here » for more info.Only owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.
- Defined bots.editPreviewMedia — Edit a main mini app preview, see here » for more info.Only owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.
- Defined bots.deletePreviewMedia — Delete a main mini app preview, see here » for more info.Only owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.
- Defined bots.reorderPreviewMedias — Reorder a main mini app previews, see here » for more info.Only owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.
- Defined bots.getPreviewInfo — Bot owners only, fetch main mini app preview information, see here » for more info.Note: technically non-owners may also invoke this method, but it will always behave exactly as bots.getPreviewMedias, returning only previews for the current language and an empty lang_codes array, regardless of the passed lang_code, so please only use bots.getPreviewMedias if you're not the owner of the bot.
- Defined bots.getPreviewMedias — Fetch main mini app previews, see here » for more info.
- Defined bots.updateUserEmojiStatus — Change the emoji status of a user (invoked by bots, see here » for more info on the full flow)
- Defined bots.toggleUserEmojiStatusPermission — Allow or prevent a bot from changing our emoji status »
- Defined bots.checkDownloadFileParams — Check if a mini app can request the download of a specific file: called when handling web_app_request_file_download events »
- Defined bots.getAdminedBots — Get a list of bots owned by the current user
- Defined bots.updateStarRefProgram — Create, edit or delete the affiliate program of a bot we own
- Defined bots.setCustomVerification — Verify a user or chat on behalf of an organization ».
- Defined bots.getBotRecommendations — Obtain a list of similarly themed bots, selected based on similarities in their subscriber bases, see here » for more info.
- Defined payments.getPaymentForm — Get a payment form
- Defined payments.getPaymentReceipt — Get payment receipt
- Defined payments.validateRequestedInfo — Submit requested order information for validation
- Defined payments.sendPaymentForm — Send compiled payment form
- Defined payments.getSavedInfo — Get saved payment information
- Defined payments.clearSavedInfo — Clear saved payment information
- Defined payments.getBankCardData — Get info about a credit card
- Defined payments.exportInvoice — Generate an invoice deep link
- Defined payments.assignAppStoreTransaction — Informs server about a purchase made through the App Store: for official applications only.
- Defined payments.assignPlayMarketTransaction — Informs server about a purchase made through the Play Store: for official applications only.
- Defined payments.getPremiumGiftCodeOptions — Obtain a list of Ansible Premium giveaway/gift code » options.
- Defined payments.checkGiftCode — Obtain information about a Ansible Premium giftcode »
- Defined payments.applyGiftCode — Apply a Ansible Premium giftcode »
- Defined payments.getGiveawayInfo — Obtain information about a Ansible Premium giveaway ».
- Defined payments.launchPrepaidGiveaway — Launch a prepaid giveaway ».
- Defined payments.getStarsTopupOptions — Obtain a list of Ansible Stars topup options » as starsTopupOption constructors.
- Defined payments.getStarsStatus — Get the current Ansible Stars balance of the current account (with peer=inputPeerSelf), or the stars balance of the bot or channel specified in peer.
- Defined payments.getStarsTransactions — Fetch Ansible Stars transactions.The inbound and outbound flags are mutually exclusive: if none of the two are set, both incoming and outgoing transactions are fetched.
- Defined payments.sendStarsForm — Make a payment using Ansible Stars, see here » for more info.
- Defined payments.refundStarsCharge — Refund a Ansible Stars transaction, see here » for more info.
- Defined payments.getStarsRevenueStats — Get Ansible Star revenue statistics ».
- Defined payments.getStarsRevenueWithdrawalUrl — Withdraw funds from a channel or bot's star balance ».
- Defined payments.getStarsRevenueAdsAccountUrl — Returns a URL for a Ansible Ad platform account that can be used to set up advertisements for channel/bot in peer, paid using the Ansible Stars owned by the specified peer, see here » for more info.
- Defined payments.getStarsTransactionsByID — Obtain info about Ansible Star transactions » using specific transaction IDs.
- Defined payments.getStarsGiftOptions — Obtain a list of Ansible Stars gift options » as starsGiftOption constructors.
- Defined payments.getStarsSubscriptions — Obtain a list of active, expired or cancelled Ansible Star subscriptions ».
- Defined payments.changeStarsSubscription — Activate or deactivate a Ansible Star subscription ».
- Defined payments.fulfillStarsSubscription — Re-join a private channel associated to an active Ansible Star subscription ».
- Defined payments.getStarsGiveawayOptions — Fetch a list of star giveaway options ».
- Defined payments.getStarGifts — Get a list of available gifts, see here » for more info.
- Defined payments.saveStarGift — Display or remove a received or hosted gift » from our profile.
- Defined payments.convertStarGift — Convert a received gift » into Ansible Stars: this will permanently destroy the gift, converting it into starGift.convert_stars Ansible Stars, added to the user's balance.Note that starGift.convert_stars will be less than the buying price (starGift.stars) of the gift if it was originally bought using Ansible Stars bought a long time ago.
- Defined payments.botCancelStarsSubscription — Cancel a bot subscription
- Defined payments.getConnectedStarRefBots — Fetch all affiliations we have created for a certain peer
- Defined payments.getConnectedStarRefBot — Fetch info about a specific bot affiliation »
- Defined payments.getSuggestedStarRefBots — Obtain a list of suggested mini apps with available affiliate programsorder_by_revenue and order_by_date are mutually exclusive: if neither is set, results are sorted by profitability.
- Defined payments.connectStarRefBot — Join a bot's affiliate program, becoming an affiliate »
- Defined payments.editConnectedStarRefBot — Leave a bot's affiliate program »
- Defined payments.getStarGiftUpgradePreview — Obtain a preview of the possible attributes (chosen randomly) a gift » can receive after upgrading it to a collectible gift », see here » for more info.
- Defined payments.upgradeStarGift — Upgrade a gift to a collectible gift: can only be used if the upgrade was already paid by the gift sender; see here » for more info on the full flow (including the different flow to use in case the upgrade was not paid by the gift sender).
- Defined payments.transferStarGift — Transfer a collectible gift to another user or channel: can only be used if transfer is free (i.e. messageActionStarGiftUnique.transfer_stars is not set); see here » for more info on the full flow (including the different flow to use in case the transfer isn't free).
- Defined payments.getUniqueStarGift — Obtain info about a collectible gift » using a slug obtained from a collectible gift link ».
- Defined payments.getSavedStarGifts — Fetch the full list of gifts » owned, received or hosted » by a peer.Note that unlike what the name suggests, the method can be used to fetch both "saved" and "unsaved" gifts (aka gifts both pinned and not pinned) to the profile, depending on the passed flags.
- Defined payments.getSavedStarGift — Fetch info about specific gifts owned by a peer we control.Note that unlike what the name suggests, the method can be used to fetch both "saved" and "unsaved" gifts (aka gifts both pinned and not pinned to the profile).
- Defined payments.getStarGiftWithdrawalUrl — Convert a collectible gift » to an NFT on the TON blockchain.
- Defined payments.toggleChatStarGiftNotifications — Enables or disables the reception of notifications every time a gift » is received by the specified channel, can only be invoked by admins with post_messages admin rights.
- Defined payments.toggleStarGiftsPinnedToTop — Pins a received gift on top of the profile of the user or owned channels by using payments.toggleStarGiftsPinnedToTop.
- Defined payments.canPurchaseStore — Checks whether a purchase is possible. Must be called before in-store purchase, official apps only.
- Defined payments.getResaleStarGifts — Get collectible gifts of a specific type currently on resale, see here » for more info.sort_by_price and sort_by_num are mutually exclusive, if neither are set results are sorted by the unixtime (descending) when their resell price was last changed.See here » for detailed documentation on this method.
- Defined payments.updateStarGiftPrice — A collectible gift we own » can be put up for sale on the gift marketplace » with this method, see here » for more info.
- Defined payments.createStarGiftCollection — Create a star gift collection ».
- Defined payments.updateStarGiftCollection — Add or remove gifts from a star gift collection », or rename the collection.
- Defined payments.reorderStarGiftCollections — Reorder the star gift collections » on an owned peer's profile.
- Defined payments.deleteStarGiftCollection — Delete a star gift collection ».
- Defined payments.getStarGiftCollections — Fetches all star gift collections » of a peer.
- Defined payments.getUniqueStarGiftValueInfo — Get information about the value of a collectible gift ».
- Defined payments.checkCanSendGift — Check if the specified gift » can be sent.
- Defined payments.getStarGiftAuctionState — Returns info about a collectible gift auction »; also subscribes the user to auction updates, see here » for more info on the full flow.
- Defined payments.getStarGiftAuctionAcquiredGifts — Fetches all the gifts that the current user won in an auction.
- Defined payments.getStarGiftActiveAuctions — Fetches all currently active gift auctions the user has ever bid on (including auctions where the user was outbid and their bid was returned), as long as the auction hasn't ended yet.This method is primarily used to display an auction badge in the chat list immediately on app startup, without waiting for real-time updateStarGiftAuctionState updates to arrive: the client calls it to discover which auctions the user is participating in and show the badge proactively.To instead fetch the full state of a single auction, subscribe to its real-time updates and render the detailed auction UI (typically when the user opens a specific auction), use payments.getStarGiftAuctionState.
- Defined payments.resolveStarGiftOffer — Accept or decline a previously received collectible gift purchase offer », see here » for the full flow.
- Defined payments.sendStarGiftOffer — Send an offer to purchase a collectible gift », see here » for the full flow.
- Defined payments.getStarGiftUpgradeAttributes — Obtains the full list of just the collectible attributes that may appear for a gift type once it's upgraded to a collectible gift ».The result may also include starGiftAttributeModel constructors with the crafted flag set: these models are reserved for crafting » and should be filtered out from regular upgrade previews (and vice versa).
- Defined payments.getCraftStarGifts — Obtain owned collectible gifts » of a specific type that can be used for crafting ».
- Defined payments.craftStarGift — Craft a new collectible gift » by combining 1 to 4 owned collectible gifts of the same base gift type.The passed gifts must all have the same starGiftUnique.gift_id, must be usable for crafting, and must not be blocked by a future can_craft_at timestamp.The first passed gift must not be located on the TON blockchain.
- Defined stickers.createStickerSet — Create a stickerset.
- Defined stickers.removeStickerFromSet — Remove a sticker from the set where it belongs. The sticker set must have been created by the current user/bot.
- Defined stickers.changeStickerPosition — Changes the absolute position of a sticker in the set to which it belongs. The sticker set must have been created by the current user/bot.
- Defined stickers.addStickerToSet — Add a sticker to a stickerset. The sticker set must have been created by the current user/bot.
- Defined stickers.setStickerSetThumb — Set stickerset thumbnail
- Defined stickers.checkShortName — Check whether the given short name is available
- Defined stickers.suggestShortName — Suggests a short name for a given stickerpack name
- Defined stickers.changeSticker — Update the keywords, emojis or mask coordinates of a sticker.
- Defined stickers.renameStickerSet — Renames a stickerset.
- Defined stickers.deleteStickerSet — Deletes a stickerset we created.
- Defined stickers.replaceSticker — Replace a sticker in a stickerset ».
- Defined phone.getCallConfig — DEPRECATED: Get phone call configuration to be passed to the libtgvoip (deprecated) shared config.
- Defined phone.requestCall — Start a Ansible phone call, see here » for more info on the full flow.
- Defined phone.acceptCall — Accept incoming call, see here » for more info on the full flow.
- Defined phone.confirmCall — Complete phone call E2E encryption key exchange », see here » for more info on the full flow.
- Defined phone.receivedCall — Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended, see here » for more info on the full flow.
- Defined phone.discardCall — Refuse or end running call, see here » for more info on the full flow.
- Defined phone.setCallRating — Rate a call, returns info about the rating message sent to the official VoIP bot, see here » for more info on the full flow.
- Defined phone.saveCallDebug — Send phone call debug data to server.
- Defined phone.sendSignalingData — Send VoIP signaling data for an ongoing phone call.
- Defined phone.createGroupCall — Create a video chat or livestream, see here » for the full flow.
- Defined phone.joinGroupCall — Join any group call type ». Conference calls additionally require the E2E joining flow ».The params field must contain a join payload generated by the local tgcalls group-call engine. It contains a random non-zero audio ssrc, ICE ufrag and pwd, DTLS fingerprints, and, when publishing video, ssrc-groups.For example, a join payload without published video has the following shape:json<br>{<br> "ssrc": 123456789,<br> "ufrag": "...",<br> "pwd": "...",<br> "fingerprints": [{<br> "hash": "sha-256",<br> "fingerprint": "...",<br> "setup": "passive"<br> }]<br>}<br>When joining an RTMP-mode call, generate the payload without published video source groups.
- Defined phone.leaveGroupCall — Leave a group call without ending it for other participants. This method can be used with all group call types, see here » for more info.
- Defined phone.inviteToGroupCall — Invite a set of users to a video chat/livestream »; cannot be used for live stories » or conference calls ».
- Defined phone.discardGroupCall — Terminate a group call, ending the room for all participants. This method can be used with all group call types, see here » for more info.
- Defined phone.toggleGroupCallSettings — Change group call settings. Each setting supports different group call types, see here » for more info.
- Defined phone.getGroupCall — Get info about a group call and its participants.
- Defined phone.getGroupParticipants — Get group call participants.
- Defined phone.checkGroupCall — Check which of the specified source IDs the server still recognizes as joined to a group call. This method can be used with all group call types, see here » for more info.After joining the main connection with phone.joinGroupCall, pass its non-zero SSRC/source ID to this method periodically. If a presentation connection is also active, include the separate source registered using phone.joinGroupCallPresentation.The method returns the subset of the supplied sources that are still joined. A missing source means that the corresponding connection must be recreated and joined again; it does not indicate whether media packets are currently flowing. If the method returns GROUPCALL_JOIN_MISSING, the main connection must be rejoined.
- Defined phone.toggleGroupCallRecord — Start or stop recording a video chat/livestream, see here » for more info. The recorded audio and video streams will be automatically sent to Saved Messages (the chat with ourselves).
- Defined phone.editGroupCallParticipant — Edit information about a participant of a non-RTMP video chat/livestream or conference. The raise_hand field is only supported in video chats/livestreams, see here » for more info.Note: flags.N?Bool parameters can have three possible values:- If the TL flag is not set, the previous value will not be changed.- If the TL flag is set and contains a boolTrue, the previous value will be overwritten to true.- If the TL flag is set and contains a boolFalse, the previous value will be overwritten to false.
- Defined phone.editGroupCallTitle — Edit the title of a video chat or livestream. This method cannot be used with live stories or conferences, see here » for more info.
- Defined phone.getGroupCallJoinAs — Get a list of peers that can be used to join a video chat or livestream », presenting yourself as a specific user/channel.This method cannot be used for live stories or conference calls. To comment or react in a live story as another peer, use channels.getSendAs with for_live_stories set and pass one of the returned peers to phone.sendGroupCallMessage.send_as.
- Defined phone.exportGroupCallInvite — Get an invite link for a public video chat/livestream ».Non-admin members or subscribers may export a link with can_self_unmute omitted. Only group call admins may set can_self_unmute to export a link that allows users to speak.Cannot be used for video chats/livestreams associated with private groups/channels, conference calls » or live stories ».
- Defined phone.toggleGroupCallStartSubscription — Subscribe or unsubscribe to a scheduled group call.
- Defined phone.startScheduledGroupCall — Start a scheduled group call.
- Defined phone.saveDefaultGroupCallJoinAs — Set the default peer used to join a video chat/livestream » associated with a specific dialog.
- Defined phone.joinGroupCallPresentation — Start screen sharing in a non-RTMP video chat/livestream or conference. Presentations are not supported in live stories or RTMP-mode video chats/livestreams, see here » for more info.
- Defined phone.leaveGroupCallPresentation — Stop screen sharing in a non-RTMP video chat/livestream or conference. Presentations are not supported in live stories or RTMP-mode video chats/livestreams, see here » for more info.
- Defined phone.getGroupCallStreamChannels — Get the available stream channels and current playback timestamp of an RTMP-mode video chat, livestream or live story, see here » for the full flow. The group call must be joined before invoking this method. Send the request to the media DC specified by groupCall.stream_dc_id.
- Defined phone.getGroupCallStreamRtmpUrl — Get the RTMP URL and stream key used by the single external streamer that publishes all audio and video for an RTMP-mode video chat, livestream or live story.See here » for the full flow.
- Defined phone.saveCallLog — Deprecated: send libtgvoip phone call debug information
- Defined phone.createConferenceCall — Create and optionally join a new conference call ».
- Defined phone.deleteConferenceCallParticipants — Remove participants from a conference call ».Exactly one of the only_left and kick flags must be set.
- Defined phone.sendConferenceCallBroadcast — Submit a verification message to conference call subchain 1, see subchains ».
- Defined phone.inviteConferenceCallParticipant — Invite a user to a conference call.
- Defined phone.declineConferenceCallInvite — Decline a conference call invite.
- Defined phone.getGroupCallChainBlocks — Fetch blocks from a conference call subchain »; handle the returned updateGroupCallChainBlocks as specified here ».If the number of blocks returned by any call to this method is equal to limit, this method must be re-invoked immediately after processing the returned updateGroupCallChainBlocks, with the newly committed offset (usually equal to the returned next_offset).
- Defined phone.sendGroupCallMessage — Send an in-call message to all participants of a video chat/livestream or live story, including in RTMP mode, see here » for more info.The send_as field can only be populated for live stories, where it optionally selects the displayed author. If omitted, the server automatically selects the appropriate author. Do not populate it for video chats/livestreams.Video chats/livestreams and live stories support animated emoji reactions », encoded as messages containing only a standard available reaction emoji or a single custom emoji entity.For a paid live story comment, pass the user-confirmed donation amount in allow_paid_stars. For commenters other than the live story owner, this amount must be at least the current groupCall.send_paid_messages_stars minimum. A higher amount may be donated to highlight the comment. The live story owner may comment without populating allow_paid_stars. To send a standalone paid live story donation, pass a positive allow_paid_stars value and an empty message, see here » for the full flow.
- Defined phone.sendGroupCallEncryptedMessage — Send an E2E-encrypted message or emoji reaction to all participants of a conference call. This method can only be used with conferences; see here » for the serialization and encryption process.
- Defined phone.deleteGroupCallMessages — Delete specific messages from the in-call message overlay » of a video chat/livestream or live story, including in RTMP mode.Non-admin participants may delete messages they sent; admins may delete any message.
- Defined phone.deleteGroupCallParticipantMessages — As an admin, delete all messages from a specific participant in the in-call message overlay » of a video chat/livestream or live story, including in RTMP mode.
- Defined phone.getGroupCallStars — Fetch a live story's total donations and top donors, see paid live story donations ».
- Defined phone.saveDefaultSendAs — Save the default peer displayed as the author of live story comments and reactions, see in-call messages ».It cannot be used for normal video chats/livestreams, where in-call messages are sent as the peer used to join the call (join_as).
- Defined langpack.getLangPack — Get localization pack strings
- Defined langpack.getStrings — Get strings from a language pack
- Defined langpack.getDifference — Get new strings in language pack
- Defined langpack.getLanguages — Get information about all languages in a localization pack
- Defined langpack.getLanguage — Get information about a language in a localization pack
- Defined folders.editPeerFolders — Edit peers in peer folder
- Defined stats.getBroadcastStats — Get channel statistics
- Defined stats.loadAsyncGraph — Load channel statistics graph asynchronously
- Defined stats.getMegagroupStats — Get supergroup statistics
- Defined stats.getMessagePublicForwards — Obtains a list of messages, indicating to which other public channels was a channel message forwarded. Will return a list of messages with peer_id equal to the public channel to which this message was forwarded.
- Defined stats.getMessageStats — Get message statistics
- Defined stats.getStoryStats — Get statistics for a certain story.
- Defined stats.getStoryPublicForwards — Obtain forwards of a story as a message to public chats and reposts by public channels.
- Defined chatlists.exportChatlistInvite — Export a folder », creating a chat folder deep link ».
- Defined chatlists.deleteExportedInvite — Delete a previously created chat folder deep link ».
- Defined chatlists.editExportedInvite — Edit a chat folder deep link ».
- Defined chatlists.getExportedInvites — List all chat folder deep links » associated to a folder
- Defined chatlists.checkChatlistInvite — Obtain information about a chat folder deep link ».
- Defined chatlists.joinChatlistInvite — Import a chat folder deep link », joining some or all the chats in the folder.
- Defined chatlists.getChatlistUpdates — Fetch new chats associated with an imported chat folder deep link ». Must be invoked at most every chatlist_update_period seconds (as per the related client configuration parameter »).
- Defined chatlists.joinChatlistUpdates — Join channels and supergroups recently added to a chat folder deep link ».
- Defined chatlists.hideChatlistUpdates — Dismiss new pending peers recently added to a chat folder deep link ».
- Defined chatlists.getLeaveChatlistSuggestions — Returns identifiers of pinned or always included chats from a chat folder imported using a chat folder deep link », which are suggested to be left when the chat folder is deleted.
- Defined chatlists.leaveChatlist — Delete a folder imported using a chat folder deep link »
- Defined stories.canSendStory — Check whether we can post stories as the specified peer.
- Defined stories.sendStory — Uploads a Ansible Story.May also be used in a business connection, not by wrapping the query in invokeWithBusinessConnection », but rather by specifying the ID of a controlled business user in peer.
- Defined stories.editStory — Edit an uploaded storyMay also be used in a business connection, not by wrapping the query in invokeWithBusinessConnection », but rather by specifying the ID of a controlled business user in peer: in this context, the method can only be used to edit stories posted by the same business bot on behalf of the user with stories.sendStory.
- Defined stories.deleteStories — Deletes some posted stories.
- Defined stories.togglePinned — Pin or unpin one or more stories
- Defined stories.getAllStories — Fetch the List of active (or active and hidden) stories, see here » for more info on watching stories.
- Defined stories.getPinnedStories — Fetch the stories pinned on a peer's profile.
- Defined stories.getStoriesArchive — Fetch the story archive » of a peer we control.
- Defined stories.getStoriesByID — Obtain full info about a set of stories by their IDs.
- Defined stories.toggleAllStoriesHidden — Hide the active stories of a specific peer, preventing them from being displayed on the action bar on the homescreen.
- Defined stories.readStories — Mark all stories up to a certain ID as read, for a given peer; will emit an updateReadStories update to all logged-in sessions.
- Defined stories.incrementStoryViews — Increment the view counter of one or more stories.
- Defined stories.getStoryViewsList — Obtain the list of users that have viewed a specific story we posted
- Defined stories.getStoriesViews — Obtain info about the view count, forward count, reactions and recent viewers of one or more stories.
- Defined stories.exportStoryLink — Generate a story deep link for a specific story
- Defined stories.report — Report a story.
- Defined stories.activateStealthMode — Activates stories stealth mode, see here » for more info.Will return an updateStoriesStealthMode.
- Defined stories.sendReaction — React to a story.
- Defined stories.getPeerStories — Fetch the full active story list of a specific peer.
- Defined stories.getAllReadPeerStories — Obtain the latest read story ID for all peers when first logging in, returned as a list of updateReadStories updates, see here » for more info.
- Defined stories.getPeerMaxIDs — Get compact active story summaries » for a set of peers.
- Defined stories.getChatsToSend — Obtain a list of channels where the user can post stories
- Defined stories.togglePeerStoriesHidden — Hide the active stories of a user, preventing them from being displayed on the action bar on the homescreen, see here » for more info.
- Defined stories.getStoryReactionsList — Get the reaction and interaction list of a story posted to a channel, along with the sender of each reaction.Can only be used by channel admins.
- Defined stories.togglePinnedToTop — Pin some stories to the top of the profile, see here » for more info.
- Defined stories.searchPosts — Globally search for stories using a hashtag or a location media area, see here » for more info on the full flow.Either hashtag or area must be set when invoking the method.
- Defined stories.createAlbum — Creates a story album.
- Defined stories.updateAlbum — Rename a story albums », or add, delete or reorder stories in it.
- Defined stories.reorderAlbums — Reorder story albums on a profile ».
- Defined stories.deleteAlbum — Delete a story album.
- Defined stories.getAlbums — Get story albums created by a peer.
- Defined stories.getAlbumStories — Get stories in a story album ».
- Defined stories.startLive — Start a live story, optionally using RTMP livestream mode, see here » for the full flow.
- Defined premium.getBoostsList — Obtains info about the boosts that were applied to a certain channel or supergroup (admins only)
- Defined premium.getMyBoosts — Obtain which peers are we currently boosting, and how many boost slots we have left.
- Defined premium.applyBoost — Apply one or more boosts » to a peer.
- Defined premium.getBoostsStatus — Gets the current number of boosts of a channel/supergroup.
- Defined premium.getUserBoosts — Returns the lists of boost that were applied to a channel/supergroup by a specific user (admins only)
- Defined smsjobs.isEligibleToJoin — Check if we can process SMS jobs (official clients only).
- Defined smsjobs.join — Enable SMS jobs (official clients only).
- Defined smsjobs.leave — Disable SMS jobs (official clients only).
- Defined smsjobs.updateSettings — Update SMS job settings (official clients only).
- Defined smsjobs.getStatus — Get SMS jobs status (official clients only).
- Defined smsjobs.getSmsJob — Get info about an SMS job (official clients only).
- Defined smsjobs.finishJob — Finish an SMS job (official clients only).
- Defined fragment.getCollectibleInfo — Fetch information about a fragment collectible, see here » for more info on the full flow.
Constructors (1546)