diff --git a/data/web/corefork.telegram.org/api/config.html b/data/web/corefork.telegram.org/api/config.html index 2f580ac6aa..0b5d917165 100644 --- a/data/web/corefork.telegram.org/api/config.html +++ b/data/web/corefork.telegram.org/api/config.html @@ -69,79 +69,6 @@ help.getAppConfig#98914110 = JSONValue;
The help.getAppConfig method returns a JSON object containing rapidly evolving, client-specific configuration parameters.
While help.getConfig returns MTProto-specific configuration with information about server-side limitations and other MTProto-related information, help.getAppConfig returns configuration parameters useful for graphical Telegram clients.
Typical fields included in the resulting JSON object are:
-emojies_animated_zoom
- Animated emojis and animated dice should be scaled by this factor before being shown to the user (float)keep_alive_service
- Whether app clients should start a keepalive service to keep the app running and fetch updates even when the app is closed (boolean)background_connection
- Whether app clients should start a background TCP connection for MTProto update fetching (boolean)emojies_send_dice
- A list of supported animated dice stickers (array of strings).emojies_send_dice_success
- For animated dice emojis other than the basic value
and frame_start
float values)emojies_sounds
- A map of soundbites to be played when the user clicks on the specified animated emoji; the file reference field should be base64-decoded before downloading the file (map of file IDs, with emoji string keys)gif_search_branding
- Specifies the name of the service providing GIF search through gif_search_username (string)gif_search_emojies
- Specifies a list of emojies that should be suggested as search term in a bar above the GIF search box (array of string emojis)stickers_emoji_suggest_only_api
- Specifies that the app should not display local sticker suggestions » for emojis at all and just use the result of messages.getStickers (bool)stickers_emoji_cache_time
- Specifies the validity period of the local cache of messages.getStickers, also relevant when generating the pagination hash when invoking the method. (int)qr_login_camera
- Whether the Settings->Devices menu should show an option to scan a QR login code (boolean)qr_login_code
- Whether the login screen should show a QR code login option, possibly as default login method (string, "disabled", "primary" or "secondary")dialog_filters_enabled
- Whether clients should show an option for managing dialog filters AKA folders (boolean)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. chat_read_mark_size_threshold
- Per-user read receipts, fetchable using messages.getMessageReadParticipants, will be available in groups with an amount of participants less or equal to chat_read_mark_size_threshold
. (int)chat_read_mark_expire_period
- To protect user privacy, read receipts are only stored for chat_read_mark_expire_period
seconds after the message was sent. (int)groupcall_video_participants_max
- Maximum number of participants in a group call (livestreams allow ∞ participants) (int)reactions_default
- Default emoji reaction to use in the quick reaction menu, this value can be changed using messages.setDefaultReaction (string)reactions_uniq_max
- Maximum number of unique reaction-emojis for any given message: for example, if there are 2000 ringtone_duration_max
- The maximum duration in seconds of uploadable notification sounds » (integer)ringtone_size_max
- The maximum post-conversion size in bytes of uploadable notification sounds »ringtone_saved_count_max
- The maximum number of saveable notification sounds »message_animated_emoji_max
- Maximum number of custom animated emojis that may be present in a message. (integer)stickers_premium_by_emoji_num
- Defines how many premium stickers to show in the sticker suggestion popup when entering an emoji into the text field, see the sticker docs for more info (integer, defaults to 0)stickers_normal_by_emoji_per_premium_num
- For Premium users, used to define the suggested sticker list, see the sticker docs for more info (integer, defaults to 2)premium_purchase_blocked
- The user can't purchase premium. The app must also hide all Premium features, including stars for other users, et cetera. (boolean)channels_limit_default
- The maximum number of channels and supergroups a non-Premium user may join (integer)channels_limit_premium
- The maximum number of channels and supergroups a Premium user may join (integer)saved_gifs_limit_default
- The maximum number of GIFs a non-Premium user may save (integer)saved_gifs_limit_premium
- The maximum number of GIFs a Premium user may save (integer)stickers_faved_limit_default
- The maximum number of stickers a non-Premium user may add to Favorites » (integer)stickers_faved_limit_premium
- The maximum number of stickers a Premium user may add to Favorites » (integer)dialog_filters_limit_default
- The maximum number of folders a non-Premium user may create (integer)dialog_filters_limit_premium
- The maximum number of folders a Premium user may create (integer)dialog_filters_chats_limit_default
- The maximum number of chats a non-Premium user may add to a folder (integer)dialog_filters_chats_limit_premium
- The maximum number of chats a Premium user may add to a folder (integer)dialogs_pinned_limit_default
- The maximum number of chats a non-Premium user may pin (integer)dialogs_pinned_limit_premium
- The maximum number of chats a Premium user may pin (integer)dialogs_folder_pinned_limit_default
- The maximum number of chats a non-Premium user may pin in a folder (integer)dialogs_folder_pinned_limit_premium
- The maximum number of chats a Premium user may pin in a folder (integer)channels_public_limit_default
- The maximum number of public channels or supergroups a non-Premium user may create (integer)channels_public_limit_premium
- The maximum number of public channels or supergroups a Premium user may create (integer)caption_length_limit_default
- The maximum UTF-8 length of media captions sendable by non-Premium users (integer)caption_length_limit_premium
- The maximum UTF-8 length of media captions sendable by non-Premium users (integer)upload_max_fileparts_default
- The maximum size of files uploadable by non-Premium users (integer, indicates the number of 512kb file parts, so the size in bytes is determined by multiplying by 524288
)upload_max_fileparts_premium
- The maximum size of files uploadable by Premium users (integer, indicates the number of 512kb file parts, so the size in bytes is determined by multiplying by 524288
)about_length_limit_default
- The maximum UTF-8 length of bios of non-Premium users (integer)about_length_limit_premium
- The maximum UTF-8 length of bios of Premium users (integer)premium_promo_order
- Array of string identifiers, indicating the order of Telegram Premium features in the Telegram Premimum promotion popup, possible values:double_limits
- Should open a secondary popup with a list of the default/premium limits mentioned abovemore_upload
- Premium users can upload bigger files, as specified by the upload_max_fileparts_*
config keysfaster_download
- Premium users have no download speed limitsvoice_to_text
- Premium users can transcribe voice messagesno_ads
- Premium users see no Sponsored Messagesunique_reactions
- Premium users have access to more message reactionspremimum_stickers
- Premium users have access to premium stickersetsanimated_emoji
- Premium users can send custom animated emojisadvanced_chat_management
- Premium users can reorder the default folder, auto-archive and hide new chats from non-contacts.profile_badge
- Premium users have a badge next to their name, showing that they are helping support Telegramanimated_userpics
- Animated profile pictures of Premium users will play in-chat and when browsing the dialog listapp_icons
- Premium users can change the default icon of the Telegram apppremium_bot_username
- Contains the username of the official Telegram Premium bot that may be used to buy a Telegram Premium subscription (string)Example value:
{
"test": 1,
@@ -323,6 +250,135 @@ While help.getConfig returns MTProto-specif
],
"premium_bot_username": "PremiumBot"
}
+Typical fields included in the resulting JSON object are:
+emojies_animated_zoom
Animated emojis and animated dice should be scaled by this factor before being shown to the user (float)
+keep_alive_service
Whether app clients should start a keepalive service to keep the app running and fetch updates even when the app is closed (boolean)
+background_connection
Whether app clients should start a background TCP connection for MTProto update fetching (boolean)
+emojies_send_dice
A list of supported animated dice stickers (array of strings).
+emojies_send_dice_success
For animated dice emojis other than the basic , indicates the winning dice value and the final frame of the animated sticker, at which to show the fireworks
(object with emoji keys and object values, containing
value
and frame_start
float values)
emojies_sounds
A map of soundbites to be played when the user clicks on the specified animated emoji; the file reference field should be base64-decoded before downloading the file (map of file IDs, with emoji string keys)
+gif_search_branding
Specifies the name of the service providing GIF search through gif_search_username (string)
+gif_search_emojies
Specifies a list of emojies that should be suggested as search term in a bar above the GIF search box (array of string emojis)
+stickers_emoji_suggest_only_api
Specifies that the app should not display local sticker suggestions » for emojis at all and just use the result of messages.getStickers (bool)
+stickers_emoji_cache_time
Specifies the validity period of the local cache of messages.getStickers, also relevant when generating the pagination hash when invoking the method. (int)
+qr_login_camera
Whether the Settings->Devices menu should show an option to scan a QR login code (boolean)
+qr_login_code
Whether the login screen should show a QR code login option, possibly as default login method (string, "disabled", "primary" or "secondary")
+dialog_filters_enabled
Whether clients should show an option for managing dialog filters AKA folders (boolean)
+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.
+chat_read_mark_size_threshold
Per-user read receipts, fetchable using messages.getMessageReadParticipants, will be available in groups with an amount of participants less or equal to chat_read_mark_size_threshold
. (int)
chat_read_mark_expire_period
To protect user privacy, read receipts are only stored for chat_read_mark_expire_period
seconds after the message was sent. (int)
groupcall_video_participants_max
Maximum number of participants in a group call (livestreams allow ∞ participants) (int)
+reactions_default
Default emoji reaction to use in the quick reaction menu, this value can be changed using messages.setDefaultReaction (string)
+reactions_uniq_max
Maximum number of unique reaction-emojis for any given message: for example, if there are 2000 and 1000
reactions and reactions_uniq_max = 2, you can't add a
reaction, because that would raise the number of unique reaction-emojis to 3 > 2. (integer)
ringtone_duration_max
The maximum duration in seconds of uploadable notification sounds » (integer)
+ringtone_size_max
The maximum post-conversion size in bytes of uploadable notification sounds »
+ringtone_saved_count_max
The maximum number of saveable notification sounds »
+message_animated_emoji_max
Maximum number of custom animated emojis that may be present in a message. (integer)
+stickers_premium_by_emoji_num
Defines how many premium stickers to show in the sticker suggestion popup when entering an emoji into the text field, see the sticker docs for more info (integer, defaults to 0)
+stickers_normal_by_emoji_per_premium_num
For Premium users, used to define the suggested sticker list, see the sticker docs for more info (integer, defaults to 2)
+premium_purchase_blocked
The user can't purchase premium. The app must also hide all Premium features, including stars for other users, et cetera. (boolean)
+channels_limit_default
The maximum number of channels and supergroups a non-Premium user may join (integer)
+channels_limit_premium
The maximum number of channels and supergroups a Premium user may join (integer)
+saved_gifs_limit_default
The maximum number of GIFs a non-Premium user may save (integer)
+saved_gifs_limit_premium
The maximum number of GIFs a Premium user may save (integer)
+stickers_faved_limit_default
The maximum number of stickers a non-Premium user may add to Favorites » (integer)
+stickers_faved_limit_premium
The maximum number of stickers a Premium user may add to Favorites » (integer)
+dialog_filters_limit_default
The maximum number of folders a non-Premium user may create (integer)
+dialog_filters_limit_premium
The maximum number of folders a Premium user may create (integer)
+dialog_filters_chats_limit_default
The maximum number of chats a non-Premium user may add to a folder (integer)
+dialog_filters_chats_limit_premium
The maximum number of chats a Premium user may add to a folder (integer)
+dialogs_pinned_limit_default
The maximum number of chats a non-Premium user may pin (integer)
+dialogs_pinned_limit_premium
The maximum number of chats a Premium user may pin (integer)
+dialogs_folder_pinned_limit_default
The maximum number of chats a non-Premium user may pin in a folder (integer)
+dialogs_folder_pinned_limit_premium
The maximum number of chats a Premium user may pin in a folder (integer)
+channels_public_limit_default
The maximum number of public channels or supergroups a non-Premium user may create (integer)
+channels_public_limit_premium
The maximum number of public channels or supergroups a Premium user may create (integer)
+caption_length_limit_default
The maximum UTF-8 length of media captions sendable by non-Premium users (integer)
+caption_length_limit_premium
The maximum UTF-8 length of media captions sendable by non-Premium users (integer)
+upload_max_fileparts_default
The maximum size of files uploadable by non-Premium users (integer, indicates the number of 512kb file parts, so the size in bytes is determined by multiplying by 524288
)
upload_max_fileparts_premium
The maximum size of files uploadable by Premium users (integer, indicates the number of 512kb file parts, so the size in bytes is determined by multiplying by 524288
)
about_length_limit_default
The maximum UTF-8 length of bios of non-Premium users (integer)
+about_length_limit_premium
The maximum UTF-8 length of bios of Premium users (integer)
+premium_promo_order
Array of string identifiers, indicating the order of Telegram Premium features in the Telegram Premimum promotion popup, possible values:
+double_limits
- Should open a secondary popup with a list of the default/premium limits mentioned abovemore_upload
- Premium users can upload bigger files, as specified by the upload_max_fileparts_*
config keysfaster_download
- Premium users have no download speed limitsvoice_to_text
- Premium users can transcribe voice messagesno_ads
- Premium users see no Sponsored Messagesunique_reactions
- Premium users have access to more message reactionspremimum_stickers
- Premium users have access to premium stickersetsanimated_emoji
- Premium users can send custom animated emojisadvanced_chat_management
- Premium users can reorder the default folder, auto-archive and hide new chats from non-contacts.profile_badge
- Premium users have a badge next to their name, showing that they are helping support Telegramanimated_userpics
- Animated profile pictures of Premium users will play in-chat and when browsing the dialog listapp_icons
- Premium users can change the default icon of the Telegram apppremium_bot_username
Contains the username of the official Telegram Premium bot that may be used to buy a Telegram Premium subscription (string)
+premium_invoice_slug
Contains an invoice slug that may be used to buy a Telegram Premium subscription (string)
The API can return a set of useful suggestions for users of graphical clients.
This page describes how should client apps handle Premium features: for a user-friendly overview of Telegram Premium features, see the Telegram Premium FAQ.
Telegram
+Apps should implement a Telegram Premium modal, listing the Premium features contained in the premium_promo_order
app configuration parameter ».
Here's how to pay for a Telegram Premium subscription, when the user clicks on the subscribe button:
+premium_bot_username
field is set, call messages.startBot, specifying the following parameters:peer
and bot
: The bot mentioned in premium_bot_username
start_param
: One of the following values:double_limits
settings
profile
+Then, when the user clicks on the subscribe button in the sent invoice, follow the usual payment flow for message invoices. premium_invoice_slug
field is set, handle the payment as you would handle a t.me/$premium_invoice_slug
invoice deep link.If the premium_purchase_blocked
app configuration parameter is set, the user can't purchase a Premium account, and all Telegram Premium features must be hidden (like the stars of Premium users, Telegram Premium purchase buttons, and so on).
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.
Clients should automatically authenticate users when opening official Telegram websites, listed in the url_auth_domains
key of the client configuration object ».
Clients should automatically authenticate users when opening official Telegram websites, listed in the autologin_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#fragment=value
Modified URL: https://somedomain.telegram.org/path?query=string&autologin_token=$autologin_token#fragment=value