diff --git a/data/web/blogfork.telegram.org/api/auth.html b/data/web/blogfork.telegram.org/api/auth.html index c330e025d5..a5a31e34b2 100644 --- a/data/web/blogfork.telegram.org/api/auth.html +++ b/data/web/blogfork.telegram.org/api/auth.html @@ -207,16 +207,52 @@ After obtaining the ID token, call account

If the user cannot access their email address, an email reset may be requested using auth.resetLoginEmail.

To change the login email after login, pass emailVerifyPurposeLoginChange as purpose, following the exact same Google ID/Apple ID/email code login flow as above: on success, the account.verifyEmail method will return an account.emailVerified constructor.

-

Sign in/sign up

+

Sign in/sign up

When user enters verification code, the auth.signIn method must be used to validate it and possibly sign user in.

If the code was entered correctly, but the method returns auth.authorizationSignUpRequired, it means that account with this phone number doesn't exist yet: user needs to provide basic information, accept terms of service and then the new user registration method (auth.signUp) must be invoked.

2FA

When trying to sign in using auth.signIn, an error 400 SESSION_PASSWORD_NEEDED may be returned, if the user has two-factor authentication enabled. In this case, instructions for SRP 2FA authentication must be followed.

To set up two-factor authorization on an already authorized account, follow the SRP 2FA authentication docs.

-

Test Accounts

+

Confirming login

+
authorization#ad01d61d flags:# current:flags.0?true official_app:flags.1?true password_pending:flags.2?true encrypted_requests_disabled:flags.3?true call_requests_disabled:flags.4?true unconfirmed:flags.5?true hash:long device_model:string platform:string system_version:string api_id:int app_name:string app_version:string date_created:int date_active:int ip:string country:string region:string = Authorization;
+
+account.authorizations#4bff8ea0 authorization_ttl_days:int authorizations:Vector<Authorization> = account.Authorizations;
+
+updateNewAuthorization#8951abef flags:# unconfirmed:flags.0?true hash:long date:flags.0?int device:flags.0?string location:flags.0?string = Update;
+
+---functions---
+
+account.getAuthorizations#e320c158 = account.Authorizations;
+
+account.changeAuthorizationSettings#40f48462 flags:# confirmed:flags.3?true hash:long encrypted_requests_disabled:flags.0?Bool call_requests_disabled:flags.1?Bool = Bool;
+
+account.resetAuthorization#df77f3bc hash:long = Bool;
+

When logging in, other logged-in sessions will receive an updateNewAuthorization update.
+If the unconfirmed flag is set, clients should display a notification, asking the user if they recognize the session.

+

If the user clicks on the Yes button, invoke account.changeAuthorizationSettings with the new session's hash and the confirmed flag set, confirming the specified session.

+

If the user clicks on the No button, invoke account.resetAuthorization with the new session's hash, logging out the specified session.

+

If no action is taken by the user, the session will be autoconfirmed authorization_autoconfirm_period seconds after login (see the associated client configuration parameter »).

+

Invalidating login codes

+

Telegram's servers will automatically invalidate login codes if they are sent by the user to another Telegram chat, either by forwarding them or by sending them inside of a message: however, clients should also manually and immediately invalidate login codes if the user attempts to screenshot or forward a message sent by the login notification service user (ID 777000) containing login codes.

+

If an incoming message that is:

+ +

Is either:

+ +

account.invalidateSignInCodes should be invoked, passing the extracted login codes (excluding any - characeters).

+
---functions---
+
+account.invalidateSignInCodes#ca8ae8ba codes:Vector<string> = Bool;
+

Test Accounts

Each phone number is limited to only a certain amount of logins per day (e.g. 5, but this is subject to change) after which the API will return a FLOOD error until the next day. This might not be enough for testing the implementation of User Authorization flows in client applications.

-

There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on Test DCs (their IP addresses for TCP transport are available in API development tools panel after api_id was obtained, URI format for HTTPS/Websocket transport).

+

There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on Test DCs (their IP addresses for TCP transport are available in API development tools panel after api_id was obtained, URI format for HTTPS/WebSocket transport).

If you wish to emulate an application of a user associated with DC number X, it is sufficient to specify the phone number as 99966XYYYY, where YYYY are random numbers, when registering the user. A user like this would always get XXXXX as the login confirmation code (the DC number, repeated five times). Note that the value of X must be in the range of 1-3 because there are only 3 Test DCs. When the flood limit is reached for any particular test number, just choose another number (changing the YYYY random part).

Do not store any important or private information in the messages of such test accounts; anyone can make use of the simplified authorization mechanism – and we periodically wipe all information stored there.

Proceed with User Authorization flows in Production DCs only after you make sure everything works correctly on Test DCs first to avoid reaching flood limits.

diff --git a/data/web/blogfork.telegram.org/api/privacy.html b/data/web/blogfork.telegram.org/api/privacy.html index d0276d5c0a..5ecf9ac399 100644 --- a/data/web/blogfork.telegram.org/api/privacy.html +++ b/data/web/blogfork.telegram.org/api/privacy.html @@ -2,12 +2,12 @@ - Page not found + Privacy - - + + - + @@ -39,10 +39,95 @@
- -

Page not found

+ +

Privacy

-
The page has not been saved
+
+ +

Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.

+

Privacy rules

+

Schema:

+
inputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule;
+inputPrivacyValueAllowAll#184b35ce = InputPrivacyRule;
+inputPrivacyValueAllowUsers#131cc67f users:Vector<InputUser> = InputPrivacyRule;
+inputPrivacyValueDisallowContacts#ba52007 = InputPrivacyRule;
+inputPrivacyValueDisallowAll#d66b66c9 = InputPrivacyRule;
+inputPrivacyValueDisallowUsers#90110467 users:Vector<InputUser> = InputPrivacyRule;
+inputPrivacyValueAllowChatParticipants#840649cf chats:Vector<long> = InputPrivacyRule;
+inputPrivacyValueDisallowChatParticipants#e94f0f86 chats:Vector<long> = InputPrivacyRule;
+inputPrivacyValueAllowCloseFriends#2f453e49 = InputPrivacyRule;
+
+privacyValueAllowContacts#fffe1bac = PrivacyRule;
+privacyValueAllowAll#65427b82 = PrivacyRule;
+privacyValueAllowUsers#b8905fb2 users:Vector<long> = PrivacyRule;
+privacyValueDisallowContacts#f888fa1a = PrivacyRule;
+privacyValueDisallowAll#8b73e763 = PrivacyRule;
+privacyValueDisallowUsers#e4621141 users:Vector<long> = PrivacyRule;
+privacyValueAllowChatParticipants#6b134e8e chats:Vector<long> = PrivacyRule;
+privacyValueDisallowChatParticipants#41c87565 chats:Vector<long> = PrivacyRule;
+privacyValueAllowCloseFriends#f7e8d89b = PrivacyRule;
+
+user#215c4438 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector<Username> stories_max_id:flags2.5?int color:flags2.8?PeerColor profile_color:flags2.9?PeerColor = User;
+
+---functions---
+
+contacts.editCloseFriends#ba6705f0 id:Vector<long> = Bool;
+

Privacy rules indicate who can or can't do something and are specified by a PrivacyRule, and its input counterpart InputPrivacyRule.
+InputPrivacyRule constructors are passed as input to methods that accept privacy rules, while PrivacyRules are contained in constructors returned by the API.

+

See the type page » for a full list of privacy rules and their descriptions.

+

One privacy rule in particular should be mentioned separately, (input)privacyValueAllowCloseFriends: this privacy rule, which can be used only when posting stories, refers exclusively to a list of "close friends", that can be modified using contacts.editCloseFriends, passing the full close friend list as a list of user IDs: note that only users in the contact list (even without a phone number) » can be added to the close friends list.

+

The current list of close friends can be checking which users in our contact list have the close_friend flag set in the associated user constructor, see here » for more info on how to fetch the contact list.

+

Privacy keys

+

Schema:

+
inputPrivacyKeyStatusTimestamp#4f96cb18 = InputPrivacyKey;
+inputPrivacyKeyChatInvite#bdfb0426 = InputPrivacyKey;
+inputPrivacyKeyPhoneCall#fabadc5f = InputPrivacyKey;
+inputPrivacyKeyPhoneP2P#db9e70d2 = InputPrivacyKey;
+inputPrivacyKeyForwards#a4dd4c08 = InputPrivacyKey;
+inputPrivacyKeyProfilePhoto#5719bacc = InputPrivacyKey;
+inputPrivacyKeyPhoneNumber#352dafa = InputPrivacyKey;
+inputPrivacyKeyAddedByPhone#d1219bdd = InputPrivacyKey;
+inputPrivacyKeyVoiceMessages#aee69d68 = InputPrivacyKey;
+inputPrivacyKeyAbout#3823cc40 = InputPrivacyKey;
+
+privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey;
+privacyKeyChatInvite#500e6dfa = PrivacyKey;
+privacyKeyPhoneCall#3d662b7b = PrivacyKey;
+privacyKeyPhoneP2P#39491cc8 = PrivacyKey;
+privacyKeyForwards#69ec56a3 = PrivacyKey;
+privacyKeyProfilePhoto#96151fed = PrivacyKey;
+privacyKeyPhoneNumber#d19ae46d = PrivacyKey;
+privacyKeyAddedByPhone#42ffd42b = PrivacyKey;
+privacyKeyVoiceMessages#697f414 = PrivacyKey;
+privacyKeyAbout#a486b761 = PrivacyKey;
+
+account.privacyRules#50a04e45 rules:Vector<PrivacyRule> chats:Vector<Chat> users:Vector<User> = account.PrivacyRules;
+
+updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = Update;
+
+---functions---
+
+account.getPrivacy#dadbc950 key:InputPrivacyKey = account.PrivacyRules;
+account.setPrivacy#c9f81ce8 key:InputPrivacyKey rules:Vector<InputPrivacyRule> = account.PrivacyRules;
+

Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a PrivacyKey constructor, and its input counterpart InputPrivacyKey.
+InputPrivacyKey constructors are passed as input to methods that accept privacy keys, while PrivacyKeys are contained in constructors returned by the API.

+

See the type page » for a full list of privacy keys and their descriptions.

+

Use account.getPrivacy to obtain the current set of rules associated to a key, and account.setPrivacy to change it.

+

Changing the privacy settings will trigger an updatePrivacy, sent to all currently logged in sessions of the current account.

+

Global privacy settings

+
globalPrivacySettings#734c4ccb flags:# archive_and_mute_new_noncontact_peers:flags.0?true keep_archived_unmuted:flags.1?true keep_archived_folders:flags.2?true = GlobalPrivacySettings;
+
+---functions---
+
+account.getGlobalPrivacySettings#eb2b4cf6 = GlobalPrivacySettings;
+account.setGlobalPrivacySettings#1edaaac2 settings:GlobalPrivacySettings = GlobalPrivacySettings;
+

Some global privacy settings can also be fetched and modified using account.getGlobalPrivacySettings and account.setGlobalPrivacySettings.

+

Global privacy settings are represented by the globalPrivacySettings constructor, that contains the following parameters:

+
    +
  • archive_and_mute_new_noncontact_peers - Whether to archive and mute new chats from non-contacts.
  • +
  • keep_archived_unmuted - Whether unmuted chats will be kept in the Archive chat list when they get a new message.
  • +
  • keep_archived_folders - Whether unmuted chats that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_archived_unmuted is set.
  • +
@@ -109,8 +194,11 @@
- - + + + diff --git a/data/web/blogfork.telegram.org/constructor/appWebViewResultUrl.html b/data/web/blogfork.telegram.org/constructor/appWebViewResultUrl.html index 1975648505..949e1d8807 100644 --- a/data/web/blogfork.telegram.org/constructor/appWebViewResultUrl.html +++ b/data/web/blogfork.telegram.org/constructor/appWebViewResultUrl.html @@ -4,10 +4,10 @@ appWebViewResultUrl - + - + @@ -42,7 +42,7 @@

appWebViewResultUrl

-

Contains the link that must be used to open a named bot web app.

+

Contains the link that must be used to open a direct link Mini App.

diff --git a/data/web/blogfork.telegram.org/constructor/botInlineMessageText.html b/data/web/blogfork.telegram.org/constructor/botInlineMessageText.html index 559300e218..fc491b0357 100644 --- a/data/web/blogfork.telegram.org/constructor/botInlineMessageText.html +++ b/data/web/blogfork.telegram.org/constructor/botInlineMessageText.html @@ -77,6 +77,11 @@ Disable webpage preview +invert_media +flags.3?true +If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + message string The message diff --git a/data/web/blogfork.telegram.org/constructor/botMenuButton.html b/data/web/blogfork.telegram.org/constructor/botMenuButton.html index 84365af112..941ce02287 100644 --- a/data/web/blogfork.telegram.org/constructor/botMenuButton.html +++ b/data/web/blogfork.telegram.org/constructor/botMenuButton.html @@ -81,7 +81,7 @@

Type

BotMenuButton

Related pages

-

Bot web apps

+

Mini Apps on Telegram

Bots can offer users interactive HTML5 web apps to completely replace any website.

Bot menu button

Bots can choose the behavior of the menu button shown next to the text input field.

diff --git a/data/web/blogfork.telegram.org/constructor/chatInvite.html b/data/web/blogfork.telegram.org/constructor/chatInvite.html index b759be174b..1c25bf97e2 100644 --- a/data/web/blogfork.telegram.org/constructor/chatInvite.html +++ b/data/web/blogfork.telegram.org/constructor/chatInvite.html @@ -97,6 +97,21 @@ Whether the join request » must be first approved by an administrator +verified +flags.7?true +Is this chat or channel verified by Telegram? + + +scam +flags.8?true +This chat is probably a scam + + +fake +flags.9?true +If set, this chat was reported by many users as a fake or scam: be careful when interacting with it. + + title string Chat/supergroup/channel title @@ -121,6 +136,11 @@ flags.4?Vector<User> A few of the participants that are in the group + +color +int +Profile color palette ID +

Type

@@ -129,7 +149,9 @@

Channels, supergroups, gigagroups and basic groups

How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.

Invites

-

Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.

+

Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.

+

Accent colors

+

Telegram users and channels can change the accent color and background pattern of their profile page and their messages!

diff --git a/data/web/blogfork.telegram.org/constructor/decryptedMessageMediaVenue.html b/data/web/blogfork.telegram.org/constructor/decryptedMessageMediaVenue.html index cd43fbbbbf..5898e45193 100644 --- a/data/web/blogfork.telegram.org/constructor/decryptedMessageMediaVenue.html +++ b/data/web/blogfork.telegram.org/constructor/decryptedMessageMediaVenue.html @@ -90,7 +90,7 @@ provider string -Venue provider: currently only "foursquare" needs to be supported +Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported venue_id diff --git a/data/web/blogfork.telegram.org/constructor/exportedContactToken.html b/data/web/blogfork.telegram.org/constructor/exportedContactToken.html index 5e570c08ea..f449427a49 100644 --- a/data/web/blogfork.telegram.org/constructor/exportedContactToken.html +++ b/data/web/blogfork.telegram.org/constructor/exportedContactToken.html @@ -74,7 +74,7 @@ expires int -Its expiry date +Its expiration date diff --git a/data/web/blogfork.telegram.org/constructor/inputBotAppID.html b/data/web/blogfork.telegram.org/constructor/inputBotAppID.html index 44c0459d3c..f9918015d0 100644 --- a/data/web/blogfork.telegram.org/constructor/inputBotAppID.html +++ b/data/web/blogfork.telegram.org/constructor/inputBotAppID.html @@ -4,10 +4,10 @@ inputBotAppID - + - + @@ -42,7 +42,7 @@

inputBotAppID

-

Used to fetch information about a named bot web app by its ID

+

Used to fetch information about a direct link Mini App by its ID

+

Contains information about a direct link Mini App.

diff --git a/data/web/blogfork.telegram.org/constructor/inputBotAppShortName.html b/data/web/blogfork.telegram.org/constructor/inputBotAppShortName.html index b3e904967c..538b443c8a 100644 --- a/data/web/blogfork.telegram.org/constructor/inputBotAppShortName.html +++ b/data/web/blogfork.telegram.org/constructor/inputBotAppShortName.html @@ -4,10 +4,10 @@ inputBotAppShortName - + - + @@ -42,7 +42,7 @@

inputBotAppShortName

-

Used to fetch information about a named bot web app by its short name

+

Used to fetch information about a direct link Mini App by its short name

diff --git a/data/web/blogfork.telegram.org/constructor/keyboardButtonRequestPeer.html b/data/web/blogfork.telegram.org/constructor/keyboardButtonRequestPeer.html index 5024910f5a..d94a1e9c64 100644 --- a/data/web/blogfork.telegram.org/constructor/keyboardButtonRequestPeer.html +++ b/data/web/blogfork.telegram.org/constructor/keyboardButtonRequestPeer.html @@ -4,10 +4,10 @@ keyboardButtonRequestPeer - + - + @@ -42,7 +42,7 @@

keyboardButtonRequestPeer

-

Prompts the user to select and share a peer with the bot using messages.sendBotRequestedPeer

+

Prompts the user to select and share one or more peers with the bot using messages.sendBotRequestedPeer

+

Send one or more chosen peers, as requested by a keyboardButtonRequestPeer button.

diff --git a/data/web/blogfork.telegram.org/constructor/messageActionWebViewDataSent.html b/data/web/blogfork.telegram.org/constructor/messageActionWebViewDataSent.html index 6b1e5fcc41..7bc3576303 100644 --- a/data/web/blogfork.telegram.org/constructor/messageActionWebViewDataSent.html +++ b/data/web/blogfork.telegram.org/constructor/messageActionWebViewDataSent.html @@ -4,10 +4,10 @@ messageActionWebViewDataSent - + - + @@ -42,7 +42,7 @@

messageActionWebViewDataSent

-

Data from an opened reply keyboard bot web app was relayed to the bot that owns it (user side service message).

+

Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message).

Clients should display a service message with the text Data from the «$text» button was transferred to the bot.

diff --git a/data/web/blogfork.telegram.org/constructor/messageActionWebViewDataSentMe.html b/data/web/blogfork.telegram.org/constructor/messageActionWebViewDataSentMe.html index b5fde59ddf..d20dc9276e 100644 --- a/data/web/blogfork.telegram.org/constructor/messageActionWebViewDataSentMe.html +++ b/data/web/blogfork.telegram.org/constructor/messageActionWebViewDataSentMe.html @@ -4,10 +4,10 @@ messageActionWebViewDataSentMe - + - + @@ -42,7 +42,7 @@

messageActionWebViewDataSentMe

-

Data from an opened reply keyboard bot web app was relayed to the bot that owns it (bot side service message).

+

Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message).

diff --git a/data/web/blogfork.telegram.org/constructor/messageFwdHeader.html b/data/web/blogfork.telegram.org/constructor/messageFwdHeader.html index 4b193a522e..e43de13594 100644 --- a/data/web/blogfork.telegram.org/constructor/messageFwdHeader.html +++ b/data/web/blogfork.telegram.org/constructor/messageFwdHeader.html @@ -77,6 +77,11 @@ Whether this message was imported from a foreign chat service, click here for more info » +saved_out +flags.11?true +Only for messages forwarded to saved messages », set if the original message was outgoing (though the message may have been originally outgoing even if this flag is not set, if from_id points to the current user). + + from_id flags.0?Peer The ID of the user that originally sent the message @@ -104,12 +109,27 @@ saved_from_peer flags.4?Peer -Only for messages forwarded to the current user (inputPeerSelf), full info about the user/channel that originally sent the message +Only for messages forwarded to saved messages », contains the dialog where the message was originally sent. saved_from_msg_id flags.4?int -Only for messages forwarded to the current user (inputPeerSelf), ID of the message that was forwarded from the original user/channel +Only for messages forwarded to saved messages », contains the original ID of the message in saved_from_peer. + + +saved_from_id +flags.8?Peer +Only for forwarded messages reforwarded to saved messages », contains the sender of the original message (i.e. if user A sends a message, then user B forwards it somewhere, then user C saves it to saved messages, this field will contain the ID of user B and from_id will contain the ID of user A). + + +saved_from_name +flags.9?string +Only for forwarded messages from users with forward privacy enabled, sent by users with forward privacy enabled, reforwarded to saved messages », contains the sender of the original message (i.e. if user A (fwd privacy enabled) sends a message, then user B (fwd privacy enabled) forwards it somewhere, then user C saves it to saved messages, this field will contain the name of user B and from_name will contain the name of user A). + + +saved_date +flags.10?int +Only for forwarded messages reforwarded to saved messages », indicates when was the original message sent (i.e. if user A sends a message @ unixtime 1, then user B forwards it somewhere @ unixtime 2, then user C saves it to saved messages @ unixtime 3, this field will contain 2, date will contain 1 and the date of the containing message will contain 3). psa_type @@ -122,7 +142,11 @@

MessageFwdHeader

Related pages

Imported messages

-

Telegram allows importing messages and media from foreign chat apps.

+

Telegram allows importing messages and media from foreign chat apps.

+

Saved messages

+

The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.

+

message

+

A message

diff --git a/data/web/blogfork.telegram.org/constructor/messageMediaDocument.html b/data/web/blogfork.telegram.org/constructor/messageMediaDocument.html index b36f54b35e..1b7b1a9f46 100644 --- a/data/web/blogfork.telegram.org/constructor/messageMediaDocument.html +++ b/data/web/blogfork.telegram.org/constructor/messageMediaDocument.html @@ -82,11 +82,31 @@ Whether this media should be hidden behind a spoiler warning +video +flags.6?true +Whether this is a video. + + +round +flags.7?true +Whether this is a round video. + + +voice +flags.8?true +Whether this is a voice message. + + document flags.0?Document Attached document +alt_document +flags.5?Document +Currently only used for story videos, may contain an alternative version of the story video, explicitly encoded using H.264 (in MPEG4 transport) at a lower resolution than document. + + ttl_seconds flags.2?int Time to live of self-destructing document diff --git a/data/web/blogfork.telegram.org/constructor/messageMediaWebPage.html b/data/web/blogfork.telegram.org/constructor/messageMediaWebPage.html index 0c7cb412ae..bf8a2fbd9d 100644 --- a/data/web/blogfork.telegram.org/constructor/messageMediaWebPage.html +++ b/data/web/blogfork.telegram.org/constructor/messageMediaWebPage.html @@ -67,6 +67,31 @@ +flags +# +Flags, see TL conditional fields + + +force_large_media +flags.0?true +If set, specifies that a large media preview should be used. + + +force_small_media +flags.1?true +If set, specifies that a small media preview should be used. + + +manual +flags.3?true +If set, indicates that the URL used for the webpage preview was specified manually using inputMediaWebPage, and may not be related to any of the URLs specified in the message. + + +safe +flags.4?true +If set, the webpage can be opened directly without user confirmation; otherwise, user confirmation is required, showing the exact URL that will be opened. + + webpage WebPage Webpage preview @@ -74,7 +99,10 @@

Type

-

MessageMedia

+

MessageMedia

+

Related pages

+

inputMediaWebPage

+

Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message.

diff --git a/data/web/blogfork.telegram.org/constructor/messagePeerReaction.html b/data/web/blogfork.telegram.org/constructor/messagePeerReaction.html index 4d93a7a556..dd413d92b4 100644 --- a/data/web/blogfork.telegram.org/constructor/messagePeerReaction.html +++ b/data/web/blogfork.telegram.org/constructor/messagePeerReaction.html @@ -112,7 +112,7 @@

React to message.

Starting from layer 159, the reaction will be sent from the peer specified using messages.saveDefaultSendAs.

messages.saveDefaultSendAs

-

Change the default peer that should be used when sending messages to a specific group

+

Change the default peer that should be used when sending messages, reactions, poll votes to a specific group

diff --git a/data/web/blogfork.telegram.org/constructor/messages.botApp.html b/data/web/blogfork.telegram.org/constructor/messages.botApp.html index fa223ccd2c..1d010fd2bd 100644 --- a/data/web/blogfork.telegram.org/constructor/messages.botApp.html +++ b/data/web/blogfork.telegram.org/constructor/messages.botApp.html @@ -4,10 +4,10 @@ messages.botApp - + - + @@ -42,7 +42,7 @@

messages.botApp

-

Contains information about a named bot web app

+

Contains information about a direct link Mini App

diff --git a/data/web/blogfork.telegram.org/constructor/messages.searchCounter.html b/data/web/blogfork.telegram.org/constructor/messages.searchCounter.html index be49fbbccd..96918f3166 100644 --- a/data/web/blogfork.telegram.org/constructor/messages.searchCounter.html +++ b/data/web/blogfork.telegram.org/constructor/messages.searchCounter.html @@ -92,7 +92,7 @@

messages.SearchCounter

Related pages

messages.search

-

Returns found messages

+

Search for messages.

diff --git a/data/web/blogfork.telegram.org/constructor/messages.transcribedAudio.html b/data/web/blogfork.telegram.org/constructor/messages.transcribedAudio.html index c7e3957c8d..c758780786 100644 --- a/data/web/blogfork.telegram.org/constructor/messages.transcribedAudio.html +++ b/data/web/blogfork.telegram.org/constructor/messages.transcribedAudio.html @@ -86,6 +86,16 @@ string Transcripted text + +trial_remains_num +flags.1?int +For non-Premium users, this flag will be set, indicating the remaining transcriptions in the free trial period. + + +trial_remains_until_date +flags.1?int +For non-Premium users, this flag will be set, indicating the date when the trial_remains_num counter will be reset to the maximum value of transcribe_audio_trial_weekly_number. +

Type

@@ -93,6 +103,10 @@

Related pages

updateTranscribedAudio

A pending voice message transcription » initiated with messages.transcribeAudio was updated.

+

Telegram Premium

+

Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.

+

Client configuration

+

The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.

Voice message transcription

How to transcribe voice messages.

diff --git a/data/web/blogfork.telegram.org/constructor/poll.html b/data/web/blogfork.telegram.org/constructor/poll.html index e5a194850c..bd17e0e080 100644 --- a/data/web/blogfork.telegram.org/constructor/poll.html +++ b/data/web/blogfork.telegram.org/constructor/poll.html @@ -122,7 +122,8 @@

Poll

Related pages

messages.sendVote

-

Vote in a poll

+

Vote in a poll

+

Starting from layer 159, the vote will be sent from the peer specified using messages.saveDefaultSendAs.

diff --git a/data/web/blogfork.telegram.org/constructor/pollResults.html b/data/web/blogfork.telegram.org/constructor/pollResults.html index c2893954b0..72314609e8 100644 --- a/data/web/blogfork.telegram.org/constructor/pollResults.html +++ b/data/web/blogfork.telegram.org/constructor/pollResults.html @@ -88,7 +88,7 @@ recent_voters -flags.3?Vector<long> +flags.3?Vector<Peer> IDs of the last users that recently voted in the poll diff --git a/data/web/blogfork.telegram.org/constructor/requestPeerTypeUser.html b/data/web/blogfork.telegram.org/constructor/requestPeerTypeUser.html index 447ade96a1..55d3a5787b 100644 --- a/data/web/blogfork.telegram.org/constructor/requestPeerTypeUser.html +++ b/data/web/blogfork.telegram.org/constructor/requestPeerTypeUser.html @@ -86,7 +86,8 @@

Type

RequestPeerType

Related pages

-

Telegram Premium

+

Telegram Premium

+

Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.

diff --git a/data/web/blogfork.telegram.org/constructor/sponsoredMessage.html b/data/web/blogfork.telegram.org/constructor/sponsoredMessage.html index 3797434eb4..48202593c6 100644 --- a/data/web/blogfork.telegram.org/constructor/sponsoredMessage.html +++ b/data/web/blogfork.telegram.org/constructor/sponsoredMessage.html @@ -112,6 +112,16 @@ Parameter for the bot start message if the sponsored chat is a chat with a bot. +webpage +flags.9?SponsoredWebPage +Sponsored website + + +app +flags.10?BotApp +Mini App » to open when the sponsored message is clicked. + + message string Sponsored message @@ -122,6 +132,11 @@ Message entities for styled text +button_text +flags.11?string +Text of the sponsored message button. + + sponsor_info flags.7?string If set, contains additional information about the sponsor to be shown along with the message. @@ -136,6 +151,8 @@

Type

SponsoredMessage

Related pages

+

Mini Apps on Telegram

+

Bots can offer users interactive HTML5 web apps to completely replace any website.

Styled text with message entities

How to create styled text with message entities

diff --git a/data/web/blogfork.telegram.org/constructor/stickerSet.html b/data/web/blogfork.telegram.org/constructor/stickerSet.html index c2bd9128a0..b10abc56ad 100644 --- a/data/web/blogfork.telegram.org/constructor/stickerSet.html +++ b/data/web/blogfork.telegram.org/constructor/stickerSet.html @@ -102,6 +102,16 @@ This is a custom emoji stickerset +text_color +flags.9?true +Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. + + +channel_emoji_status +flags.10?true +If set, this custom emoji stickerset can be used in channel emoji statuses. + + installed_date flags.0?int When was this stickerset installed @@ -161,6 +171,8 @@

Type

StickerSet

Related pages

+

Emoji status

+

Telegram allows users to set an emoticon or a custom emoji as status, to show next to their name in chats and profiles.

Deep links

Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.

messages.getCustomEmojiDocuments

diff --git a/data/web/blogfork.telegram.org/constructor/updateAttachMenuBots.html b/data/web/blogfork.telegram.org/constructor/updateAttachMenuBots.html index 45ce60b974..31f460dc3f 100644 --- a/data/web/blogfork.telegram.org/constructor/updateAttachMenuBots.html +++ b/data/web/blogfork.telegram.org/constructor/updateAttachMenuBots.html @@ -61,10 +61,10 @@

Type

Update

Related pages

-

Bot attachment menu entries

-

Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.

+

Bot attachment menu and side menu entries

+

Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

messages.getAttachMenuBots

-

Returns installed attachment menu bot web apps »

+

Returns installed attachment menu bot mini apps »

diff --git a/data/web/blogfork.telegram.org/constructor/updateNewAuthorization.html b/data/web/blogfork.telegram.org/constructor/updateNewAuthorization.html index 26fd765e58..97857a118e 100644 --- a/data/web/blogfork.telegram.org/constructor/updateNewAuthorization.html +++ b/data/web/blogfork.telegram.org/constructor/updateNewAuthorization.html @@ -4,24 +4,10 @@ updateNewAuthorization - + - + @@ -56,7 +42,7 @@ Identifier…">

updateNewAuthorization

-

Authorized to the current user's account through an unknown device.

+

A new session logged into the current user's account through an unknown device.

+

Update

+

Related pages

+

User Authorization

+

How to register a user's phone to start using the API.

+

Pagination in the API

+

How to fetch results from large lists of objects.

diff --git a/data/web/blogfork.telegram.org/constructor/updates.channelDifferenceTooLong.html b/data/web/blogfork.telegram.org/constructor/updates.channelDifferenceTooLong.html index 3e4e4da3af..29d858070c 100644 --- a/data/web/blogfork.telegram.org/constructor/updates.channelDifferenceTooLong.html +++ b/data/web/blogfork.telegram.org/constructor/updates.channelDifferenceTooLong.html @@ -4,10 +4,10 @@ updates.channelDifferenceTooLong - + - + diff --git a/data/web/blogfork.telegram.org/constructor/userFull.html b/data/web/blogfork.telegram.org/constructor/userFull.html index 18bd2a5524..a43edf84fa 100644 --- a/data/web/blogfork.telegram.org/constructor/userFull.html +++ b/data/web/blogfork.telegram.org/constructor/userFull.html @@ -112,6 +112,21 @@ Whether the real-time chat translation popup should be hidden. +stories_pinned_available +flags.26?true +Whether this user has some pinned stories. + + +blocked_my_stories_from +flags.27?true +Whether we've blocked this user, preventing them from seeing our stories ». + + +wallpaper_overridden +flags.28?true +Whether the other user has chosen a custom wallpaper for us using messages.setChatWallPaper and the for_both flag, see here » for more info. + + id long User ID @@ -201,6 +216,11 @@ flags.24?WallPaper Wallpaper to use in the private chat with the user. + +stories +flags.25?PeerStories +Active stories » +

Type

@@ -210,14 +230,20 @@

Telegram allows scheduling messages

Translation

Telegram allows translating chat messages: Telegram Premium users may even enable real-time chat translation.

+

Stories

+

Telegram users and channels can easily post and view stories through the API.

+

Blocklist

+

Working with the blocklist.

+

messages.setChatWallPaper

+

Set a custom wallpaper » in a specific private chat with another user.

+

Wallpapers

+

Telegram apps support generating, sharing and synchronizing chat backgrounds.

Pinned messages

Telegram allows pinning multiple messages on top of a specific chat.

Folders

Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.

Admin, banned, default rights

-

How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.

-

Wallpapers

-

Telegram apps support generating, sharing and synchronizing chat backgrounds.

+

How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.

diff --git a/data/web/blogfork.telegram.org/method/account.setPrivacy.html b/data/web/blogfork.telegram.org/method/account.setPrivacy.html index 97462019da..6e9afbddf9 100644 --- a/data/web/blogfork.telegram.org/method/account.setPrivacy.html +++ b/data/web/blogfork.telegram.org/method/account.setPrivacy.html @@ -71,12 +71,12 @@ key InputPrivacyKey -Peers to which the privacy rules apply +New privacy rule rules Vector<InputPrivacyRule> -New privacy rules +Peers to which the privacy rule will apply. diff --git a/data/web/blogfork.telegram.org/method/account.updateProfile.html b/data/web/blogfork.telegram.org/method/account.updateProfile.html index 7984e54dea..7335608a2a 100644 --- a/data/web/blogfork.telegram.org/method/account.updateProfile.html +++ b/data/web/blogfork.telegram.org/method/account.updateProfile.html @@ -109,11 +109,6 @@ About string too long. -403 -CHAT_WRITE_FORBIDDEN -You can't write in this chat. - - 400 FIRSTNAME_INVALID The first name is invalid. diff --git a/data/web/blogfork.telegram.org/method/account.updateStatus.html b/data/web/blogfork.telegram.org/method/account.updateStatus.html index 3ac8afea2d..b825b34098 100644 --- a/data/web/blogfork.telegram.org/method/account.updateStatus.html +++ b/data/web/blogfork.telegram.org/method/account.updateStatus.html @@ -78,23 +78,6 @@

Result

Bool

-

Possible errors

- - - - - - - - - - - - - - - -
CodeTypeDescription
403CHAT_WRITE_FORBIDDENYou can't write in this chat.

Related pages

boolTrue

The constructor can be interpreted as a booleantrue value.

diff --git a/data/web/blogfork.telegram.org/method/channels.checkUsername.html b/data/web/blogfork.telegram.org/method/channels.checkUsername.html index 3f88de3bc5..1c618a0cf4 100644 --- a/data/web/blogfork.telegram.org/method/channels.checkUsername.html +++ b/data/web/blogfork.telegram.org/method/channels.checkUsername.html @@ -115,6 +115,16 @@ 400 +MSG_ID_INVALID +Invalid message ID provided. + + +400 +PEER_ID_INVALID +The provided peer id is invalid. + + +400 USERNAME_INVALID The provided username is not valid. diff --git a/data/web/blogfork.telegram.org/method/channels.createChannel.html b/data/web/blogfork.telegram.org/method/channels.createChannel.html index ed5e480f31..4f4af27c53 100644 --- a/data/web/blogfork.telegram.org/method/channels.createChannel.html +++ b/data/web/blogfork.telegram.org/method/channels.createChannel.html @@ -112,12 +112,12 @@ geo_point flags.2?InputGeoPoint -Geogroup location +Geogroup location, see here » for more info on geogroups. address flags.2?string -Geogroup address +Geogroup address, see here » for more info on geogroups. ttl_period @@ -140,6 +140,11 @@ 400 +ADDRESS_INVALID +The specified geopoint address is invalid. + + +400 CHANNELS_ADMIN_LOCATED_TOO_MUCH The user has reached the limit of public geogroups. @@ -154,11 +159,21 @@ Chat about too long. +500 +CHAT_INVALID +Invalid chat. + + 400 CHAT_TITLE_EMPTY No chat title provided. +400 +TTL_PERIOD_INVALID +The specified TTL period is invalid. + + 406 USER_RESTRICTED You're spamreported, you can't create channels or chats. @@ -172,6 +187,8 @@

Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ».

Forums

Telegram allows creating forums with multiple distinct topics.

+

Nearby users&chats

+

How to work with geolocation-based features like geochats and the nearby users feature.

messages.setDefaultHistoryTTL

Changes the default value of the Time-To-Live setting, applied to all new chats.

diff --git a/data/web/blogfork.telegram.org/method/channels.getLeftChannels.html b/data/web/blogfork.telegram.org/method/channels.getLeftChannels.html index cffa28fd03..659996cb56 100644 --- a/data/web/blogfork.telegram.org/method/channels.getLeftChannels.html +++ b/data/web/blogfork.telegram.org/method/channels.getLeftChannels.html @@ -4,10 +4,10 @@ channels.getLeftChannels - + - + @@ -42,7 +42,7 @@

channels.getLeftChannels

-

Get a list of channels/supergroups we left

+

Get a list of channels/supergroups we left, requires a takeout session, see here » for more info.

+

How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.

+

Takeout API

+

Telegram's API allows users to export all of their information through the takeout API.

diff --git a/data/web/blogfork.telegram.org/method/channels.reportSpam.html b/data/web/blogfork.telegram.org/method/channels.reportSpam.html index a0bf50d59f..07e403f169 100644 --- a/data/web/blogfork.telegram.org/method/channels.reportSpam.html +++ b/data/web/blogfork.telegram.org/method/channels.reportSpam.html @@ -115,6 +115,11 @@ 400 +MSG_ID_INVALID +Invalid message ID provided. + + +400 USER_ID_INVALID The provided user ID is invalid. diff --git a/data/web/blogfork.telegram.org/method/channels.setStickers.html b/data/web/blogfork.telegram.org/method/channels.setStickers.html index 940b4f6f39..bae668732a 100644 --- a/data/web/blogfork.telegram.org/method/channels.setStickers.html +++ b/data/web/blogfork.telegram.org/method/channels.setStickers.html @@ -100,6 +100,11 @@ 400 +CHAT_ID_INVALID +The provided chat id is invalid. + + +400 PARTICIPANTS_TOO_FEW Not enough participants. diff --git a/data/web/blogfork.telegram.org/method/channels.toggleJoinRequest.html b/data/web/blogfork.telegram.org/method/channels.toggleJoinRequest.html index 3c69bace78..7cb6fdc4a1 100644 --- a/data/web/blogfork.telegram.org/method/channels.toggleJoinRequest.html +++ b/data/web/blogfork.telegram.org/method/channels.toggleJoinRequest.html @@ -105,13 +105,18 @@ 400 +CHAT_ADMIN_REQUIRED +You must be an admin in this chat to do this. + + +400 CHAT_ID_INVALID The provided chat id is invalid. 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 400 diff --git a/data/web/blogfork.telegram.org/method/channels.toggleUsername.html b/data/web/blogfork.telegram.org/method/channels.toggleUsername.html index 84627fe94b..cc4f75d1e1 100644 --- a/data/web/blogfork.telegram.org/method/channels.toggleUsername.html +++ b/data/web/blogfork.telegram.org/method/channels.toggleUsername.html @@ -100,6 +100,16 @@ 400 +CHANNEL_PRIVATE +You haven't joined this channel/supergroup. + + +400 +CHAT_ADMIN_REQUIRED +You must be an admin in this chat to do this. + + +400 USERNAMES_ACTIVE_TOO_MUCH The maximum number of active usernames was reached. diff --git a/data/web/blogfork.telegram.org/method/contacts.acceptContact.html b/data/web/blogfork.telegram.org/method/contacts.acceptContact.html index 41871a9c28..725583fd05 100644 --- a/data/web/blogfork.telegram.org/method/contacts.acceptContact.html +++ b/data/web/blogfork.telegram.org/method/contacts.acceptContact.html @@ -4,10 +4,10 @@ contacts.acceptContact - + - + @@ -42,7 +42,7 @@

contacts.acceptContact

-

If the peer settings of a new user allow us to add them as contact, add that user as contact

+

If the add contact action bar is active, add that user as contact

+

Action bar

+

Sometimes, when interacting with Telegram users via private or secret chats, an action bar must be shown on top of the chat, offering convenient action buttons or notices regarding the user.

diff --git a/data/web/blogfork.telegram.org/method/folders.editPeerFolders.html b/data/web/blogfork.telegram.org/method/folders.editPeerFolders.html index e47cf66ba4..790bfcc02d 100644 --- a/data/web/blogfork.telegram.org/method/folders.editPeerFolders.html +++ b/data/web/blogfork.telegram.org/method/folders.editPeerFolders.html @@ -95,6 +95,11 @@ 400 +CHANNEL_PRIVATE +You haven't joined this channel/supergroup. + + +400 CHAT_ID_INVALID The provided chat id is invalid. diff --git a/data/web/blogfork.telegram.org/method/messages.editChatAbout.html b/data/web/blogfork.telegram.org/method/messages.editChatAbout.html index 9025cb0ccb..daab5d9583 100644 --- a/data/web/blogfork.telegram.org/method/messages.editChatAbout.html +++ b/data/web/blogfork.telegram.org/method/messages.editChatAbout.html @@ -126,7 +126,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 403 diff --git a/data/web/blogfork.telegram.org/method/messages.getDialogs.html b/data/web/blogfork.telegram.org/method/messages.getDialogs.html index 8bbfea239a..041aafa40c 100644 --- a/data/web/blogfork.telegram.org/method/messages.getDialogs.html +++ b/data/web/blogfork.telegram.org/method/messages.getDialogs.html @@ -93,7 +93,7 @@ offset_id int -Offsets for pagination, for more info click here +Offsets for pagination, for more info click here (top_message ID used for pagination) offset_peer diff --git a/data/web/blogfork.telegram.org/method/messages.getMessageReactionsList.html b/data/web/blogfork.telegram.org/method/messages.getMessageReactionsList.html index 30f63bbfd3..1f19f1b262 100644 --- a/data/web/blogfork.telegram.org/method/messages.getMessageReactionsList.html +++ b/data/web/blogfork.telegram.org/method/messages.getMessageReactionsList.html @@ -86,12 +86,12 @@ reaction flags.0?Reaction -Get only reactions of this type (UTF8 emoji) +Get only reactions of this type offset flags.1?string -Offset (typically taken from the next_offset field of the returned messages.MessageReactionsList) +Offset for pagination (taken from the next_offset field of the returned messages.MessageReactionsList); empty in the first request. limit @@ -115,7 +115,7 @@ 403 BROADCAST_FORBIDDEN -Participants of polls in channels should stay anonymous. +Channel poll voters and reactions cannot be fetched to prevent deanonymization. 400 diff --git a/data/web/blogfork.telegram.org/method/messages.getPollVotes.html b/data/web/blogfork.telegram.org/method/messages.getPollVotes.html index 917e8c87ad..604bf32340 100644 --- a/data/web/blogfork.telegram.org/method/messages.getPollVotes.html +++ b/data/web/blogfork.telegram.org/method/messages.getPollVotes.html @@ -115,7 +115,7 @@ 403 BROADCAST_FORBIDDEN -Participants of polls in channels should stay anonymous. +Channel poll voters and reactions cannot be fetched to prevent deanonymization. 400 diff --git a/data/web/blogfork.telegram.org/method/messages.getSearchCounters.html b/data/web/blogfork.telegram.org/method/messages.getSearchCounters.html index b9e857a066..3d0f475a22 100644 --- a/data/web/blogfork.telegram.org/method/messages.getSearchCounters.html +++ b/data/web/blogfork.telegram.org/method/messages.getSearchCounters.html @@ -78,6 +78,11 @@ Peer where to search +saved_peer_id +flags.2?InputPeer +Search within the saved message dialog » with this ID. + + top_msg_id flags.0?int If set, consider only messages within the specified forum topic @@ -109,10 +114,12 @@

Related pages

+

Saved messages

+

The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.

Forums

Telegram allows creating forums with multiple distinct topics.

messages.search

-

Returns found messages

+

Search for messages.

diff --git a/data/web/blogfork.telegram.org/method/messages.getSearchResultsCalendar.html b/data/web/blogfork.telegram.org/method/messages.getSearchResultsCalendar.html index 6446d68bd2..b5efd54818 100644 --- a/data/web/blogfork.telegram.org/method/messages.getSearchResultsCalendar.html +++ b/data/web/blogfork.telegram.org/method/messages.getSearchResultsCalendar.html @@ -4,10 +4,10 @@ messages.getSearchResultsCalendar - + - + @@ -71,11 +71,21 @@ Can return partial results for the last returned day.

+flags +# +Flags, see TL conditional fields + + peer InputPeer Peer where to search +saved_peer_id +flags.2?InputPeer +Search within the saved message dialog » with this ID. + + filter MessagesFilter Message filter, inputMessagesFilterEmpty, inputMessagesFilterMyMentions filters are not supported by this method. @@ -112,6 +122,8 @@ Can return partial results for the last returned day.

Related pages

+

Saved messages

+

The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.

inputMessagesFilterEmpty

Filter is absent.

inputMessagesFilterMyMentions

diff --git a/data/web/blogfork.telegram.org/method/messages.getWebPage.html b/data/web/blogfork.telegram.org/method/messages.getWebPage.html index 965c2eb3c4..6da0b2333d 100644 --- a/data/web/blogfork.telegram.org/method/messages.getWebPage.html +++ b/data/web/blogfork.telegram.org/method/messages.getWebPage.html @@ -84,7 +84,7 @@

Result

-

WebPage

+

messages.WebPage

Possible errors

diff --git a/data/web/blogfork.telegram.org/method/messages.hideAllChatJoinRequests.html b/data/web/blogfork.telegram.org/method/messages.hideAllChatJoinRequests.html index d4d912bab9..67d96e0ad9 100644 --- a/data/web/blogfork.telegram.org/method/messages.hideAllChatJoinRequests.html +++ b/data/web/blogfork.telegram.org/method/messages.hideAllChatJoinRequests.html @@ -110,6 +110,16 @@ + + + + + + + + + + diff --git a/data/web/blogfork.telegram.org/method/messages.migrateChat.html b/data/web/blogfork.telegram.org/method/messages.migrateChat.html index 0039656c17..cfb29bf648 100644 --- a/data/web/blogfork.telegram.org/method/messages.migrateChat.html +++ b/data/web/blogfork.telegram.org/method/messages.migrateChat.html @@ -109,6 +109,11 @@ + + + + + diff --git a/data/web/blogfork.telegram.org/method/messages.requestWebView.html b/data/web/blogfork.telegram.org/method/messages.requestWebView.html index 17af7d598c..eb8d977943 100644 --- a/data/web/blogfork.telegram.org/method/messages.requestWebView.html +++ b/data/web/blogfork.telegram.org/method/messages.requestWebView.html @@ -4,10 +4,10 @@ messages.requestWebView - + - + @@ -42,7 +42,7 @@

messages.requestWebView

-

Open a bot web app, sending over user information after user confirmation.

+

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.

- + @@ -115,14 +115,9 @@ - - - - - - - - + + + @@ -133,18 +128,53 @@
400CHANNELS_TOO_MUCHYou have joined too many channels/supergroups.
400CHANNEL_INVALIDThe provided channel is invalid.
400 CHANNEL_PRIVATE You haven't joined this channel/supergroup.
The provided chat id is invalid.
500CHAT_INVALIDInvalid chat.
400 PEER_ID_INVALID The provided peer id is invalid.
start_param flags.3?stringIf the web app was opened from the attachment menu using a attachment menu deep link, start_param should contain the data from the startattach parameter.If the web app was opened from the attachment menu using a attachment menu deep link, start_param should contain the data from the startattach parameter.
theme_paramsShort name of the application; 0-64 English letters, digits, and underscores
reply_to_msg_idflags.0?intWhether the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent in reply to this message ID.
top_msg_idflags.9?intThis field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
reply_toflags.0?InputReplyToIf set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent in reply to the specified message or story.
send_as

Result

WebViewResult

+

Possible errors

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeTypeDescription
400BOT_INVALIDThis is not a valid bot.
400BOT_WEBVIEW_DISABLEDA webview cannot be opened in the specified conditions: emitted for example if from_bot_menu or url are set and peer is not the chat with the bot.
400INPUT_USER_DEACTIVATEDThe specified user was deleted.
400PEER_ID_INVALIDThe provided peer id is invalid.
400YOU_BLOCKED_USERYou blocked this user.

Related pages

Bot menu button

Bots can choose the behavior of the menu button shown next to the text input field.

messages.sendWebViewResultMessage

Terminate webview interaction started with messages.requestWebView, sending the specified message to the chat on behalf of the user.

-

Bot web apps

+

Mini Apps on Telegram

Bots can offer users interactive HTML5 web apps to completely replace any website.

Deep links

Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.

-

Forums

-

Telegram allows creating forums with multiple distinct topics.

-

Web Apps for Bots

+

Telegram Mini Apps

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.

diff --git a/data/web/blogfork.telegram.org/method/messages.sendMedia.html b/data/web/blogfork.telegram.org/method/messages.sendMedia.html index 401374998f..71a41be81a 100644 --- a/data/web/blogfork.telegram.org/method/messages.sendMedia.html +++ b/data/web/blogfork.telegram.org/method/messages.sendMedia.html @@ -105,19 +105,19 @@ Whether to move used stickersets to top, see here for more info on this flag » +invert_media +flags.16?true +If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + peer InputPeer Destination -reply_to_msg_id -flags.0?int -Message ID to which this message should reply to - - -top_msg_id -flags.9?int -This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic. +reply_to +flags.0?InputReplyTo +If set, indicates that the message should be sent in reply to the specified message or story. media @@ -250,6 +250,11 @@ 403 +CHAT_SEND_PLAIN_FORBIDDEN +You can't send non-media (text) messages in this chat. + + +403 CHAT_SEND_POLL_FORBIDDEN You can't send polls in this chat. @@ -355,6 +360,11 @@ 400 +MESSAGE_EMPTY +The provided message is empty. + + +400 MSG_ID_INVALID Invalid message ID provided. @@ -535,6 +545,16 @@ 400 +WEBPAGE_NOT_FOUND +A preview for the specified webpage url could not be generated. + + +400 +WEBPAGE_URL_INVALID +The specified webpage url is invalid. + + +400 YOU_BLOCKED_USER You blocked this user. @@ -544,8 +564,6 @@

Related pages

Stickers

Telegram clients support displaying static and animated stickers.

-

Forums

-

Telegram allows creating forums with multiple distinct topics.

Styled text with message entities

How to create styled text with message entities

Scheduled messages

diff --git a/data/web/blogfork.telegram.org/method/messages.sendWebViewData.html b/data/web/blogfork.telegram.org/method/messages.sendWebViewData.html index 11038aa84f..4c71f9347b 100644 --- a/data/web/blogfork.telegram.org/method/messages.sendWebViewData.html +++ b/data/web/blogfork.telegram.org/method/messages.sendWebViewData.html @@ -4,10 +4,10 @@ messages.sendWebViewData - + - + @@ -42,7 +42,7 @@

messages.sendWebViewData

-

Used by the user to relay data from an opened reply keyboard bot web app to the bot that owns it.

+

Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.

diff --git a/data/web/blogfork.telegram.org/method/messages.sendWebViewResultMessage.html b/data/web/blogfork.telegram.org/method/messages.sendWebViewResultMessage.html index 85345a644f..80eb87b439 100644 --- a/data/web/blogfork.telegram.org/method/messages.sendWebViewResultMessage.html +++ b/data/web/blogfork.telegram.org/method/messages.sendWebViewResultMessage.html @@ -102,7 +102,7 @@

Bots can use this method

Related pages

messages.requestWebView

-

Open a bot web app, sending over user information after user confirmation.

+

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.

diff --git a/data/web/blogfork.telegram.org/method/messages.setChatWallPaper.html b/data/web/blogfork.telegram.org/method/messages.setChatWallPaper.html index 7ef95a2ec3..67399b008e 100644 --- a/data/web/blogfork.telegram.org/method/messages.setChatWallPaper.html +++ b/data/web/blogfork.telegram.org/method/messages.setChatWallPaper.html @@ -80,6 +80,16 @@ Flags, see TL conditional fields +for_both +flags.3?true +Only for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user. + + +revert +flags.4?true +If we don't like the new wallpaper the other user of the chat has chosen for us using the for_both flag, we can re-set our previous wallpaper just on our side using this flag. + + peer InputPeer The private chat where the wallpaper will be set @@ -123,10 +133,17 @@ WALLPAPER_INVALID The specified wallpaper is invalid. + +400 +WALLPAPER_NOT_FOUND +The specified wallpaper could not be found. +

Bots can use this method

Related pages

+

Telegram Premium

+

Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.

Wallpapers

Telegram apps support generating, sharing and synchronizing chat backgrounds.

messageActionSetChatWallPaper

diff --git a/data/web/blogfork.telegram.org/method/messages.setDefaultHistoryTTL.html b/data/web/blogfork.telegram.org/method/messages.setDefaultHistoryTTL.html index 0e450ad796..fa8a30d616 100644 --- a/data/web/blogfork.telegram.org/method/messages.setDefaultHistoryTTL.html +++ b/data/web/blogfork.telegram.org/method/messages.setDefaultHistoryTTL.html @@ -78,6 +78,23 @@

Result

Bool

+

Possible errors

+ + + + + + + + + + + + + + + +
CodeTypeDescription
400TTL_PERIOD_INVALIDThe specified TTL period is invalid.

Bots can use this method

diff --git a/data/web/blogfork.telegram.org/method/messages.unpinAllMessages.html b/data/web/blogfork.telegram.org/method/messages.unpinAllMessages.html index 96899c194a..084d7f0938 100644 --- a/data/web/blogfork.telegram.org/method/messages.unpinAllMessages.html +++ b/data/web/blogfork.telegram.org/method/messages.unpinAllMessages.html @@ -105,7 +105,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. diff --git a/data/web/blogfork.telegram.org/method/phone.getGroupCall.html b/data/web/blogfork.telegram.org/method/phone.getGroupCall.html index c929c11244..a988875a7e 100644 --- a/data/web/blogfork.telegram.org/method/phone.getGroupCall.html +++ b/data/web/blogfork.telegram.org/method/phone.getGroupCall.html @@ -93,6 +93,11 @@ +403 +GROUPCALL_FORBIDDEN +The group call has already ended. + + 400 GROUPCALL_INVALID The specified group call is invalid. diff --git a/data/web/blogfork.telegram.org/method/phone.joinGroupCall.html b/data/web/blogfork.telegram.org/method/phone.joinGroupCall.html index bb1489f252..66e75eba5e 100644 --- a/data/web/blogfork.telegram.org/method/phone.joinGroupCall.html +++ b/data/web/blogfork.telegram.org/method/phone.joinGroupCall.html @@ -102,7 +102,7 @@ invite_hash flags.1?string -The invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat. +The invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat. params diff --git a/data/web/blogfork.telegram.org/method/photos.getUserPhotos.html b/data/web/blogfork.telegram.org/method/photos.getUserPhotos.html index 7c2f0e9358..b218cb5a20 100644 --- a/data/web/blogfork.telegram.org/method/photos.getUserPhotos.html +++ b/data/web/blogfork.telegram.org/method/photos.getUserPhotos.html @@ -82,7 +82,7 @@ max_id long -If a positive value was transferred, the method will return only photos with IDs less than the set one +If a positive value was transferred, the method will return only photos with IDs less than the set one. This parameter is often useful when refetching file references », as in conjuction with limit=1 and offset=-1 the photo object with the id specified in max_id can be fetched. limit @@ -120,7 +120,12 @@ -

Bots can use this method

+

Bots can use this method

+

Related pages

+

File references

+

How to handle file references.

+

photo

+

Photo

diff --git a/data/web/blogfork.telegram.org/method/photos.uploadContactProfilePhoto.html b/data/web/blogfork.telegram.org/method/photos.uploadContactProfilePhoto.html index da0a81bb88..d290c0c393 100644 --- a/data/web/blogfork.telegram.org/method/photos.uploadContactProfilePhoto.html +++ b/data/web/blogfork.telegram.org/method/photos.uploadContactProfilePhoto.html @@ -4,10 +4,10 @@ photos.uploadContactProfilePhoto - + - + @@ -125,6 +125,11 @@ 400 +CONTACT_MISSING +The specified user is not a contact. + + +400 USER_ID_INVALID The provided user ID is invalid. diff --git a/data/web/blogfork.telegram.org/method/upload.reuploadCdnFile.html b/data/web/blogfork.telegram.org/method/upload.reuploadCdnFile.html index a3bb078cf4..d06e2b01d2 100644 --- a/data/web/blogfork.telegram.org/method/upload.reuploadCdnFile.html +++ b/data/web/blogfork.telegram.org/method/upload.reuploadCdnFile.html @@ -92,6 +92,11 @@ +400 +CDN_METHOD_INVALID +You can't call this method in a CDN DC. + + 500 CDN_UPLOAD_TIMEOUT A server-side timeout occurred while reuploading the file to the CDN DC. diff --git a/data/web/blogfork.telegram.org/method/upload.saveFilePart.html b/data/web/blogfork.telegram.org/method/upload.saveFilePart.html index 131b8aa279..78c449c1cf 100644 --- a/data/web/blogfork.telegram.org/method/upload.saveFilePart.html +++ b/data/web/blogfork.telegram.org/method/upload.saveFilePart.html @@ -82,7 +82,7 @@ bytes bytes -Binary data, contend of a part +Binary data, content of a part diff --git a/data/web/blogfork.telegram.org/method/users.getFullUser.html b/data/web/blogfork.telegram.org/method/users.getFullUser.html index 3c2db61461..e851ea6a8e 100644 --- a/data/web/blogfork.telegram.org/method/users.getFullUser.html +++ b/data/web/blogfork.telegram.org/method/users.getFullUser.html @@ -89,6 +89,11 @@ 400 +CHANNEL_INVALID +The provided channel is invalid. + + +400 CHANNEL_PRIVATE You haven't joined this channel/supergroup. @@ -99,6 +104,11 @@ 400 +USERNAME_OCCUPIED +The provided username is already occupied. + + +400 USER_ID_INVALID The provided user ID is invalid. diff --git a/data/web/blogfork.telegram.org/mtproto/mtproto-transports.html b/data/web/blogfork.telegram.org/mtproto/mtproto-transports.html index de83d7d052..9ce1658aac 100644 --- a/data/web/blogfork.telegram.org/mtproto/mtproto-transports.html +++ b/data/web/blogfork.telegram.org/mtproto/mtproto-transports.html @@ -83,16 +83,35 @@ OR +-+---+----...----+

Before sending anything into the underlying socket (see transports), the client must first send 0xef as the first byte (the server will not send 0xef as the first byte in the first reply).
Then, payloads are wrapped in the following envelope:

+

If the packet length divided by four is smaller than 127:

-

If the packet length divided by four is bigger than or equal to 127 (>= 0x7f), the following envelope must be used, instead:

+

If the packet length divided by four is bigger than or equal to 127, the following envelope must be used, instead:

+

Quick ACK » may be enabled for this transport.

+

To request a quick ACK from the server for an encrypted MTProto payload, use the following envelope for outgoing messages, instead of the one specified above.

+

If the packet length divided by four is smaller than 127:

+ +

If the packet length divided by four is bigger than or equal to 127, the following envelope must be used, instead:

+ +

The server will send quick ACK tokens by bswapping them (i.e. inverting the order of the 4 bytes of the ACK token) and sending them as a standalone 4-byte packet without a length header.

+
+----+
+|dcba|
++----+
+

These quick ACK packets can be easily distinguished from normal abridged packets because the first byte will always have the most-significant bit set (because quick ACK tokens have the most-significant bit of the last byte set, and since they are bswapped the last byte will come first), and the length/header of normal payload packets coming from the server is always less than or equal to 127 (thus the most-significant bit is not set for normal payloads).

Intermediate

In case 4-byte data alignment is needed, an intermediate version of the original protocol may be used.

+

Quick ACK » may be enabled for this transport.

+

To request a quick ACK from the server for an encrypted MTProto payload, add 0x80000000 to the len field before encoding it (equivalent to doing len = len | (1 << 31), i.e. set the most-significant bit of the length).

+

The server will send quick ACK tokens as a standalone 4-byte packet without a length header.

+
+----+
+|abcd|
++----+
+

These quick ACK packets can be easily distinguished from normal intermediate packets because quick ACK tokens always have the most-significant bit of the last byte set, and trying to decode an ACK token as a little-endian 32-bit integer will always yield a value bigger than or equal to 0x80000000, which can never be a valid packet length.

Padded intermediate

Padded version of the intermediate protocol, to use with obfuscation enabled to bypass ISP blocks.

+

Quick ACK » may be enabled for this transport.

+

To request a quick ACK from the server for an encrypted MTProto payload, add 0x80000000 to the len field before encoding it (equivalent to doing len = len | (1 << 31), i.e. set the most-significant bit of the length).

+

The server will send quick ACK tokens as a standalone 8 to 16-byte packet (excluding the length of the packet itself, encoded as usual), containing a 4-byte header with all bits set, followed by the ACK token (abcd), followed by 0 to 8 random padding bytes.

+
+----+----+----+----...----+
+|tlen|FFFF|abcd|  padding  |
++----+----+----+----...----+
+

These quick ACK packets can be easily distinguished from normal intermediate padded packets because their length will be always smaller than or equal to 16, smaller than any MTProto packet.
+They can be distinguished from transport errors because the first 4 bytes of the payload are equal to 0xFFFFFFFF, not a valid transport error.

Full

The basic MTProto transport protocol

If the user cannot access their email address, an email reset may be requested using auth.resetLoginEmail.

To change the login email after login, pass emailVerifyPurposeLoginChange as purpose, following the exact same Google ID/Apple ID/email code login flow as above: on success, the account.verifyEmail method will return an account.emailVerified constructor.

-

Sign in/sign up

+

Sign in/sign up

When user enters verification code, the auth.signIn method must be used to validate it and possibly sign user in.

If the code was entered correctly, but the method returns auth.authorizationSignUpRequired, it means that account with this phone number doesn't exist yet: user needs to provide basic information, accept terms of service and then the new user registration method (auth.signUp) must be invoked.

2FA

When trying to sign in using auth.signIn, an error 400 SESSION_PASSWORD_NEEDED may be returned, if the user has two-factor authentication enabled. In this case, instructions for SRP 2FA authentication must be followed.

To set up two-factor authorization on an already authorized account, follow the SRP 2FA authentication docs.

-

Test Accounts

+

Confirming login

+
authorization#ad01d61d flags:# current:flags.0?true official_app:flags.1?true password_pending:flags.2?true encrypted_requests_disabled:flags.3?true call_requests_disabled:flags.4?true unconfirmed:flags.5?true hash:long device_model:string platform:string system_version:string api_id:int app_name:string app_version:string date_created:int date_active:int ip:string country:string region:string = Authorization;
+
+account.authorizations#4bff8ea0 authorization_ttl_days:int authorizations:Vector<Authorization> = account.Authorizations;
+
+updateNewAuthorization#8951abef flags:# unconfirmed:flags.0?true hash:long date:flags.0?int device:flags.0?string location:flags.0?string = Update;
+
+---functions---
+
+account.getAuthorizations#e320c158 = account.Authorizations;
+
+account.changeAuthorizationSettings#40f48462 flags:# confirmed:flags.3?true hash:long encrypted_requests_disabled:flags.0?Bool call_requests_disabled:flags.1?Bool = Bool;
+
+account.resetAuthorization#df77f3bc hash:long = Bool;
+

When logging in, other logged-in sessions will receive an updateNewAuthorization update.
+If the unconfirmed flag is set, clients should display a notification, asking the user if they recognize the session.

+

If the user clicks on the Yes button, invoke account.changeAuthorizationSettings with the new session's hash and the confirmed flag set, confirming the specified session.

+

If the user clicks on the No button, invoke account.resetAuthorization with the new session's hash, logging out the specified session.

+

If no action is taken by the user, the session will be autoconfirmed authorization_autoconfirm_period seconds after login (see the associated client configuration parameter »).

+

Invalidating login codes

+

Telegram's servers will automatically invalidate login codes if they are sent by the user to another Telegram chat, either by forwarding them or by sending them inside of a message: however, clients should also manually and immediately invalidate login codes if the user attempts to screenshot or forward a message sent by the login notification service user (ID 777000) containing login codes.

+

If an incoming message that is:

+
    +
  • Sent by the login notification service user (ID 777000)
  • +
  • AND is a text message (not a media)
  • +
  • AND contains one or more login codes, defined as a sequence of 5 to 7 decimal digits, optionally interleaved with or followed by any number of - characters (example implementation »)
  • +
+

Is either:

+
    +
  • Screenshotted by the user
  • +
  • OR forwarded by the user to any chat
  • +
+

account.invalidateSignInCodes should be invoked, passing the extracted login codes (excluding any - characeters).

+
---functions---
+
+account.invalidateSignInCodes#ca8ae8ba codes:Vector<string> = Bool;
+

Test Accounts

Each phone number is limited to only a certain amount of logins per day (e.g. 5, but this is subject to change) after which the API will return a FLOOD error until the next day. This might not be enough for testing the implementation of User Authorization flows in client applications.

-

There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on Test DCs (their IP addresses for TCP transport are available in API development tools panel after api_id was obtained, URI format for HTTPS/Websocket transport).

+

There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on Test DCs (their IP addresses for TCP transport are available in API development tools panel after api_id was obtained, URI format for HTTPS/WebSocket transport).

If you wish to emulate an application of a user associated with DC number X, it is sufficient to specify the phone number as 99966XYYYY, where YYYY are random numbers, when registering the user. A user like this would always get XXXXX as the login confirmation code (the DC number, repeated five times). Note that the value of X must be in the range of 1-3 because there are only 3 Test DCs. When the flood limit is reached for any particular test number, just choose another number (changing the YYYY random part).

Do not store any important or private information in the messages of such test accounts; anyone can make use of the simplified authorization mechanism – and we periodically wipe all information stored there.

Proceed with User Authorization flows in Production DCs only after you make sure everything works correctly on Test DCs first to avoid reaching flood limits.

diff --git a/data/web/core.telegram.org/api/nearby.html b/data/web/core.telegram.org/api/nearby.html index d0276d5c0a..8f27603af6 100644 --- a/data/web/core.telegram.org/api/nearby.html +++ b/data/web/core.telegram.org/api/nearby.html @@ -2,12 +2,12 @@ - Page not found + Nearby users&chats - - + + - + @@ -39,10 +39,44 @@
- -

Page not found

+ +

Nearby users&chats

-
The page has not been saved
+
+ +

How to work with geolocation-based features like geochats and the nearby users feature.

+

Fetching nearby users and geogroups

+
inputGeoPoint#48222faf flags:# lat:double long:double accuracy_radius:flags.0?int = InputGeoPoint;
+
+---functions---
+
+contacts.getLocated#d348bc44 flags:# background:flags.1?true geo_point:InputGeoPoint self_expires:flags.0?int = Updates;
+

Use contacts.getLocated to fetch a list of nearby users and groups.

+

Do not set any of the background, self_expires flags: only populate geo_point with the current geolocation of the user: a list of users and geochats located nearby will be returned (without publishing the current location of the user).

+

This functionality is useful for example to exchange contacts with a nearby Telegram user, or join a location-based group chat, see here » for more usecases.

+

See here » for more info on how to create a geogroup, and here » for more info on how to advertise our current location to other users.

+

Creating a geogroup

+
inputGeoPoint#48222faf flags:# lat:double long:double accuracy_radius:flags.0?int = InputGeoPoint;
+
+---functions---
+
+channels.createChannel#91006707 flags:# broadcast:flags.0?true megagroup:flags.1?true for_import:flags.3?true forum:flags.5?true title:string about:string geo_point:flags.2?InputGeoPoint address:flags.2?string ttl_period:flags.4?int = Updates;
+
+channels.editLocation#58e63f6d channel:InputChannel geo_point:InputGeoPoint address:string = Bool;
+

Pass a geo_point to channels.createChannel when creating a supergroup in order to create a geogroup associated to a geolocation, that will be returned to nearby users ».

+

A textual description of the location (1-64 UTF-8 chars) should also be passed in address.

+

Use channels.editLocation to change the group's location.

+

Advertising our current location

+
inputGeoPoint#48222faf flags:# lat:double long:double accuracy_radius:flags.0?int = InputGeoPoint;
+
+---functions---
+
+contacts.getLocated#d348bc44 flags:# background:flags.1?true geo_point:InputGeoPoint self_expires:flags.0?int = Updates;
+

Our current location may be advertised to other users using contacts.getLocated: in this case the self_expires flag must always be set.

+

This flag is used to specify the expiration TTL of the passed geolocation (i.e. the geolocation will expire after self_expires seconds); pass 0x7fffffff to disable expiry, 0 to make the current geolocation private.

+

The method will also return a list of nearby users and chats, but only if the passed expiration TTL is not equal to zero.
+Users may still fetch nearby users and chats without making their geolocation public by simply not setting the flag, see here » for more info.

+

While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so (or in any case before the expiration date specified with self_expires), while setting this flag: if the new location is more than 1 KM away from the previous one, or if the previous location is unknown, the background flag should be set.

@@ -109,8 +143,11 @@
- - + + + diff --git a/data/web/core.telegram.org/api/privacy.html b/data/web/core.telegram.org/api/privacy.html index d0276d5c0a..5ecf9ac399 100644 --- a/data/web/core.telegram.org/api/privacy.html +++ b/data/web/core.telegram.org/api/privacy.html @@ -2,12 +2,12 @@ - Page not found + Privacy - - + + - + @@ -39,10 +39,95 @@
- -

Page not found

+ +

Privacy

-
The page has not been saved
+
+ +

Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.

+

Privacy rules

+

Schema:

+
inputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule;
+inputPrivacyValueAllowAll#184b35ce = InputPrivacyRule;
+inputPrivacyValueAllowUsers#131cc67f users:Vector<InputUser> = InputPrivacyRule;
+inputPrivacyValueDisallowContacts#ba52007 = InputPrivacyRule;
+inputPrivacyValueDisallowAll#d66b66c9 = InputPrivacyRule;
+inputPrivacyValueDisallowUsers#90110467 users:Vector<InputUser> = InputPrivacyRule;
+inputPrivacyValueAllowChatParticipants#840649cf chats:Vector<long> = InputPrivacyRule;
+inputPrivacyValueDisallowChatParticipants#e94f0f86 chats:Vector<long> = InputPrivacyRule;
+inputPrivacyValueAllowCloseFriends#2f453e49 = InputPrivacyRule;
+
+privacyValueAllowContacts#fffe1bac = PrivacyRule;
+privacyValueAllowAll#65427b82 = PrivacyRule;
+privacyValueAllowUsers#b8905fb2 users:Vector<long> = PrivacyRule;
+privacyValueDisallowContacts#f888fa1a = PrivacyRule;
+privacyValueDisallowAll#8b73e763 = PrivacyRule;
+privacyValueDisallowUsers#e4621141 users:Vector<long> = PrivacyRule;
+privacyValueAllowChatParticipants#6b134e8e chats:Vector<long> = PrivacyRule;
+privacyValueDisallowChatParticipants#41c87565 chats:Vector<long> = PrivacyRule;
+privacyValueAllowCloseFriends#f7e8d89b = PrivacyRule;
+
+user#215c4438 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector<Username> stories_max_id:flags2.5?int color:flags2.8?PeerColor profile_color:flags2.9?PeerColor = User;
+
+---functions---
+
+contacts.editCloseFriends#ba6705f0 id:Vector<long> = Bool;
+

Privacy rules indicate who can or can't do something and are specified by a PrivacyRule, and its input counterpart InputPrivacyRule.
+InputPrivacyRule constructors are passed as input to methods that accept privacy rules, while PrivacyRules are contained in constructors returned by the API.

+

See the type page » for a full list of privacy rules and their descriptions.

+

One privacy rule in particular should be mentioned separately, (input)privacyValueAllowCloseFriends: this privacy rule, which can be used only when posting stories, refers exclusively to a list of "close friends", that can be modified using contacts.editCloseFriends, passing the full close friend list as a list of user IDs: note that only users in the contact list (even without a phone number) » can be added to the close friends list.

+

The current list of close friends can be checking which users in our contact list have the close_friend flag set in the associated user constructor, see here » for more info on how to fetch the contact list.

+

Privacy keys

+

Schema:

+
inputPrivacyKeyStatusTimestamp#4f96cb18 = InputPrivacyKey;
+inputPrivacyKeyChatInvite#bdfb0426 = InputPrivacyKey;
+inputPrivacyKeyPhoneCall#fabadc5f = InputPrivacyKey;
+inputPrivacyKeyPhoneP2P#db9e70d2 = InputPrivacyKey;
+inputPrivacyKeyForwards#a4dd4c08 = InputPrivacyKey;
+inputPrivacyKeyProfilePhoto#5719bacc = InputPrivacyKey;
+inputPrivacyKeyPhoneNumber#352dafa = InputPrivacyKey;
+inputPrivacyKeyAddedByPhone#d1219bdd = InputPrivacyKey;
+inputPrivacyKeyVoiceMessages#aee69d68 = InputPrivacyKey;
+inputPrivacyKeyAbout#3823cc40 = InputPrivacyKey;
+
+privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey;
+privacyKeyChatInvite#500e6dfa = PrivacyKey;
+privacyKeyPhoneCall#3d662b7b = PrivacyKey;
+privacyKeyPhoneP2P#39491cc8 = PrivacyKey;
+privacyKeyForwards#69ec56a3 = PrivacyKey;
+privacyKeyProfilePhoto#96151fed = PrivacyKey;
+privacyKeyPhoneNumber#d19ae46d = PrivacyKey;
+privacyKeyAddedByPhone#42ffd42b = PrivacyKey;
+privacyKeyVoiceMessages#697f414 = PrivacyKey;
+privacyKeyAbout#a486b761 = PrivacyKey;
+
+account.privacyRules#50a04e45 rules:Vector<PrivacyRule> chats:Vector<Chat> users:Vector<User> = account.PrivacyRules;
+
+updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = Update;
+
+---functions---
+
+account.getPrivacy#dadbc950 key:InputPrivacyKey = account.PrivacyRules;
+account.setPrivacy#c9f81ce8 key:InputPrivacyKey rules:Vector<InputPrivacyRule> = account.PrivacyRules;
+

Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a PrivacyKey constructor, and its input counterpart InputPrivacyKey.
+InputPrivacyKey constructors are passed as input to methods that accept privacy keys, while PrivacyKeys are contained in constructors returned by the API.

+

See the type page » for a full list of privacy keys and their descriptions.

+

Use account.getPrivacy to obtain the current set of rules associated to a key, and account.setPrivacy to change it.

+

Changing the privacy settings will trigger an updatePrivacy, sent to all currently logged in sessions of the current account.

+

Global privacy settings

+
globalPrivacySettings#734c4ccb flags:# archive_and_mute_new_noncontact_peers:flags.0?true keep_archived_unmuted:flags.1?true keep_archived_folders:flags.2?true = GlobalPrivacySettings;
+
+---functions---
+
+account.getGlobalPrivacySettings#eb2b4cf6 = GlobalPrivacySettings;
+account.setGlobalPrivacySettings#1edaaac2 settings:GlobalPrivacySettings = GlobalPrivacySettings;
+

Some global privacy settings can also be fetched and modified using account.getGlobalPrivacySettings and account.setGlobalPrivacySettings.

+

Global privacy settings are represented by the globalPrivacySettings constructor, that contains the following parameters:

+
    +
  • archive_and_mute_new_noncontact_peers - Whether to archive and mute new chats from non-contacts.
  • +
  • keep_archived_unmuted - Whether unmuted chats will be kept in the Archive chat list when they get a new message.
  • +
  • keep_archived_folders - Whether unmuted chats that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_archived_unmuted is set.
  • +
@@ -109,8 +194,11 @@
- - + + + diff --git a/data/web/core.telegram.org/api/sponsored-messages.html b/data/web/core.telegram.org/api/sponsored-messages.html index b2a0aefa8b..2744481b8f 100644 --- a/data/web/core.telegram.org/api/sponsored-messages.html +++ b/data/web/core.telegram.org/api/sponsored-messages.html @@ -5,11 +5,11 @@ Sponsored messages +sponsoredWebPage#3db8ec63 flags:# url:string site_name:string photo:flags.0?Photo = SponsoredWebPage;…"> +sponsoredWebPage#3db8ec63 flags:# url:string site_name:string photo:flags.0?Photo = SponsoredWebPage;…"> @@ -45,30 +45,58 @@ sponsoredMessage#fc25b828 flags:# recommended:flags.5?true show_peer_photo:flags

Sponsored messages

Related TL schema:

-
sponsoredMessage#fc25b828 flags:# recommended:flags.5?true show_peer_photo:flags.6?true random_id:bytes from_id:flags.3?Peer chat_invite:flags.4?ChatInvite chat_invite_hash:flags.4?string channel_post:flags.2?int start_param:flags.0?string message:string entities:flags.1?Vector<MessageEntity> sponsor_info:flags.7?string additional_info:flags.8?string = SponsoredMessage;
+
sponsoredWebPage#3db8ec63 flags:# url:string site_name:string photo:flags.0?Photo = SponsoredWebPage;
+
+sponsoredMessage#ed5383f7 flags:# recommended:flags.5?true show_peer_photo:flags.6?true random_id:bytes from_id:flags.3?Peer chat_invite:flags.4?ChatInvite chat_invite_hash:flags.4?string channel_post:flags.2?int start_param:flags.0?string webpage:flags.9?SponsoredWebPage app:flags.10?BotApp message:string entities:flags.1?Vector<MessageEntity> button_text:flags.11?string sponsor_info:flags.7?string additional_info:flags.8?string = SponsoredMessage;
+
 messages.sponsoredMessages#c9ee1d87 flags:# posts_between:flags.0?int messages:Vector<SponsoredMessage> chats:Vector<Chat> users:Vector<User> = messages.SponsoredMessages;
 
 ---functions---
 
 channels.getSponsoredMessages#ec210fbf channel:InputChannel = messages.SponsoredMessages;
-channels.viewSponsoredMessage#beaedb94 channel:InputChannel random_id:bytes = Bool;
+channels.viewSponsoredMessage#beaedb94 channel:InputChannel random_id:bytes = Bool; +channels.clickSponsoredMessage#18afbc93 channel:InputChannel random_id:bytes = Bool;

Getting sponsored messages

Each time the user opens a channel, channels.getSponsoredMessages must be called to receive sponsored messages available for this channel. The result must be cached for 5 minutes.

More about sponsored messages on Telegram

Displaying sponsored messages

-

Sponsored messages must be displayed below all other posts in the channel, after the user scrolls further down, past the last message. The promoted channel or bot specified in the from_id or chat_invite mutually exclusive fields must be displayed as the author of the message. The message should also contain one of the following buttons at the bottom:

+

Sponsored messages must be displayed below all other posts in the channel, after the user scrolls further down, past the last message. The promoted channel or bot specified in the from_id or chat_invite mutually exclusive fields must be displayed as the author of the message. The message should also contain a button at the bottom with one of the following labels:

    -
  • ==View Bot== — if a bot is being promoted. Tapping the button must open the chat with the bot. If start_param is specified, the app must use the deep linking mechanism to open the bot.
  • -
  • ==View Channel== — if a channel is being promoted. Tapping the button must open the channel using the from_id or by importing the chat_invite_hash invitation link hash ».
  • -
  • ==View Post== — if a channel is being promoted and channel_post is specified. Tapping the button must open the particular channel post.
  • +
  • View Bot — if a bot is being promoted. Tapping the button must open the chat with the bot. If start_param is specified, the app must use the deep linking mechanism to open the bot.
  • +
  • View Channel — if a channel is being promoted. Tapping the button must open the channel using the from_id or by importing the chat_invite_hash invitation link hash ».
  • +
  • View Post — if a channel is being promoted and channel_post is specified. Tapping the button must open the particular channel post.
  • +
  • Launch App — if the app flag is set, the specified Mini App should be opened when clicking on the button.
  • +
  • Open Website — If the webpage flag is set, clicking on the button should open the external website specified in webpage.url.
  • +
  • The contents of the button_text field — if the button_text field is set.

The message should be marked as "Recommended" instead of "Sponsored" if the recommended flag is set.

-

If the show_peer_photo flag is set, a profile photo bubble should be displayed for this message, like for messages sent in groups. The photo shown in the bubble is obtained either from the peer contained in from_id, or from chat_invite.

+

A profile photo bubble should be displayed for the sponsored message, like for messages sent in groups, using:

+
    +
  • app.photo, if the app flag is set, otherwise
  • +
  • webpage.photo, if the webpage flag is set, otherwise
  • +
  • The profile picture of the chat in chat_invite, if the chat_invite flag is set, otherwise
  • +
  • webpage.photo, if the webpage flag is set, otherwise
  • +
  • The profile picture of the peer in from_id, if the show_peer_photo flag is set.
  • +
+

A sender name should be displayed for the sponsored message, like for messages sent in groups, using:

+
    +
  • app.title, if the app flag is set, otherwise
  • +
  • webpage.site_name, if the webpage flag is set, otherwise
  • +
  • The title of the chat in chat_invite, if the chat_invite flag is set.
  • +

If the sponsor_info or additional_info flags are set, an additional "Sponsor info" menu item must be present in the message context menu (the menu that pops up when clicking on a button), that when clicked, displays the contents of the flags.

Counting sponsored message views

-

Once the entire text is shown on the screen (excluding the button), channels.viewSponsoredMessage must be called with the random_id of this sponsored message.

+

Once the entire text is shown on the screen (excluding the button), channels.viewSponsoredMessage must be called with the random_id of the sponsored message.

+

Clicking on sponsored messages

+

If the user either:

+
    +
  • Clicks on a link in the sponsored message
  • +
  • Opens a sponsored chat or a sponsored website via the associated button
  • +
  • Opens the sponsored chat via the sponsored message name, the sponsored message photo, or a mention in the sponsored message
  • +
+

channels.clickSponsoredMessage must be called with the random_id of the sponsored message.

Testing sponsored messages

For the channel https://t.me/SecretAdTestChannel the system will always return a sponsored message: promoting either a channel, a particular message in a channel, or a bot with a start parameter.


diff --git a/data/web/core.telegram.org/bots/features.html b/data/web/core.telegram.org/bots/features.html index 48a48f5cb0..62a129f780 100644 --- a/data/web/core.telegram.org/bots/features.html +++ b/data/web/core.telegram.org/bots/features.html @@ -391,7 +391,6 @@ width=44% />

Telegram also offers a dedicated test environment suitable for more advanced testing. Bots and users in this environment generally have more flexible restrictions – for example:

  • When working with the test environment, you may use HTTP links without TLS to test your Web Apps or Web Login.
  • -
  • You can test topics without needing 200 users in your group.

Flood limits are not raised in the test environment, and may at times be stricter. To minimize how this impacts your bot, you should make sure that it handles errors with retry policies and does not depend on hardcoded limit values.

diff --git a/data/web/core.telegram.org/constructor/appWebViewResultUrl.html b/data/web/core.telegram.org/constructor/appWebViewResultUrl.html index 1975648505..949e1d8807 100644 --- a/data/web/core.telegram.org/constructor/appWebViewResultUrl.html +++ b/data/web/core.telegram.org/constructor/appWebViewResultUrl.html @@ -4,10 +4,10 @@ appWebViewResultUrl - + - + @@ -42,7 +42,7 @@

appWebViewResultUrl

-

Contains the link that must be used to open a named bot web app.

+

Contains the link that must be used to open a direct link Mini App.

diff --git a/data/web/core.telegram.org/constructor/attachMenuBotIconColor.html b/data/web/core.telegram.org/constructor/attachMenuBotIconColor.html index a09310962f..20c47a96a3 100644 --- a/data/web/core.telegram.org/constructor/attachMenuBotIconColor.html +++ b/data/web/core.telegram.org/constructor/attachMenuBotIconColor.html @@ -4,10 +4,10 @@ attachMenuBotIconColor - + - + @@ -42,7 +42,7 @@

attachMenuBotIconColor

-

Represents an attachment menu icon color for bot web apps »

+

Represents an attachment menu icon color for bot mini apps »

+

Bot attachment menu and side menu entries

+

Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

diff --git a/data/web/core.telegram.org/constructor/auth.loginToken.html b/data/web/core.telegram.org/constructor/auth.loginToken.html index 7b424f9776..468f64df8c 100644 --- a/data/web/core.telegram.org/constructor/auth.loginToken.html +++ b/data/web/core.telegram.org/constructor/auth.loginToken.html @@ -69,7 +69,7 @@ expires int -Expiry date of QR code +Expiration date of QR code token diff --git a/data/web/core.telegram.org/constructor/channelFull.html b/data/web/core.telegram.org/constructor/channelFull.html index a3b6867521..117c583ca2 100644 --- a/data/web/core.telegram.org/constructor/channelFull.html +++ b/data/web/core.telegram.org/constructor/channelFull.html @@ -137,6 +137,16 @@ Whether the real-time chat translation popup should be hidden. +stories_pinned_available +flags2.5?true +Whether this user has some pinned stories. + + +view_forum_as_messages +flags2.6?true +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 the channels.toggleViewForumAsMessages method; invoking this method will update the value of this flag. + + id long ID of the channel @@ -311,6 +321,16 @@ flags.30?ChatReactions Allowed message reactions » + +stories +flags2.4?PeerStories +Channel stories + + +wallpaper +flags2.7?WallPaper +Wallpaper +

Type

@@ -326,6 +346,13 @@

Admins of supergroups with a certain number of members can choose to unleash the full proactive power of Telegram's own antispam algorithms – turning on the new Aggressive mode for the automated spam filters.

Translation

Telegram allows translating chat messages: Telegram Premium users may even enable real-time chat translation.

+

Stories

+

Telegram users and channels can easily post and view stories through the API.

+

Forums

+

Telegram allows creating forums with multiple distinct topics.

+

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.

Admin, banned, default rights

How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.

Channels, supergroups, gigagroups and basic groups

@@ -343,7 +370,9 @@

Invites

Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.

Message reactions

-

Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.

+

Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.

+

Wallpapers

+

Telegram apps support generating, sharing and synchronizing chat backgrounds.

diff --git a/data/web/core.telegram.org/constructor/chatInvite.html b/data/web/core.telegram.org/constructor/chatInvite.html index b759be174b..1c25bf97e2 100644 --- a/data/web/core.telegram.org/constructor/chatInvite.html +++ b/data/web/core.telegram.org/constructor/chatInvite.html @@ -97,6 +97,21 @@ Whether the join request » must be first approved by an administrator +verified +flags.7?true +Is this chat or channel verified by Telegram? + + +scam +flags.8?true +This chat is probably a scam + + +fake +flags.9?true +If set, this chat was reported by many users as a fake or scam: be careful when interacting with it. + + title string Chat/supergroup/channel title @@ -121,6 +136,11 @@ flags.4?Vector<User> A few of the participants that are in the group + +color +int +Profile color palette ID +

Type

@@ -129,7 +149,9 @@

Channels, supergroups, gigagroups and basic groups

How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.

Invites

-

Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.

+

Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.

+

Accent colors

+

Telegram users and channels can change the accent color and background pattern of their profile page and their messages!

diff --git a/data/web/core.telegram.org/constructor/exportedContactToken.html b/data/web/core.telegram.org/constructor/exportedContactToken.html index 5e570c08ea..f449427a49 100644 --- a/data/web/core.telegram.org/constructor/exportedContactToken.html +++ b/data/web/core.telegram.org/constructor/exportedContactToken.html @@ -74,7 +74,7 @@ expires int -Its expiry date +Its expiration date diff --git a/data/web/core.telegram.org/constructor/inputBotAppID.html b/data/web/core.telegram.org/constructor/inputBotAppID.html index 44c0459d3c..f9918015d0 100644 --- a/data/web/core.telegram.org/constructor/inputBotAppID.html +++ b/data/web/core.telegram.org/constructor/inputBotAppID.html @@ -4,10 +4,10 @@ inputBotAppID - + - + @@ -42,7 +42,7 @@

inputBotAppID

-

Used to fetch information about a named bot web app by its ID

+

Used to fetch information about a direct link Mini App by its ID

+

Contains information about a direct link Mini App.

diff --git a/data/web/core.telegram.org/constructor/inputBotAppShortName.html b/data/web/core.telegram.org/constructor/inputBotAppShortName.html index b3e904967c..538b443c8a 100644 --- a/data/web/core.telegram.org/constructor/inputBotAppShortName.html +++ b/data/web/core.telegram.org/constructor/inputBotAppShortName.html @@ -4,10 +4,10 @@ inputBotAppShortName - + - + @@ -42,7 +42,7 @@

inputBotAppShortName

-

Used to fetch information about a named bot web app by its short name

+

Used to fetch information about a direct link Mini App by its short name

diff --git a/data/web/core.telegram.org/constructor/messageActionWebViewDataSent.html b/data/web/core.telegram.org/constructor/messageActionWebViewDataSent.html index 6b1e5fcc41..7bc3576303 100644 --- a/data/web/core.telegram.org/constructor/messageActionWebViewDataSent.html +++ b/data/web/core.telegram.org/constructor/messageActionWebViewDataSent.html @@ -4,10 +4,10 @@ messageActionWebViewDataSent - + - + @@ -42,7 +42,7 @@

messageActionWebViewDataSent

-

Data from an opened reply keyboard bot web app was relayed to the bot that owns it (user side service message).

+

Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message).

Clients should display a service message with the text Data from the «$text» button was transferred to the bot.

diff --git a/data/web/core.telegram.org/constructor/messageActionWebViewDataSentMe.html b/data/web/core.telegram.org/constructor/messageActionWebViewDataSentMe.html index b5fde59ddf..d20dc9276e 100644 --- a/data/web/core.telegram.org/constructor/messageActionWebViewDataSentMe.html +++ b/data/web/core.telegram.org/constructor/messageActionWebViewDataSentMe.html @@ -4,10 +4,10 @@ messageActionWebViewDataSentMe - + - + @@ -42,7 +42,7 @@

messageActionWebViewDataSentMe

-

Data from an opened reply keyboard bot web app was relayed to the bot that owns it (bot side service message).

+

Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message).

diff --git a/data/web/core.telegram.org/constructor/messageFwdHeader.html b/data/web/core.telegram.org/constructor/messageFwdHeader.html index 4b193a522e..e43de13594 100644 --- a/data/web/core.telegram.org/constructor/messageFwdHeader.html +++ b/data/web/core.telegram.org/constructor/messageFwdHeader.html @@ -77,6 +77,11 @@ Whether this message was imported from a foreign chat service, click here for more info » +saved_out +flags.11?true +Only for messages forwarded to saved messages », set if the original message was outgoing (though the message may have been originally outgoing even if this flag is not set, if from_id points to the current user). + + from_id flags.0?Peer The ID of the user that originally sent the message @@ -104,12 +109,27 @@ saved_from_peer flags.4?Peer -Only for messages forwarded to the current user (inputPeerSelf), full info about the user/channel that originally sent the message +Only for messages forwarded to saved messages », contains the dialog where the message was originally sent. saved_from_msg_id flags.4?int -Only for messages forwarded to the current user (inputPeerSelf), ID of the message that was forwarded from the original user/channel +Only for messages forwarded to saved messages », contains the original ID of the message in saved_from_peer. + + +saved_from_id +flags.8?Peer +Only for forwarded messages reforwarded to saved messages », contains the sender of the original message (i.e. if user A sends a message, then user B forwards it somewhere, then user C saves it to saved messages, this field will contain the ID of user B and from_id will contain the ID of user A). + + +saved_from_name +flags.9?string +Only for forwarded messages from users with forward privacy enabled, sent by users with forward privacy enabled, reforwarded to saved messages », contains the sender of the original message (i.e. if user A (fwd privacy enabled) sends a message, then user B (fwd privacy enabled) forwards it somewhere, then user C saves it to saved messages, this field will contain the name of user B and from_name will contain the name of user A). + + +saved_date +flags.10?int +Only for forwarded messages reforwarded to saved messages », indicates when was the original message sent (i.e. if user A sends a message @ unixtime 1, then user B forwards it somewhere @ unixtime 2, then user C saves it to saved messages @ unixtime 3, this field will contain 2, date will contain 1 and the date of the containing message will contain 3). psa_type @@ -122,7 +142,11 @@

MessageFwdHeader

Related pages

Imported messages

-

Telegram allows importing messages and media from foreign chat apps.

+

Telegram allows importing messages and media from foreign chat apps.

+

Saved messages

+

The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.

+

message

+

A message

diff --git a/data/web/core.telegram.org/constructor/messageMediaDocument.html b/data/web/core.telegram.org/constructor/messageMediaDocument.html index b36f54b35e..1b7b1a9f46 100644 --- a/data/web/core.telegram.org/constructor/messageMediaDocument.html +++ b/data/web/core.telegram.org/constructor/messageMediaDocument.html @@ -82,11 +82,31 @@ Whether this media should be hidden behind a spoiler warning +video +flags.6?true +Whether this is a video. + + +round +flags.7?true +Whether this is a round video. + + +voice +flags.8?true +Whether this is a voice message. + + document flags.0?Document Attached document +alt_document +flags.5?Document +Currently only used for story videos, may contain an alternative version of the story video, explicitly encoded using H.264 (in MPEG4 transport) at a lower resolution than document. + + ttl_seconds flags.2?int Time to live of self-destructing document diff --git a/data/web/core.telegram.org/constructor/messageMediaWebPage.html b/data/web/core.telegram.org/constructor/messageMediaWebPage.html index 0c7cb412ae..bf8a2fbd9d 100644 --- a/data/web/core.telegram.org/constructor/messageMediaWebPage.html +++ b/data/web/core.telegram.org/constructor/messageMediaWebPage.html @@ -67,6 +67,31 @@ +flags +# +Flags, see TL conditional fields + + +force_large_media +flags.0?true +If set, specifies that a large media preview should be used. + + +force_small_media +flags.1?true +If set, specifies that a small media preview should be used. + + +manual +flags.3?true +If set, indicates that the URL used for the webpage preview was specified manually using inputMediaWebPage, and may not be related to any of the URLs specified in the message. + + +safe +flags.4?true +If set, the webpage can be opened directly without user confirmation; otherwise, user confirmation is required, showing the exact URL that will be opened. + + webpage WebPage Webpage preview @@ -74,7 +99,10 @@

Type

-

MessageMedia

+

MessageMedia

+

Related pages

+

inputMediaWebPage

+

Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message.

diff --git a/data/web/core.telegram.org/constructor/messages.botApp.html b/data/web/core.telegram.org/constructor/messages.botApp.html index fa223ccd2c..1d010fd2bd 100644 --- a/data/web/core.telegram.org/constructor/messages.botApp.html +++ b/data/web/core.telegram.org/constructor/messages.botApp.html @@ -4,10 +4,10 @@ messages.botApp - + - + @@ -42,7 +42,7 @@

messages.botApp

-

Contains information about a named bot web app

+

Contains information about a direct link Mini App

diff --git a/data/web/core.telegram.org/constructor/messages.searchCounter.html b/data/web/core.telegram.org/constructor/messages.searchCounter.html index be49fbbccd..96918f3166 100644 --- a/data/web/core.telegram.org/constructor/messages.searchCounter.html +++ b/data/web/core.telegram.org/constructor/messages.searchCounter.html @@ -92,7 +92,7 @@

messages.SearchCounter

Related pages

messages.search

-

Returns found messages

+

Search for messages.

diff --git a/data/web/core.telegram.org/constructor/messages.transcribedAudio.html b/data/web/core.telegram.org/constructor/messages.transcribedAudio.html index c7e3957c8d..c758780786 100644 --- a/data/web/core.telegram.org/constructor/messages.transcribedAudio.html +++ b/data/web/core.telegram.org/constructor/messages.transcribedAudio.html @@ -86,6 +86,16 @@ string Transcripted text + +trial_remains_num +flags.1?int +For non-Premium users, this flag will be set, indicating the remaining transcriptions in the free trial period. + + +trial_remains_until_date +flags.1?int +For non-Premium users, this flag will be set, indicating the date when the trial_remains_num counter will be reset to the maximum value of transcribe_audio_trial_weekly_number. +

Type

@@ -93,6 +103,10 @@

Related pages

updateTranscribedAudio

A pending voice message transcription » initiated with messages.transcribeAudio was updated.

+

Telegram Premium

+

Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.

+

Client configuration

+

The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.

Voice message transcription

How to transcribe voice messages.

diff --git a/data/web/core.telegram.org/constructor/pollResults.html b/data/web/core.telegram.org/constructor/pollResults.html index c2893954b0..72314609e8 100644 --- a/data/web/core.telegram.org/constructor/pollResults.html +++ b/data/web/core.telegram.org/constructor/pollResults.html @@ -88,7 +88,7 @@ recent_voters -flags.3?Vector<long> +flags.3?Vector<Peer> IDs of the last users that recently voted in the poll diff --git a/data/web/core.telegram.org/constructor/requestPeerTypeUser.html b/data/web/core.telegram.org/constructor/requestPeerTypeUser.html index 447ade96a1..55d3a5787b 100644 --- a/data/web/core.telegram.org/constructor/requestPeerTypeUser.html +++ b/data/web/core.telegram.org/constructor/requestPeerTypeUser.html @@ -86,7 +86,8 @@

Type

RequestPeerType

Related pages

-

Telegram Premium

+

Telegram Premium

+

Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.

diff --git a/data/web/core.telegram.org/constructor/sponsoredMessage.html b/data/web/core.telegram.org/constructor/sponsoredMessage.html index 3797434eb4..48202593c6 100644 --- a/data/web/core.telegram.org/constructor/sponsoredMessage.html +++ b/data/web/core.telegram.org/constructor/sponsoredMessage.html @@ -112,6 +112,16 @@ Parameter for the bot start message if the sponsored chat is a chat with a bot. +webpage +flags.9?SponsoredWebPage +Sponsored website + + +app +flags.10?BotApp +Mini App » to open when the sponsored message is clicked. + + message string Sponsored message @@ -122,6 +132,11 @@ Message entities for styled text +button_text +flags.11?string +Text of the sponsored message button. + + sponsor_info flags.7?string If set, contains additional information about the sponsor to be shown along with the message. @@ -136,6 +151,8 @@

Type

SponsoredMessage

Related pages

+

Mini Apps on Telegram

+

Bots can offer users interactive HTML5 web apps to completely replace any website.

Styled text with message entities

How to create styled text with message entities

diff --git a/data/web/core.telegram.org/constructor/stickerSet.html b/data/web/core.telegram.org/constructor/stickerSet.html index c2bd9128a0..b10abc56ad 100644 --- a/data/web/core.telegram.org/constructor/stickerSet.html +++ b/data/web/core.telegram.org/constructor/stickerSet.html @@ -102,6 +102,16 @@ This is a custom emoji stickerset +text_color +flags.9?true +Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. + + +channel_emoji_status +flags.10?true +If set, this custom emoji stickerset can be used in channel emoji statuses. + + installed_date flags.0?int When was this stickerset installed @@ -161,6 +171,8 @@

Type

StickerSet

Related pages

+

Emoji status

+

Telegram allows users to set an emoticon or a custom emoji as status, to show next to their name in chats and profiles.

Deep links

Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.

messages.getCustomEmojiDocuments

diff --git a/data/web/core.telegram.org/constructor/updateAttachMenuBots.html b/data/web/core.telegram.org/constructor/updateAttachMenuBots.html index 45ce60b974..31f460dc3f 100644 --- a/data/web/core.telegram.org/constructor/updateAttachMenuBots.html +++ b/data/web/core.telegram.org/constructor/updateAttachMenuBots.html @@ -61,10 +61,10 @@

Type

Update

Related pages

-

Bot attachment menu entries

-

Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.

+

Bot attachment menu and side menu entries

+

Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

messages.getAttachMenuBots

-

Returns installed attachment menu bot web apps »

+

Returns installed attachment menu bot mini apps »

diff --git a/data/web/core.telegram.org/constructor/updateReadMessagesContents.html b/data/web/core.telegram.org/constructor/updateReadMessagesContents.html index 6bec5288d1..848bade1f0 100644 --- a/data/web/core.telegram.org/constructor/updateReadMessagesContents.html +++ b/data/web/core.telegram.org/constructor/updateReadMessagesContents.html @@ -67,6 +67,11 @@ +flags +# +Flags, see TL conditional fields + + messages Vector<int> IDs of read messages @@ -81,6 +86,11 @@ int Number of events that were generated + +date +flags.0?int +When was the last message in messages marked as read. +

Type

diff --git a/data/web/core.telegram.org/constructor/webPageEmpty.html b/data/web/core.telegram.org/constructor/webPageEmpty.html index 0e2ceeae34..c6ac6f5838 100644 --- a/data/web/core.telegram.org/constructor/webPageEmpty.html +++ b/data/web/core.telegram.org/constructor/webPageEmpty.html @@ -67,10 +67,20 @@ +flags +# +Flags, see TL conditional fields + + id long Preview ID + +url +flags.0?string +URL of the webpage. +

Type

diff --git a/data/web/core.telegram.org/method/account.setPrivacy.html b/data/web/core.telegram.org/method/account.setPrivacy.html index 97462019da..6e9afbddf9 100644 --- a/data/web/core.telegram.org/method/account.setPrivacy.html +++ b/data/web/core.telegram.org/method/account.setPrivacy.html @@ -71,12 +71,12 @@ key InputPrivacyKey -Peers to which the privacy rules apply +New privacy rule rules Vector<InputPrivacyRule> -New privacy rules +Peers to which the privacy rule will apply. diff --git a/data/web/core.telegram.org/method/account.updateStatus.html b/data/web/core.telegram.org/method/account.updateStatus.html index 3ac8afea2d..b825b34098 100644 --- a/data/web/core.telegram.org/method/account.updateStatus.html +++ b/data/web/core.telegram.org/method/account.updateStatus.html @@ -78,23 +78,6 @@

Result

Bool

-

Possible errors

- - - - - - - - - - - - - - - -
CodeTypeDescription
403CHAT_WRITE_FORBIDDENYou can't write in this chat.

Related pages

boolTrue

The constructor can be interpreted as a booleantrue value.

diff --git a/data/web/core.telegram.org/method/auth.requestFirebaseSms.html b/data/web/core.telegram.org/method/auth.requestFirebaseSms.html index f54e677592..26ba81bb01 100644 --- a/data/web/core.telegram.org/method/auth.requestFirebaseSms.html +++ b/data/web/core.telegram.org/method/auth.requestFirebaseSms.html @@ -115,7 +115,6 @@ -

Bots can use this method

Related pages

auth.sendCode

Send the verification code for login

diff --git a/data/web/core.telegram.org/method/channels.checkUsername.html b/data/web/core.telegram.org/method/channels.checkUsername.html index 3f88de3bc5..1c618a0cf4 100644 --- a/data/web/core.telegram.org/method/channels.checkUsername.html +++ b/data/web/core.telegram.org/method/channels.checkUsername.html @@ -115,6 +115,16 @@ 400 +MSG_ID_INVALID +Invalid message ID provided. + + +400 +PEER_ID_INVALID +The provided peer id is invalid. + + +400 USERNAME_INVALID The provided username is not valid. diff --git a/data/web/core.telegram.org/method/channels.createChannel.html b/data/web/core.telegram.org/method/channels.createChannel.html index ed5e480f31..4f4af27c53 100644 --- a/data/web/core.telegram.org/method/channels.createChannel.html +++ b/data/web/core.telegram.org/method/channels.createChannel.html @@ -112,12 +112,12 @@ geo_point flags.2?InputGeoPoint -Geogroup location +Geogroup location, see here » for more info on geogroups. address flags.2?string -Geogroup address +Geogroup address, see here » for more info on geogroups. ttl_period @@ -140,6 +140,11 @@ 400 +ADDRESS_INVALID +The specified geopoint address is invalid. + + +400 CHANNELS_ADMIN_LOCATED_TOO_MUCH The user has reached the limit of public geogroups. @@ -154,11 +159,21 @@ Chat about too long. +500 +CHAT_INVALID +Invalid chat. + + 400 CHAT_TITLE_EMPTY No chat title provided. +400 +TTL_PERIOD_INVALID +The specified TTL period is invalid. + + 406 USER_RESTRICTED You're spamreported, you can't create channels or chats. @@ -172,6 +187,8 @@

Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ».

Forums

Telegram allows creating forums with multiple distinct topics.

+

Nearby users&chats

+

How to work with geolocation-based features like geochats and the nearby users feature.

messages.setDefaultHistoryTTL

Changes the default value of the Time-To-Live setting, applied to all new chats.

diff --git a/data/web/core.telegram.org/method/channels.editPhoto.html b/data/web/core.telegram.org/method/channels.editPhoto.html index dd61bef098..660747f70c 100644 --- a/data/web/core.telegram.org/method/channels.editPhoto.html +++ b/data/web/core.telegram.org/method/channels.editPhoto.html @@ -116,7 +116,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 403 @@ -135,6 +135,11 @@ 400 +IMAGE_PROCESS_FAILED +Failure while processing image. + + +400 PHOTO_CROP_SIZE_SMALL Photo is too small. @@ -148,6 +153,11 @@ PHOTO_INVALID Photo invalid. + +400 +STICKER_MIME_INVALID +The specified sticker MIME type is invalid. +

Bots can use this method

diff --git a/data/web/core.telegram.org/method/channels.getForumTopics.html b/data/web/core.telegram.org/method/channels.getForumTopics.html index 4b616d9945..857090b37b 100644 --- a/data/web/core.telegram.org/method/channels.getForumTopics.html +++ b/data/web/core.telegram.org/method/channels.getForumTopics.html @@ -86,22 +86,22 @@ offset_date int -Offsets for pagination, for more info click here +Offsets for pagination, for more info click here, date of the last message of the last found topic. Use 0 or any date in the future to get results from the last topic. offset_id int -Offsets for pagination, for more info click here +Offsets for pagination, for more info click here, ID of the last message of the last found topic (or initially 0). offset_topic int -Offsets for pagination, for more info click here +Offsets for pagination, for more info click here, ID of the last found topic (or initially 0). limit int -Maximum number of results to return, see pagination +Maximum number of results to return, see pagination. For optimal performance, the number of returned topics is chosen by the server and can be smaller than the specified limit. @@ -127,9 +127,13 @@ CHANNEL_INVALID The provided channel is invalid. + +400 +CHANNEL_PRIVATE +You haven't joined this channel/supergroup. + -

Bots can use this method

Related pages

Pagination in the API

How to fetch results from large lists of objects.

diff --git a/data/web/core.telegram.org/method/channels.getLeftChannels.html b/data/web/core.telegram.org/method/channels.getLeftChannels.html index cffa28fd03..659996cb56 100644 --- a/data/web/core.telegram.org/method/channels.getLeftChannels.html +++ b/data/web/core.telegram.org/method/channels.getLeftChannels.html @@ -4,10 +4,10 @@ channels.getLeftChannels - + - + @@ -42,7 +42,7 @@

channels.getLeftChannels

-

Get a list of channels/supergroups we left

+

Get a list of channels/supergroups we left, requires a takeout session, see here » for more info.

+

How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.

+

Takeout API

+

Telegram's API allows users to export all of their information through the takeout API.

diff --git a/data/web/core.telegram.org/method/channels.toggleJoinRequest.html b/data/web/core.telegram.org/method/channels.toggleJoinRequest.html index 3c69bace78..7cb6fdc4a1 100644 --- a/data/web/core.telegram.org/method/channels.toggleJoinRequest.html +++ b/data/web/core.telegram.org/method/channels.toggleJoinRequest.html @@ -105,13 +105,18 @@ 400 +CHAT_ADMIN_REQUIRED +You must be an admin in this chat to do this. + + +400 CHAT_ID_INVALID The provided chat id is invalid. 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 400 diff --git a/data/web/core.telegram.org/method/channels.toggleUsername.html b/data/web/core.telegram.org/method/channels.toggleUsername.html index 84627fe94b..cc4f75d1e1 100644 --- a/data/web/core.telegram.org/method/channels.toggleUsername.html +++ b/data/web/core.telegram.org/method/channels.toggleUsername.html @@ -100,6 +100,16 @@ 400 +CHANNEL_PRIVATE +You haven't joined this channel/supergroup. + + +400 +CHAT_ADMIN_REQUIRED +You must be an admin in this chat to do this. + + +400 USERNAMES_ACTIVE_TOO_MUCH The maximum number of active usernames was reached. diff --git a/data/web/core.telegram.org/method/chatlists.checkChatlistInvite.html b/data/web/core.telegram.org/method/chatlists.checkChatlistInvite.html index c38dd2d229..fb06385aa4 100644 --- a/data/web/core.telegram.org/method/chatlists.checkChatlistInvite.html +++ b/data/web/core.telegram.org/method/chatlists.checkChatlistInvite.html @@ -93,6 +93,11 @@ INVITE_SLUG_EMPTY The specified invite slug is empty. + +400 +INVITE_SLUG_EXPIRED +The specified chat folder link has expired. +

Bots can use this method

diff --git a/data/web/core.telegram.org/method/chatlists.getChatlistUpdates.html b/data/web/core.telegram.org/method/chatlists.getChatlistUpdates.html index cd23b60bde..9a71e71962 100644 --- a/data/web/core.telegram.org/method/chatlists.getChatlistUpdates.html +++ b/data/web/core.telegram.org/method/chatlists.getChatlistUpdates.html @@ -77,6 +77,33 @@

Result

chatlists.ChatlistUpdates

+

Possible errors

+ + + + + + + + + + + + + + + + + + + + + + + + + +
CodeTypeDescription
400FILTER_ID_INVALIDThe specified filter ID is invalid.
400FILTER_NOT_SUPPORTEDThe specified filter cannot be used in this context.
400INPUT_CHATLIST_INVALIDThe specified folder is invalid.

Bots can use this method

Related pages

Deep links

diff --git a/data/web/core.telegram.org/method/contacts.getStatuses.html b/data/web/core.telegram.org/method/contacts.getStatuses.html index 1c05b9bb42..a47ada239d 100644 --- a/data/web/core.telegram.org/method/contacts.getStatuses.html +++ b/data/web/core.telegram.org/method/contacts.getStatuses.html @@ -4,10 +4,10 @@ contacts.getStatuses - + - + @@ -42,7 +42,7 @@

contacts.getStatuses

-

Returns the list of contact statuses.

+

Use this method to obtain the online statuses of all contacts with an accessible Telegram account.

+

Search for messages.

diff --git a/data/web/core.telegram.org/method/messages.getSearchResultsCalendar.html b/data/web/core.telegram.org/method/messages.getSearchResultsCalendar.html index 6446d68bd2..b5efd54818 100644 --- a/data/web/core.telegram.org/method/messages.getSearchResultsCalendar.html +++ b/data/web/core.telegram.org/method/messages.getSearchResultsCalendar.html @@ -4,10 +4,10 @@ messages.getSearchResultsCalendar - + - + @@ -71,11 +71,21 @@ Can return partial results for the last returned day.

+flags +# +Flags, see TL conditional fields + + peer InputPeer Peer where to search +saved_peer_id +flags.2?InputPeer +Search within the saved message dialog » with this ID. + + filter MessagesFilter Message filter, inputMessagesFilterEmpty, inputMessagesFilterMyMentions filters are not supported by this method. @@ -112,6 +122,8 @@ Can return partial results for the last returned day.

Related pages

+

Saved messages

+

The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.

inputMessagesFilterEmpty

Filter is absent.

inputMessagesFilterMyMentions

diff --git a/data/web/core.telegram.org/method/messages.getWebPage.html b/data/web/core.telegram.org/method/messages.getWebPage.html index 965c2eb3c4..6da0b2333d 100644 --- a/data/web/core.telegram.org/method/messages.getWebPage.html +++ b/data/web/core.telegram.org/method/messages.getWebPage.html @@ -84,7 +84,7 @@

Result

-

WebPage

+

messages.WebPage

Possible errors

diff --git a/data/web/core.telegram.org/method/messages.hideAllChatJoinRequests.html b/data/web/core.telegram.org/method/messages.hideAllChatJoinRequests.html index d4d912bab9..67d96e0ad9 100644 --- a/data/web/core.telegram.org/method/messages.hideAllChatJoinRequests.html +++ b/data/web/core.telegram.org/method/messages.hideAllChatJoinRequests.html @@ -110,6 +110,16 @@ + + + + + + + + + + diff --git a/data/web/core.telegram.org/method/messages.migrateChat.html b/data/web/core.telegram.org/method/messages.migrateChat.html index 0039656c17..cfb29bf648 100644 --- a/data/web/core.telegram.org/method/messages.migrateChat.html +++ b/data/web/core.telegram.org/method/messages.migrateChat.html @@ -109,6 +109,11 @@ + + + + + diff --git a/data/web/core.telegram.org/method/messages.prolongWebView.html b/data/web/core.telegram.org/method/messages.prolongWebView.html index c943a4fe49..c7679a5dfc 100644 --- a/data/web/core.telegram.org/method/messages.prolongWebView.html +++ b/data/web/core.telegram.org/method/messages.prolongWebView.html @@ -4,10 +4,10 @@ messages.prolongWebView - + - + @@ -96,14 +96,9 @@ - - - - - - - - + + + @@ -117,13 +112,11 @@

Related pages

messages.sendWebViewResultMessage

Terminate webview interaction started with messages.requestWebView, sending the specified message to the chat on behalf of the user.

-

Bot web apps

+

Mini Apps on Telegram

Bots can offer users interactive HTML5 web apps to completely replace any website.

messages.requestWebView

-

Open a bot web 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.

-

Forums

-

Telegram allows creating forums with multiple distinct topics.

+

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.

diff --git a/data/web/core.telegram.org/method/messages.requestWebView.html b/data/web/core.telegram.org/method/messages.requestWebView.html index 17af7d598c..eb8d977943 100644 --- a/data/web/core.telegram.org/method/messages.requestWebView.html +++ b/data/web/core.telegram.org/method/messages.requestWebView.html @@ -4,10 +4,10 @@ messages.requestWebView - + - + @@ -42,7 +42,7 @@

messages.requestWebView

-

Open a bot web app, sending over user information after user confirmation.

+

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.

- + @@ -115,14 +115,9 @@ - - - - - - - - + + + @@ -133,18 +128,53 @@
400CHANNELS_TOO_MUCHYou have joined too many channels/supergroups.
400CHANNEL_INVALIDThe provided channel is invalid.
400 CHANNEL_PRIVATE You haven't joined this channel/supergroup.
The provided chat id is invalid.
500CHAT_INVALIDInvalid chat.
400 PEER_ID_INVALID The provided peer id is invalid. Web app interaction ID obtained from messages.requestWebView
reply_to_msg_idflags.0?intWhether the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent in reply to this message ID.
top_msg_idflags.9?intThis field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
reply_toflags.0?InputReplyToIf set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent in reply to the specified message or story.
send_as
start_param flags.3?stringIf the web app was opened from the attachment menu using a attachment menu deep link, start_param should contain the data from the startattach parameter.If the web app was opened from the attachment menu using a attachment menu deep link, start_param should contain the data from the startattach parameter.
theme_paramsShort name of the application; 0-64 English letters, digits, and underscores
reply_to_msg_idflags.0?intWhether the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent in reply to this message ID.
top_msg_idflags.9?intThis field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
reply_toflags.0?InputReplyToIf set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent in reply to the specified message or story.
send_as

Result

WebViewResult

+

Possible errors

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeTypeDescription
400BOT_INVALIDThis is not a valid bot.
400BOT_WEBVIEW_DISABLEDA webview cannot be opened in the specified conditions: emitted for example if from_bot_menu or url are set and peer is not the chat with the bot.
400INPUT_USER_DEACTIVATEDThe specified user was deleted.
400PEER_ID_INVALIDThe provided peer id is invalid.
400YOU_BLOCKED_USERYou blocked this user.

Related pages

Bot menu button

Bots can choose the behavior of the menu button shown next to the text input field.

messages.sendWebViewResultMessage

Terminate webview interaction started with messages.requestWebView, sending the specified message to the chat on behalf of the user.

-

Bot web apps

+

Mini Apps on Telegram

Bots can offer users interactive HTML5 web apps to completely replace any website.

Deep links

Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.

-

Forums

-

Telegram allows creating forums with multiple distinct topics.

-

Web Apps for Bots

+

Telegram Mini Apps

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.

diff --git a/data/web/core.telegram.org/method/messages.sendEncryptedService.html b/data/web/core.telegram.org/method/messages.sendEncryptedService.html index 9f37d18755..2a20756482 100644 --- a/data/web/core.telegram.org/method/messages.sendEncryptedService.html +++ b/data/web/core.telegram.org/method/messages.sendEncryptedService.html @@ -100,6 +100,11 @@ 400 +CHAT_ID_INVALID +The provided chat id is invalid. + + +400 DATA_INVALID Encrypted data invalid. @@ -114,7 +119,7 @@ The provided secret chat ID is invalid. -400 +500 MSG_WAIT_FAILED A waiting call returned an error. diff --git a/data/web/core.telegram.org/method/messages.sendMedia.html b/data/web/core.telegram.org/method/messages.sendMedia.html index 401374998f..71a41be81a 100644 --- a/data/web/core.telegram.org/method/messages.sendMedia.html +++ b/data/web/core.telegram.org/method/messages.sendMedia.html @@ -105,19 +105,19 @@ Whether to move used stickersets to top, see here for more info on this flag » +invert_media +flags.16?true +If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + peer InputPeer Destination -reply_to_msg_id -flags.0?int -Message ID to which this message should reply to - - -top_msg_id -flags.9?int -This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic. +reply_to +flags.0?InputReplyTo +If set, indicates that the message should be sent in reply to the specified message or story. media @@ -250,6 +250,11 @@ 403 +CHAT_SEND_PLAIN_FORBIDDEN +You can't send non-media (text) messages in this chat. + + +403 CHAT_SEND_POLL_FORBIDDEN You can't send polls in this chat. @@ -355,6 +360,11 @@ 400 +MESSAGE_EMPTY +The provided message is empty. + + +400 MSG_ID_INVALID Invalid message ID provided. @@ -535,6 +545,16 @@ 400 +WEBPAGE_NOT_FOUND +A preview for the specified webpage url could not be generated. + + +400 +WEBPAGE_URL_INVALID +The specified webpage url is invalid. + + +400 YOU_BLOCKED_USER You blocked this user. @@ -544,8 +564,6 @@

Related pages

Stickers

Telegram clients support displaying static and animated stickers.

-

Forums

-

Telegram allows creating forums with multiple distinct topics.

Styled text with message entities

How to create styled text with message entities

Scheduled messages

diff --git a/data/web/core.telegram.org/method/messages.sendWebViewData.html b/data/web/core.telegram.org/method/messages.sendWebViewData.html index 11038aa84f..4c71f9347b 100644 --- a/data/web/core.telegram.org/method/messages.sendWebViewData.html +++ b/data/web/core.telegram.org/method/messages.sendWebViewData.html @@ -4,10 +4,10 @@ messages.sendWebViewData - + - + @@ -42,7 +42,7 @@

messages.sendWebViewData

-

Used by the user to relay data from an opened reply keyboard bot web app to the bot that owns it.

+

Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.

diff --git a/data/web/core.telegram.org/method/messages.sendWebViewResultMessage.html b/data/web/core.telegram.org/method/messages.sendWebViewResultMessage.html index 85345a644f..80eb87b439 100644 --- a/data/web/core.telegram.org/method/messages.sendWebViewResultMessage.html +++ b/data/web/core.telegram.org/method/messages.sendWebViewResultMessage.html @@ -102,7 +102,7 @@

Bots can use this method

Related pages

messages.requestWebView

-

Open a bot web app, sending over user information after user confirmation.

+

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.

diff --git a/data/web/core.telegram.org/method/messages.setChatWallPaper.html b/data/web/core.telegram.org/method/messages.setChatWallPaper.html index 7ef95a2ec3..67399b008e 100644 --- a/data/web/core.telegram.org/method/messages.setChatWallPaper.html +++ b/data/web/core.telegram.org/method/messages.setChatWallPaper.html @@ -80,6 +80,16 @@ Flags, see TL conditional fields +for_both +flags.3?true +Only for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user. + + +revert +flags.4?true +If we don't like the new wallpaper the other user of the chat has chosen for us using the for_both flag, we can re-set our previous wallpaper just on our side using this flag. + + peer InputPeer The private chat where the wallpaper will be set @@ -123,10 +133,17 @@ WALLPAPER_INVALID The specified wallpaper is invalid. + +400 +WALLPAPER_NOT_FOUND +The specified wallpaper could not be found. +

Bots can use this method

Related pages

+

Telegram Premium

+

Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.

Wallpapers

Telegram apps support generating, sharing and synchronizing chat backgrounds.

messageActionSetChatWallPaper

diff --git a/data/web/core.telegram.org/method/messages.setDefaultHistoryTTL.html b/data/web/core.telegram.org/method/messages.setDefaultHistoryTTL.html index 0e450ad796..fa8a30d616 100644 --- a/data/web/core.telegram.org/method/messages.setDefaultHistoryTTL.html +++ b/data/web/core.telegram.org/method/messages.setDefaultHistoryTTL.html @@ -78,6 +78,23 @@

Result

Bool

+

Possible errors

+ + + + + + + + + + + + + + + +
CodeTypeDescription
400TTL_PERIOD_INVALIDThe specified TTL period is invalid.

Bots can use this method

diff --git a/data/web/core.telegram.org/method/messages.toggleNoForwards.html b/data/web/core.telegram.org/method/messages.toggleNoForwards.html index 99e1fe15c2..631d8a7207 100644 --- a/data/web/core.telegram.org/method/messages.toggleNoForwards.html +++ b/data/web/core.telegram.org/method/messages.toggleNoForwards.html @@ -100,8 +100,13 @@ 400 +CHAT_ADMIN_REQUIRED +You must be an admin in this chat to do this. + + +400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 400 diff --git a/data/web/core.telegram.org/method/messages.unpinAllMessages.html b/data/web/core.telegram.org/method/messages.unpinAllMessages.html index 96899c194a..084d7f0938 100644 --- a/data/web/core.telegram.org/method/messages.unpinAllMessages.html +++ b/data/web/core.telegram.org/method/messages.unpinAllMessages.html @@ -105,7 +105,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. diff --git a/data/web/core.telegram.org/method/messages.updatePinnedMessage.html b/data/web/core.telegram.org/method/messages.updatePinnedMessage.html index a2ba7e06e2..07a824a464 100644 --- a/data/web/core.telegram.org/method/messages.updatePinnedMessage.html +++ b/data/web/core.telegram.org/method/messages.updatePinnedMessage.html @@ -136,7 +136,7 @@ 400 CHAT_NOT_MODIFIED -The pinned message wasn't modified. +No changes were made to chat information because the new information you passed is identical to the current information. 403 diff --git a/data/web/core.telegram.org/method/phone.exportGroupCallInvite.html b/data/web/core.telegram.org/method/phone.exportGroupCallInvite.html index 4ac430987f..6f29b1ec5b 100644 --- a/data/web/core.telegram.org/method/phone.exportGroupCallInvite.html +++ b/data/web/core.telegram.org/method/phone.exportGroupCallInvite.html @@ -42,7 +42,7 @@

phone.exportGroupCallInvite

-

Get an invite link for a group call or livestream

+

Get an invite link for a group call or livestream

+

Bots can use this method

+

Related pages

+

File references

+

How to handle file references.

+

photo

+

Photo

diff --git a/data/web/core.telegram.org/method/photos.uploadContactProfilePhoto.html b/data/web/core.telegram.org/method/photos.uploadContactProfilePhoto.html index da0a81bb88..d290c0c393 100644 --- a/data/web/core.telegram.org/method/photos.uploadContactProfilePhoto.html +++ b/data/web/core.telegram.org/method/photos.uploadContactProfilePhoto.html @@ -4,10 +4,10 @@ photos.uploadContactProfilePhoto - + - + @@ -125,6 +125,11 @@ 400 +CONTACT_MISSING +The specified user is not a contact. + + +400 USER_ID_INVALID The provided user ID is invalid. diff --git a/data/web/core.telegram.org/method/upload.getFile.html b/data/web/core.telegram.org/method/upload.getFile.html index 6de0ce639a..89a19844c2 100644 --- a/data/web/core.telegram.org/method/upload.getFile.html +++ b/data/web/core.telegram.org/method/upload.getFile.html @@ -115,6 +115,11 @@ 400 +CDN_METHOD_INVALID +You can't call this method in a CDN DC. + + +400 CHANNEL_INVALID The provided channel is invalid. @@ -124,11 +129,6 @@ You haven't joined this channel/supergroup. -400 -FILE_REFERENCE_* -The file reference expired, it must be refreshed. - - 406 FILEREF_UPGRADE_NEEDED The client has to be updated in order to support file references. @@ -140,6 +140,11 @@ 400 +FILE_REFERENCE_* +The file reference expired, it must be refreshed. + + +400 FILE_REFERENCE_EXPIRED File reference expired, it must be refetched as described in the documentation. diff --git a/data/web/core.telegram.org/method/upload.reuploadCdnFile.html b/data/web/core.telegram.org/method/upload.reuploadCdnFile.html index a3bb078cf4..d06e2b01d2 100644 --- a/data/web/core.telegram.org/method/upload.reuploadCdnFile.html +++ b/data/web/core.telegram.org/method/upload.reuploadCdnFile.html @@ -92,6 +92,11 @@ +400 +CDN_METHOD_INVALID +You can't call this method in a CDN DC. + + 500 CDN_UPLOAD_TIMEOUT A server-side timeout occurred while reuploading the file to the CDN DC. diff --git a/data/web/core.telegram.org/method/upload.saveFilePart.html b/data/web/core.telegram.org/method/upload.saveFilePart.html index 131b8aa279..78c449c1cf 100644 --- a/data/web/core.telegram.org/method/upload.saveFilePart.html +++ b/data/web/core.telegram.org/method/upload.saveFilePart.html @@ -82,7 +82,7 @@ bytes bytes -Binary data, contend of a part +Binary data, content of a part diff --git a/data/web/core.telegram.org/method/users.getFullUser.html b/data/web/core.telegram.org/method/users.getFullUser.html index 3c2db61461..e851ea6a8e 100644 --- a/data/web/core.telegram.org/method/users.getFullUser.html +++ b/data/web/core.telegram.org/method/users.getFullUser.html @@ -89,6 +89,11 @@ 400 +CHANNEL_INVALID +The provided channel is invalid. + + +400 CHANNEL_PRIVATE You haven't joined this channel/supergroup. @@ -99,6 +104,11 @@ 400 +USERNAME_OCCUPIED +The provided username is already occupied. + + +400 USER_ID_INVALID The provided user ID is invalid. diff --git a/data/web/core.telegram.org/type/AttachMenuBots.html b/data/web/core.telegram.org/type/AttachMenuBots.html index c09ca9cc76..0d784d74d4 100644 --- a/data/web/core.telegram.org/type/AttachMenuBots.html +++ b/data/web/core.telegram.org/type/AttachMenuBots.html @@ -4,10 +4,10 @@ AttachMenuBots - + - + @@ -42,7 +42,7 @@

AttachMenuBots

-

Represents a list of bot web apps that can be launched from the attachment menu »

+

Represents a list of bot mini apps that can be launched from the attachment menu »

+

Telegram Mini Apps

diff --git a/data/web/core.telegram.org/type/InputBotInlineMessage.html b/data/web/core.telegram.org/type/InputBotInlineMessage.html index d61124c5c1..96cbbd6c6c 100644 --- a/data/web/core.telegram.org/type/InputBotInlineMessage.html +++ b/data/web/core.telegram.org/type/InputBotInlineMessage.html @@ -99,6 +99,10 @@ inputBotInlineMessageMediaInvoice An invoice + +inputBotInlineMessageMediaWebPage +Specifies options that will be used to generate the link preview for the message, or even a standalone link preview without an attached message. + diff --git a/data/web/core.telegram.org/type/InputFileLocation.html b/data/web/core.telegram.org/type/InputFileLocation.html index 21bb013b66..ee3976b33a 100644 --- a/data/web/core.telegram.org/type/InputFileLocation.html +++ b/data/web/core.telegram.org/type/InputFileLocation.html @@ -92,7 +92,7 @@ inputTakeoutFileLocation -Empty constructor for takeout +Used to download a JSON file that will contain all personal data related to features that do not have a specialized takeout method yet, see here » for more info on the takeout API. inputPhotoFileLocation diff --git a/data/web/core.telegram.org/type/InputMedia.html b/data/web/core.telegram.org/type/InputMedia.html index 3272ed858f..14331d39dd 100644 --- a/data/web/core.telegram.org/type/InputMedia.html +++ b/data/web/core.telegram.org/type/InputMedia.html @@ -139,6 +139,14 @@ inputMediaDice Send a dice-based animated sticker + +inputMediaStory +Forwarded story + + +inputMediaWebPage +Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message. + diff --git a/data/web/core.telegram.org/type/InputStickerSet.html b/data/web/core.telegram.org/type/InputStickerSet.html index cffb4187c4..65581a6912 100644 --- a/data/web/core.telegram.org/type/InputStickerSet.html +++ b/data/web/core.telegram.org/type/InputStickerSet.html @@ -114,6 +114,10 @@ inputStickerSetEmojiDefaultTopicIcons Default custom emoji stickerset for forum topic icons + +inputStickerSetEmojiChannelDefaultStatuses +Default custom emoji status stickerset for channel statuses + diff --git a/data/web/core.telegram.org/type/MessageMedia.html b/data/web/core.telegram.org/type/MessageMedia.html index 2cfdd3443b..9e445c612d 100644 --- a/data/web/core.telegram.org/type/MessageMedia.html +++ b/data/web/core.telegram.org/type/MessageMedia.html @@ -135,6 +135,18 @@ messageMediaDice Dice-based animated sticker + +messageMediaStory +Represents a forwarded story or a story mention. + + +messageMediaGiveaway +Contains info about a giveaway, see here » for more info. + + +messageMediaGiveawayResults +A giveaway with public winners has finished, this constructor contains info about the winners. +

Methods

diff --git a/data/web/core.telegram.org/type/SimpleWebViewResult.html b/data/web/core.telegram.org/type/SimpleWebViewResult.html index b208992c6d..bc7fce440a 100644 --- a/data/web/core.telegram.org/type/SimpleWebViewResult.html +++ b/data/web/core.telegram.org/type/SimpleWebViewResult.html @@ -86,7 +86,7 @@ messages.requestSimpleWebView -Open a bot web app. +Open a bot mini app. diff --git a/data/web/core.telegram.org/type/Updates.html b/data/web/core.telegram.org/type/Updates.html index 9a7073aa40..b53797feda 100644 --- a/data/web/core.telegram.org/type/Updates.html +++ b/data/web/core.telegram.org/type/Updates.html @@ -253,10 +253,6 @@ Start a conversation with a bot using a deep linking parameter -help.getAppChangelog -Get changelog of current app.
Typically, an updates constructor will be returned, containing one or more updateServiceNotification updates with app-specific changelogs. - - channels.createChannel Create a supergroup/channel. @@ -350,7 +346,7 @@ messages.sendVote -Vote in a poll +Vote in a poll

Starting from layer 159, the vote will be sent from the peer specified using messages.saveDefaultSendAs. messages.getPollResults @@ -370,7 +366,7 @@ contacts.acceptContact -If the peer settings of a new user allow us to add them as contact, add that user as contact +If the add contact action bar is active, add that user as contact channels.editCreator @@ -378,7 +374,7 @@ contacts.getLocated -Get contacts near you +Get users and geochats near you, see here » for more info. channels.toggleSlowMode @@ -394,7 +390,7 @@ contacts.blockFromReplies -Stop getting notifications about thread replies of a certain user in @replies +Stop getting notifications about discussion replies of a certain user in @replies phone.createGroupCall @@ -486,7 +482,7 @@ messages.sendWebViewData -Used by the user to relay data from an opened reply keyboard bot web app to the bot that owns it. +Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it. channels.toggleJoinToSend @@ -538,7 +534,7 @@ messages.sendBotRequestedPeer -Send a chosen peer, as requested by a keyboardButtonRequestPeer button. +Send one or more chosen peers, as requested by a keyboardButtonRequestPeer button. chatlists.joinChatlistInvite @@ -556,6 +552,50 @@ 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. + diff --git a/data/web/core.telegram.org/type/WebPage.html b/data/web/core.telegram.org/type/WebPage.html index 5495e96054..3fde91b062 100644 --- a/data/web/core.telegram.org/type/WebPage.html +++ b/data/web/core.telegram.org/type/WebPage.html @@ -89,21 +89,6 @@ The preview of the webpage hasn't changed - -

Methods

- - - - - - - - - - - - -
MethodDescription
messages.getWebPageGet instant view page
diff --git a/data/web/core.telegram.org/type/WebViewResult.html b/data/web/core.telegram.org/type/WebViewResult.html index 026610fb25..28306a236b 100644 --- a/data/web/core.telegram.org/type/WebViewResult.html +++ b/data/web/core.telegram.org/type/WebViewResult.html @@ -86,7 +86,7 @@ messages.requestWebView -Open a bot web 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. +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. diff --git a/data/web/core.telegram.org/type/messages.Messages.html b/data/web/core.telegram.org/type/messages.Messages.html index 97591f2f08..472ac476e1 100644 --- a/data/web/core.telegram.org/type/messages.Messages.html +++ b/data/web/core.telegram.org/type/messages.Messages.html @@ -123,7 +123,7 @@ messages.search -Returns found messages +Search for messages. channels.getMessages @@ -154,10 +154,6 @@ Get messages in a reply thread -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. - - messages.getUnreadReactions Get unread reactions to messages you sent @@ -165,6 +161,10 @@ messages.searchSentMedia View and search recently sent media.
This method does not support pagination. + +messages.getSavedHistory +Returns saved messages » forwarded from a specific peer + diff --git a/data/web/core.telegram.org/type/updates.ChannelDifference.html b/data/web/core.telegram.org/type/updates.ChannelDifference.html index ea0d034628..a4486cca1f 100644 --- a/data/web/core.telegram.org/type/updates.ChannelDifference.html +++ b/data/web/core.telegram.org/type/updates.ChannelDifference.html @@ -77,7 +77,7 @@ updates.channelDifferenceTooLong -The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways (assuming the existence of a persistent database to locally store messages):

1. Delete all known messages in the chat, begin from scratch by refetching all messages manually with messages.getHistory. It is easy to implement, but suddenly disappearing messages look awful to the user.
2. Save all messages loaded in the memory until application restart, but delete all messages from the database. Messages left in the memory must be lazily updated using calls to messages.getHistory.
It will look much smoother to the user, they will need to redownload messages only after client restart.
Unsynchronized messages left in memory shouldn't be saved to the database, results of messages.getHistory and messages.getMessages must be used to update the state of deleted and edited messages left in the memory.
3. Save all messages loaded in the memory and stored in the database without saving that some messages form continuous ranges.
Messages in the database will be excluded when paginating through or searching the local message history after application restart and will be available only through individual message queries.
Every message should still be checked using messages.getHistory.
It has more disadvantages over 2) than advantages.
4. Save all messages with saving all data about continuous message ranges.
Messages from the database may be used when paginating through or searching the local message history.
The messages should still be lazily checked using messages.getHistory, but they are still available offline.
It is the best way for gaps support, but it is pretty hard to implement correctly.

It should be also noted that some messages like live location messages shouldn't be deleted. +The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways (assuming the existence of a persistent database to locally store messages):

1. Delete all known messages in the chat, begin from scratch by refetching all messages manually with messages.getHistory. It is easy to implement, but suddenly disappearing messages look awful to the user.
2. Save all messages loaded in the memory until application restart, but delete all messages from the database. Messages left in the memory must be lazily updated using calls to messages.getHistory.
It will look much smoother to the user, they will need to redownload messages only after client restart.
Unsynchronized messages left in memory shouldn't be saved to the database, results of messages.getHistory and messages.getMessages must be used to update the state of deleted and edited messages left in the memory.
3. Save all messages loaded in the memory and stored in the database without saving that some messages form continuous ranges.
Messages in the database will be excluded when paginating through or searching the local message history after application restart and will be available only through individual message queries.
Every message should still be checked using messages.getHistory.
It has more disadvantages over 2) than advantages.
4. Save all messages with saving all data about continuous message ranges.
Messages from the database may be used when paginating through or searching the local message history.
The messages should still be lazily checked using messages.getHistory, but they are still available offline.
It is the best way for gaps support, but it is pretty hard to implement correctly.

It should be also noted that some messages like live location messages shouldn't be deleted. updates.channelDifference diff --git a/data/web/corefork.telegram.org/api/auth.html b/data/web/corefork.telegram.org/api/auth.html index 637467277c..8775555327 100644 --- a/data/web/corefork.telegram.org/api/auth.html +++ b/data/web/corefork.telegram.org/api/auth.html @@ -207,16 +207,52 @@ After obtaining the ID token, call account

If the user cannot access their email address, an email reset may be requested using auth.resetLoginEmail.

To change the login email after login, pass emailVerifyPurposeLoginChange as purpose, following the exact same Google ID/Apple ID/email code login flow as above: on success, the account.verifyEmail method will return an account.emailVerified constructor.

-

Sign in/sign up

+

Sign in/sign up

When user enters verification code, the auth.signIn method must be used to validate it and possibly sign user in.

If the code was entered correctly, but the method returns auth.authorizationSignUpRequired, it means that account with this phone number doesn't exist yet: user needs to provide basic information, accept terms of service and then the new user registration method (auth.signUp) must be invoked.

2FA

When trying to sign in using auth.signIn, an error 400 SESSION_PASSWORD_NEEDED may be returned, if the user has two-factor authentication enabled. In this case, instructions for SRP 2FA authentication must be followed.

To set up two-factor authorization on an already authorized account, follow the SRP 2FA authentication docs.

-

Test Accounts

+

Confirming login

+
authorization#ad01d61d flags:# current:flags.0?true official_app:flags.1?true password_pending:flags.2?true encrypted_requests_disabled:flags.3?true call_requests_disabled:flags.4?true unconfirmed:flags.5?true hash:long device_model:string platform:string system_version:string api_id:int app_name:string app_version:string date_created:int date_active:int ip:string country:string region:string = Authorization;
+
+account.authorizations#4bff8ea0 authorization_ttl_days:int authorizations:Vector<Authorization> = account.Authorizations;
+
+updateNewAuthorization#8951abef flags:# unconfirmed:flags.0?true hash:long date:flags.0?int device:flags.0?string location:flags.0?string = Update;
+
+---functions---
+
+account.getAuthorizations#e320c158 = account.Authorizations;
+
+account.changeAuthorizationSettings#40f48462 flags:# confirmed:flags.3?true hash:long encrypted_requests_disabled:flags.0?Bool call_requests_disabled:flags.1?Bool = Bool;
+
+account.resetAuthorization#df77f3bc hash:long = Bool;
+

When logging in, other logged-in sessions will receive an updateNewAuthorization update.
+If the unconfirmed flag is set, clients should display a notification, asking the user if they recognize the session.

+

If the user clicks on the Yes button, invoke account.changeAuthorizationSettings with the new session's hash and the confirmed flag set, confirming the specified session.

+

If the user clicks on the No button, invoke account.resetAuthorization with the new session's hash, logging out the specified session.

+

If no action is taken by the user, the session will be autoconfirmed authorization_autoconfirm_period seconds after login (see the associated client configuration parameter »).

+

Invalidating login codes

+

Telegram's servers will automatically invalidate login codes if they are sent by the user to another Telegram chat, either by forwarding them or by sending them inside of a message: however, clients should also manually and immediately invalidate login codes if the user attempts to screenshot or forward a message sent by the login notification service user (ID 777000) containing login codes.

+

If an incoming message that is:

+
    +
  • Sent by the login notification service user (ID 777000)
  • +
  • AND is a text message (not a media)
  • +
  • AND contains one or more login codes, defined as a sequence of 5 to 7 decimal digits, optionally interleaved with or followed by any number of - characters (example implementation »)
  • +
+

Is either:

+
    +
  • Screenshotted by the user
  • +
  • OR forwarded by the user to any chat
  • +
+

account.invalidateSignInCodes should be invoked, passing the extracted login codes (excluding any - characeters).

+
---functions---
+
+account.invalidateSignInCodes#ca8ae8ba codes:Vector<string> = Bool;
+

Test Accounts

Each phone number is limited to only a certain amount of logins per day (e.g. 5, but this is subject to change) after which the API will return a FLOOD error until the next day. This might not be enough for testing the implementation of User Authorization flows in client applications.

-

There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on Test DCs (their IP addresses for TCP transport are available in API development tools panel after api_id was obtained, URI format for HTTPS/Websocket transport).

+

There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on Test DCs (their IP addresses for TCP transport are available in API development tools panel after api_id was obtained, URI format for HTTPS/WebSocket transport).

If you wish to emulate an application of a user associated with DC number X, it is sufficient to specify the phone number as 99966XYYYY, where YYYY are random numbers, when registering the user. A user like this would always get XXXXX as the login confirmation code (the DC number, repeated five times). Note that the value of X must be in the range of 1-3 because there are only 3 Test DCs. When the flood limit is reached for any particular test number, just choose another number (changing the YYYY random part).

Do not store any important or private information in the messages of such test accounts; anyone can make use of the simplified authorization mechanism – and we periodically wipe all information stored there.

Proceed with User Authorization flows in Production DCs only after you make sure everything works correctly on Test DCs first to avoid reaching flood limits.

diff --git a/data/web/corefork.telegram.org/api/errors.html b/data/web/corefork.telegram.org/api/errors.html index e51cfb476f..3c874a7d17 100644 --- a/data/web/corefork.telegram.org/api/errors.html +++ b/data/web/corefork.telegram.org/api/errors.html @@ -49,7 +49,7 @@ An error is characterized by several parameters:

Error Type

A string literal in the form of /[A-Z_0-9]+/, which summarizes the problem. For example, AUTH_KEY_UNREGISTERED. This is an optional parameter.

Error Database

-

A full human-readable JSON list of RPC errors that can be returned by all methods in the API can be found here », what follows is a description of its fields:

+

A full human-readable JSON list of RPC errors that can be returned by all methods in the API can be found here », what follows is a description of its fields:

New Constructors
@@ -1140,7 +278,7 @@ Third-party apps may log in using any of the other code delivery methods (Telegr

Schema changes

New Methods