Updates

Object which is perceived by the client without a call on its part when an event occurs.

updatesTooLong#e317af7e = Updates;
updateShortMessage#d3f45784 id:int from_id:int message:string pts:int date:int seq:int = Updates;
updateShortChatMessage#2b2fbd4e id:int from_id:int chat_id:int message:string pts:int date:int seq:int = Updates;
updateShort#78d4dec1 update:Update date:int = Updates;
updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates;
updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;

Constructors

Constructor Description
updatesTooLong Too many updates, it is necessary to execute updates.getDifference.
updateShortMessage Info about a message sent to (received from) another user
updateShortChatMessage Shortened constructor containing info on one new incoming text message from a chat
updateShort Shortened constructor containing info on one update not requiring auxiliary data
updatesCombined Constructor for a group of updates.
updates Full constructor of updates
updateShortSentMessage Shortened constructor containing info on one outgoing message to a contact (the destination chat has to be extracted from the method call that returned this object).

Methods

Method Description
contacts.deleteContacts Deletes several contacts from the list.
messages.sendMessage Sends a message to a chat
messages.sendMedia Send a media
messages.forwardMessages Forwards messages by their IDs.
messages.editChatTitle Changes chat name and sends a service message on it.
messages.editChatPhoto Changes chat photo and sends a service message on it
messages.addChatUser Adds a user to a chat and sends a service message on it.

May also return 0-N updates of type updateGroupInvitePrivacyForbidden: it indicates we couldn't add a user to a chat because of their privacy settings; if required, an invite link can be shared with the user, instead.
messages.deleteChatUser Deletes a user from a chat and sends a service message on it.
messages.createChat Creates a new chat.

May also return 0-N updates of type updateGroupInvitePrivacyForbidden: it indicates we couldn't add a user to a chat because of their privacy settings; if required, an invite link can be shared with the user, instead.
messages.importChatInvite Import a chat invite and join a private chat/supergroup/channel
messages.startBot Start a conversation with a bot using a deep linking parameter
channels.createChannel Create a supergroup/channel.
channels.editAdmin Modify the admin rights of a user in a supergroup/channel.
channels.editTitle Edit the name of a channel/supergroup
channels.editPhoto Change the photo of a channel/supergroup
channels.joinChannel Join a channel/supergroup
channels.leaveChannel Leave a channel/supergroup
channels.inviteToChannel Invite users to a channel/supergroup

May also return 0-N updates of type updateGroupInvitePrivacyForbidden: it indicates we couldn't add a user to a chat because of their privacy settings; if required, an invite link can be shared with the user, instead.
channels.deleteChannel Delete a channel/supergroup
messages.migrateChat Turn a basic group into a supergroup
messages.sendInlineBotResult Send a result obtained using messages.getInlineBotResults.
channels.toggleSignatures Enable/disable message signatures in channels
messages.editMessage Edit message
messages.getAllDrafts Return all message drafts.
Returns all the latest updateDraftMessage updates related to all chats with drafts.
messages.setGameScore Use this method to set the score of the specified user in a game sent as a normal message (bots only).
phone.discardCall Refuse or end running call
phone.setCallRating Rate a call, returns info about the rating message sent to the official VoIP bot.
channels.editBanned Ban/unban/kick a user in a supergroup/channel.
messages.sendScreenshotNotification Notify the other user in a private chat that a screenshot of the chat was taken
channels.deleteHistory Delete the history of a supergroup
channels.togglePreHistoryHidden Hide/unhide message history for new channel/supergroup users
messages.sendMultiMedia Send an album or grouped media
messages.updatePinnedMessage Pin a message
account.getNotifyExceptions Returns list of chats with non-default notification settings
messages.sendVote Vote in a poll

Starting from layer 159, the vote will be sent from the peer specified using messages.saveDefaultSendAs.
messages.getPollResults Get poll results
messages.editChatDefaultBannedRights Edit the default banned rights of a channel/supergroup/group.
folders.editPeerFolders Edit peers in peer folder
contacts.addContact Add an existing telegram user as contact.

Use contacts.importContacts to add contacts by phone number, without knowing their Telegram ID.
contacts.acceptContact If the add contact action bar is active, add that user as contact
channels.editCreator Transfer channel ownership
contacts.getLocated Get users and geochats near you, see here » for more info.
channels.toggleSlowMode Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds
messages.sendScheduledMessages Send scheduled messages right away
messages.deleteScheduledMessages Delete scheduled messages
contacts.blockFromReplies Stop getting notifications about discussion replies of a certain user in @replies
phone.createGroupCall Create a group call or livestream
phone.joinGroupCall Join a group call
phone.leaveGroupCall Leave a group call
phone.inviteToGroupCall Invite a set of users to a group call.
phone.discardGroupCall Terminate a group call
phone.toggleGroupCallSettings Change group call settings
messages.setHistoryTTL Set maximum Time-To-Live of all messages in the specified chat
channels.convertToGigagroup Convert a supergroup to a gigagroup, when requested by channel suggestions.
phone.toggleGroupCallRecord Start or stop recording a group call: the recorded audio and video streams will be automatically sent to Saved messages (the chat with ourselves).
phone.editGroupCallParticipant Edit information about a given group call participant

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.
phone.editGroupCallTitle Edit the title of a group call or livestream
phone.toggleGroupCallStartSubscription Subscribe or unsubscribe to a scheduled group call
phone.startScheduledGroupCall Start a scheduled group call.
phone.joinGroupCallPresentation Start screen sharing in a call
phone.leaveGroupCallPresentation Stop screen sharing in a group call
messages.setChatTheme Change the chat theme of a certain chat
messages.hideChatJoinRequest Dismiss or approve a chat join request related to a specific chat or channel.
messages.hideAllChatJoinRequests Dismiss or approve all join requests related to a specific chat or channel.
messages.toggleNoForwards Enable or disable content protection on a channel or chat
messages.sendReaction React to message.

Starting from layer 159, the reaction will be sent from the peer specified using messages.saveDefaultSendAs.
messages.getMessagesReactions Get message reactions »
messages.setChatAvailableReactions Change the set of message reactions » that can be used in a certain group, supergroup or channel
messages.sendWebViewData Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.
channels.toggleJoinToSend Set whether all users should join a discussion group in order to comment on a post »
channels.toggleJoinRequest Set whether all users should request admin approval to join the group ».
payments.assignAppStoreTransaction Informs server about a purchase made through the App Store: for official applications only.
payments.assignPlayMarketTransaction Informs server about a purchase made through the Play Store: for official applications only.
messages.getExtendedMedia Get information about extended media
channels.toggleForum Enable or disable forum functionality in a supergroup.
channels.createForumTopic Create a forum topic; requires manage_topics rights.
channels.editForumTopic Edit forum topic; requires manage_topics rights.
channels.updatePinnedForumTopic Pin or unpin forum topics
channels.reorderPinnedForumTopics Reorder pinned forum topics
channels.toggleAntiSpam Enable or disable the native antispam system.
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 ».
messages.sendBotRequestedPeer Send one or more chosen peers, as requested by a keyboardButtonRequestPeer button.
chatlists.joinChatlistInvite Import a chat folder deep link », joining some or all the chats in the folder.
chatlists.joinChatlistUpdates Join channels and supergroups recently added to a chat folder deep link ».
chatlists.leaveChatlist Delete a folder imported using a chat folder deep link »
messages.setChatWallPaper Set a custom wallpaper » in a specific private chat with another user.
stories.sendStory Uploads a Telegram Story.
stories.editStory Edit an uploaded story
stories.activateStealthMode Activates stories stealth mode, see here » for more info.

Will return an updateStoriesStealthMode.
stories.sendReaction React to a story.
bots.allowSendMessage Allow the specified bot to send us messages
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.
payments.applyGiftCode Apply a Telegram Premium giftcode »
payments.launchPrepaidGiveaway Launch a prepaid giveaway ».
channels.updateColor Update the accent color and background custom emoji » of a channel.
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.
channels.updateEmojiStatus Set an emoji status for a channel.