GeezerVison is showing core.telegram.org — Available methods
Machine-readable version of this page: /methods.md.
Available methods
Dealing with spam and ToS violations
Miscellaneous
Registration/Authorization
Working with SMS jobs
Working with TSF (internal use only)
Working with Telegram Gateway verification messages
Working with Telegram Premium
Working with GIFs »
| Name |
Description |
| bots.getPopularAppBots |
Fetch popular Main Mini Apps, to be used in the apps tab of global search ». |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| bots.getPreviewMedias |
Fetch main mini app previews, see here » for more info. |
| messages.requestMainWebView |
Open a Main Mini App. |
| Name |
Description |
| 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. |
| 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. |
| messages.requestSimpleWebView |
Open a bot mini app. |
| messages.sendWebViewResultMessage |
Terminate webview interaction started with messages.requestWebView, sending the specified message to the chat on behalf of the user. |
| messages.sendWebViewData |
Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it. |
| 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. |
| messages.getBotApp |
Obtain information about a direct link Mini App |
| bots.canSendMessage |
Check whether the specified bot can send us messages |
| bots.allowSendMessage |
Allow the specified bot to send us messages |
| 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. |
| bots.checkDownloadFileParams |
Check if a mini app can request the download of a specific file: called when handling web_app_request_file_download events » |
| Name |
Description |
| account.updateConnectedBot |
Connect a business bot » to the current account, or to change the current connection settings. |
| account.getConnectedBots |
List all currently connected business bots » |
| account.toggleConnectedBotPaused |
Pause or unpause a specific chat, temporarily disconnecting it from all business bots ». |
| 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 ». |
| 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 ». |
| invokeWithBusinessConnection |
Invoke a method using a Telegram 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. |
| Name |
Description |
| account.updateBusinessWorkHours |
Specify a set of Telegram 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 ». |
| Name |
Description |
| payments.getStarGifts |
Get a list of available gifts, see here » for more info. |
| payments.saveStarGift |
Display or remove a received or hosted gift » from our profile. |
| payments.convertStarGift |
Convert a received gift » into Telegram Stars: this will permanently destroy the gift, converting it into starGift.convert_stars Telegram 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 Telegram Stars bought a long time ago. |
| 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. |
| 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). |
| 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). |
| payments.getUniqueStarGift |
Obtain info about a collectible gift » using a slug obtained from a collectible gift link ». |
| 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. |
| 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). |
| payments.getStarGiftWithdrawalUrl |
Convert a collectible gift » to an NFT on the TON blockchain. |
| 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. |
| payments.toggleStarGiftsPinnedToTop |
Pins a received gift on top of the profile of the user or owned channels by using payments.toggleStarGiftsPinnedToTop. |
| 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. |
| 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. |
| payments.getUniqueStarGiftValueInfo |
Get information about the value of a collectible gift ». |
| payments.checkCanSendGift |
Check if the specified gift » can be sent. |
| payments.resolveStarGiftOffer |
Accept or decline a previously received collectible gift purchase offer », see here » for the full flow. |
| payments.sendStarGiftOffer |
Send an offer to purchase a collectible gift », see here » for the full flow. |
| 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). |
| payments.getCraftStarGifts |
Obtain owned collectible gifts » of a specific type that can be used for crafting ». |
| 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. |
| Name |
Description |
| messages.startBot |
Start a conversation with a bot using a deep linking parameter |
| help.getDeepLinkInfo |
Get info about an unsupported deep link, see here for more info ». |
| help.getRecentMeUrls |
Get recently used t.me links.
When installing official applications from "Download Telegram" buttons present in t.me 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 t.me pages the user recently opened, before installing Telegram. |
Working with drafts
Working with files
Working with forums
Working with games
| Name |
Description |
| 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 ». |
| 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. |
| 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. |
| 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). |
| 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. |
| phone.getGroupParticipants |
Get group call participants. |
| 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. |
| phone.createGroupCall |
Create a video chat or livestream, see here » for the full flow. |
| phone.toggleGroupCallStartSubscription |
Subscribe or unsubscribe to a scheduled group call. |
| 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. |
| phone.toggleGroupCallSettings |
Change group call settings. Each setting supports different group call types, see here » for more info. |
| phone.inviteToGroupCall |
Invite a set of users to a video chat/livestream »; cannot be used for live stories » or conference calls ». |
| phone.getGroupCall |
Get info about a group call and its participants. |
| 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. |
| 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. |
| 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. |
| 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. |
| phone.startScheduledGroupCall |
Start a scheduled group call. |
| phone.saveDefaultGroupCallJoinAs |
Set the default peer used to join a video chat/livestream » associated with a specific dialog. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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. |
| 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). |
| Name |
Description |
| 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. |
| 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. |
| Name |
Description |
| 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. |
| stories.canSendStory |
Check whether we can post stories as the specified peer. |
| stories.sendStory |
Uploads a Telegram 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. |
| stories.editStory |
Edit an uploaded 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: 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. |
| stories.deleteStories |
Deletes some posted stories. |
| stories.togglePinnedToTop |
Pin some stories to the top of the profile, see here » for more info. |
| stories.togglePinned |
Pin or unpin one or more stories |
| stories.getAllStories |
Fetch the List of active (or active and hidden) stories, see here » for more info on watching stories. |
| stories.getPinnedStories |
Fetch the stories pinned on a peer's profile. |
| stories.getStoriesArchive |
Fetch the story archive » of a peer we control. |
| stories.getStoriesByID |
Obtain full info about a set of stories by their IDs. |
| stories.toggleAllStoriesHidden |
Hide the active stories of a specific peer, preventing them from being displayed on the action bar on the homescreen. |
| 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. |
| stories.incrementStoryViews |
Increment the view counter of one or more stories. |
| stories.getStoryViewsList |
Obtain the list of users that have viewed a specific story we posted |
| 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. |
| stories.getStoriesViews |
Obtain info about the view count, forward count, reactions and recent viewers of one or more stories. |
| stories.exportStoryLink |
Generate a story deep link for a specific story |
| stories.report |
Report a story. |
| stories.activateStealthMode |
Activates stories stealth mode, see here » for more info.
Will return an updateStoriesStealthMode. |
| stories.getPeerStories |
Fetch the full active story list of a specific peer. |
| 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. |
| stories.getPeerMaxIDs |
Get compact active story summaries » for a set of peers. |
| stories.getChatsToSend |
Obtain a list of channels where the user can post stories |
| 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. |
| stories.sendReaction |
React to a story. |
| stories.createAlbum |
Creates a story album. |
| stories.updateAlbum |
Rename a story albums », or add, delete or reorder stories in it. |
| stories.reorderAlbums |
Reorder story albums on a profile ». |
| stories.deleteAlbum |
Delete a story album. |
| stories.getAlbums |
Get story albums created by a peer. |
| stories.getAlbumStories |
Get stories in a story album ». |
| Name |
Description |
| channels.setMainProfileTab |
Changes the main profile tab of a channel, see here » for more info. |
| account.setMainProfileTab |
Changes the main profile tab of the current user, see here » for more info. |
| photos.deletePhotos |
Deletes profile photos. The method returns a list of successfully deleted photo IDs. |
| photos.getUserPhotos |
Returns the list of user photos. |
| photos.updateProfilePhoto |
Installs a previously uploaded photo as a profile photo. |
| photos.uploadProfilePhoto |
Updates current user profile photo.
The file, video and video_emoji_markup flags are mutually exclusive. |
| 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. |
| account.updateProfile |
Updates user profile. |
| account.updateBirthday |
Update our birthday, see here » for more info. |
| contacts.updateContactNote |
Update the private note associated to a contact; see here » for more info. |
| 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. |
| account.updatePersonalChannel |
Associate (or remove) a personal channel », that will be listed on our personal profile page ».
Changing it will emit an updateUser update. |
| account.updateStatus |
Updates online user status. |
| users.getSavedMusic |
Get songs pinned to the user's profile, see here » for more info. |
| 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. |
| 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. |
| account.getSavedMusicIds |
Fetch the full list of only the IDs of songs currently added to the profile, see here » for more info. |
| users.suggestBirthday |
Suggest a birthday to another user, see here » for more info on birthdays in the API. |
| messages.getPersonalChannelHistory |
Fetch the message history of a user's personal channel ». |
Working with bot admin right suggestions
Working with bot inline queries and callback buttons
Working with bots
| Name |
Description |
| bots.resetBotCommands |
Clear bot commands for the specified bot scope and language code |
| bots.getBotCommands |
Obtain a list of bot commands for the specified bot scope and language code |
| bots.setBotCommands |
Set bot command list |
| bots.setBotInfo |
Set localized name, about text and description of a bot (or of the current account, if called by a bot). |
| bots.getBotInfo |
Get localized name, about text and description of a bot (or of the current account, if called by a bot). |
| bots.getAdminedBots |
Get a list of bots owned by the current user |
Working with bots (internal bot API use)
Working with contacts and top peers
| Name |
Description |
| account.getContactSignUpNotification |
Whether the user will receive notifications when contacts sign up |
| account.setContactSignUpNotification |
Toggle contact sign up notifications |
| contacts.acceptContact |
If the add contact action bar is active, add that user as contact |
| contacts.addContact |
Add an existing telegram user as contact.
Use contacts.importContacts to add contacts by phone number, without knowing their Telegram ID. |
| contacts.block |
Adds a peer to a blocklist, see here » for more info. |
| contacts.deleteByPhones |
Delete contacts by phone number |
| contacts.deleteContacts |
Deletes several contacts from the list. |
| contacts.getBlocked |
Returns the list of blocked users. |
| contacts.getContactIDs |
Get the telegram IDs of all contacts. Returns an array of Telegram user IDs for all contacts (0 if a contact does not have an associated Telegram account or have hidden their account using privacy settings). |
| contacts.getContacts |
Returns the current user's contact list. |
| contacts.getLocated |
Get users and geochats near you, see here » for more info. |
| contacts.getSaved |
Get all contacts, requires a takeout session, see here » for more info. |
| contacts.getStatuses |
Use this method to obtain the online statuses of all contacts with an accessible Telegram account. |
| contacts.getTopPeers |
Get most used peers |
| 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 Telegram contacts without actually using their phone number. |
| contacts.resetSaved |
Removes all contacts without an associated Telegram account. |
| contacts.resetTopPeerRating |
Reset rating of top peer |
| contacts.search |
Returns users found by username substring. |
| contacts.toggleTopPeers |
Enable/disable top peers |
| contacts.unblock |
Deletes a peer from a blocklist, see here » for more info. |
| contacts.setBlocked |
Replace the contents of an entire blocklist, see here for more info ». |
| contacts.editCloseFriends |
Edit the close friends list, see here » for more info. |
Working with dialogs
Working with imported chats
| Name |
Description |
| messages.uploadImportedMedia |
Upload a media file associated with an imported chat, click here for more info ». |
| 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. |
| messages.checkHistoryImportPeer |
Check whether chat history exported from another chat app can be imported into a specific Telegram 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. |
| messages.checkHistoryImport |
Obtains information about a chat export file, generated by a foreign chat app, click here for more info about imported chats ». |
| messages.initHistoryImport |
Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ». |
Working with localization packs
Working with media autodownload settings
Working with media autosave settings
Working with message threads
Working with messages
| Name |
Description |
| messages.deleteHistory |
Deletes communication history. |
| messages.deleteMessages |
Deletes messages by their identifiers. |
| messages.editMessage |
Edit message |
| messages.forwardMessages |
Forwards messages by their IDs. |
| messages.getHistory |
Returns the message history in a peer.
Results are ordered by date (descending). |
| 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). |
| messages.getMessageEditData |
Find out if a media message's caption can be edited |
| 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. |
| messages.getMessages |
Returns the list of messages by their IDs. |
| messages.getMessagesViews |
Get and increase the view counter of a message sent or forwarded from a channel |
| messages.getRecentLocations |
Get all recent live locations sent to a specific chat: returns up to 1 location message (messageMediaGeoLive) per chat participant. |
| messages.getSearchCounters |
Get the number of results that would be found by a messages.search call with the same parameters |
| messages.getUnreadMentions |
Get unread messages where we were mentioned |
| messages.readHistory |
Marks message history as read. |
| messages.readMentions |
Mark mentions as read; can be used in forums but cannot be used in monoforums. |
| messages.readMessageContents |
Notifies the sender about the recipient having listened a voice message or watched a video, emitting an updateReadMessagesContents. |
| messages.receivedMessages |
Confirms receipt of messages by a client, cancels PUSH-notification sending. |
| messages.search |
Search for messages. |
| 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. |
| messages.searchGlobal |
Search for messages and peers globally |
| messages.searchSentMedia |
View and search recently sent media. This method does not support pagination. |
| channels.checkSearchPostsFlood |
Check if the specified global post search » requires payment. |
| 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. |
| messages.sendMedia |
Send a media |
| messages.sendMessage |
Sends a message to a chat |
| messages.sendMultiMedia |
Send an album or grouped media |
| messages.updatePinnedMessage |
Pin a message |
| messages.unpinAllMessages |
Unpin all pinned messages |
| messages.saveDefaultSendAs |
Change the default peer that should be used when sending messages, reactions, poll votes to a specific group |
| 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 ». |
Working with notification settings
Working with notification sounds
Working with other users
| Name |
Description |
| users.getFullUser |
Returns extended user info by ID. |
| users.getUsers |
Returns basic user info according to their identifiers. |
| 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. |
Working with payments
Working with polls
Working with scheduled messages
Working with sensitive content (NSFW)
Working with the user's account
Working with timezones
Working with usernames
Telegram
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
|