diff --git a/data/corefork.telegram.org/api/animated-emojis.html b/data/corefork.telegram.org/api/animated-emojis.html index 1e2bc586a5..979e111e97 100644 --- a/data/corefork.telegram.org/api/animated-emojis.html +++ b/data/corefork.telegram.org/api/animated-emojis.html @@ -97,7 +97,7 @@ If a set of reactions for the messages.setTyping, passing a sendMessageEmojiInteraction constructor with the following fields:

+After 1 second has elapsed with no more taps, the list should be cleared and stored taps should be sent using messages.setTyping, passing a sendMessageEmojiInteraction constructor with the following fields:

- + +

1 second after the receiving user has seen the last reaction animation for a specific emoji, an acknowledgement must be sent using messages.setTyping, passing a sendMessageEmojiInteractionSeen with that emoji.

diff --git a/data/corefork.telegram.org/api/config.html b/data/corefork.telegram.org/api/config.html index ccab9a4c6b..d8ca119201 100644 --- a/data/corefork.telegram.org/api/config.html +++ b/data/corefork.telegram.org/api/config.html @@ -82,6 +82,10 @@ While help.getConfig returns MTProto-specif
  • dialog_filters_tooltip - Whether clients should actively show a tooltip, inviting the user to configure dialog filters AKA folders; typically this happens when the chat list is long enough to start getting cluttered. (boolean)
  • autoarchive_setting_available - Whether clients can invoke account.setGlobalPrivacySettings with globalPrivacySettings.archive_and_mute_new_noncontact_peers = boolTrue, to automatically archive and mute new incoming chats from non-contacts. (boolean)
  • pending_suggestions - Contains a list of suggestions that should be actively shown as a tooltip to the user. (Array of strings, possible values shown in the suggestions section ».
  • +
  • url_auth_domains - A list of domains that support automatic login with manual user confirmation, click here for more info on URL authorization ». (array of strings)
  • +
  • autologin_domains - A list of Telegram domains that support automatic login with no user confirmation, click here for more info on URL authorization ». (array of strings)
  • +
  • autologin_token - Autologin token, click here for more info on URL authorization ». (string)
  • +
  • round_video_encoding - Contains a set of recommended codec parameters for round videos.
  • Example value:

    {
    @@ -206,6 +210,9 @@ While help.getConfig returns MTProto-specif
             "suggestions.telegram.org",
             "themes.telegram.org"
         ],
    +    "url_auth_domains": [
    +        "somedomain.telegram.org"
    +    ],
         "round_video_encoding": {
             "diameter": 384,
             "video_bitrate": 1000,
    diff --git a/data/corefork.telegram.org/api/url-authorization.html b/data/corefork.telegram.org/api/url-authorization.html
    index ef49471c31..55dfed21b7 100644
    --- a/data/corefork.telegram.org/api/url-authorization.html
    +++ b/data/corefork.telegram.org/api/url-authorization.html
    @@ -39,7 +39,10 @@
       
       

    Seamless Telegram Login

    -

    Bots may ask users to login to a certain website via Telegram when clicking on certain URL buttons in inline keyboards.

    +
    + +

    Bots or Telegram websites may ask users to login to a certain website via Telegram when clicking on certain links or URL buttons in inline keyboards.

    +

    Bot URL authorization

    When the user clicks on keyboardButtonUrlAuth, messages.requestUrlAuth should be called, providing the button_id of the button and the ID and peer of the container message. The returned urlAuthResultRequest object will contain more details about the authorization request:

    +The same must be done if the user opens the link while refusing the authorization request.

    +

    Link URL authorization

    +

    Telegram supports automatic authorization on certain websites upon opening an HTTP URL in-app, upon clicking a link in a message or clicking on a keyboardButtonUrl.

    +

    Automatic authorization

    +

    Clients should automatically authenticate users when opening official Telegram domains, listed in the url_auth_domains key of the client configuration object ».

    +

    Upon clicking a link, the URL must be modified by appending the autologin_token from the client configuration object » to the query string, like so:

    +

    Original URL: https://somedomain.telegram.org/path?query=string#hash=value
    +Modified URL: https://somedomain.telegram.org/path?query=string&autologin_token=$autologin_token#hash=value

    +

    Make sure that the used autologin_token is no more than 10000 seconds old, if it is older it must be refetched as described in the client configuration section ».

    +

    Manual authorization

    +

    Clients should show a confirmation prompt similar to the one used for bots, to authenticate users when opening certain Telegram domains, listed in the url_auth_domains key of the client configuration object ».

    +

    messages.requestUrlAuth should be called, providing only the original url. +The returned urlAuthResultRequest object will contain more details about the authorization request:

    +
      +
    • The domain parameter will contain the domain name of the website on which the user will log in (example: comments.app).
    • +
    • The request_write_access will be set if the website would like to send messages to the user.
    • +
    +

    The info should be shown in a prompt.

    +

    If the user agrees to login to the URL, messages.acceptUrlAuth should be called (eventually setting the write_allowed if the permission was requested and the user consented). +The result will be a urlAuthResultAccepted with the final URL to open.

    +

    urlAuthResultDefault could also be returned, instead, in which case the original URL must be opened, instead. +The same must be done if the user opens the link while refusing the authorization request.

    +

    Related articles

    +

    Client configuration

    +

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

    @@ -121,8 +148,11 @@ The same must be done if the user opens the link while refusing the authorizatio - - + + +