diff --git a/data/contest.com.html b/data/contest.com.html new file mode 100644 index 0000000000..bdf5cf55a8 --- /dev/null +++ b/data/contest.com.html @@ -0,0 +1,261 @@ + + + + + Developer Challenges + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+
+
+ +
+ +
+
+
+
+
+ +
+

Recent News

+

Subscribe to the Telegram Contests channel for the latest updates.

+

About the Platform

+

Everybody is welcome to try out works submitted by the contestants and create issues (with supporting videos and screenshots) if they encounter any problems.

+


+ +

Contestants can respond to issues. They appear on the platform under animal aliases to ensure fairness and transparency in testing. Admins will be around to do their own checks on the apps and tally up the results.

+
+
+
+ +

Contests

+ +
Animated Sticker Contest 2021. $50,000New
+
Mar 11 – Mar 26
+
+
Android Contest 2021, Round 2. $50,000
+
Mar 19 – Apr 4
+
+
watchOS Contest 2021. $47,000
+
Mar 5 – Mar 21
+
+
Android Contest 2021. $60,000
+
Jan 30 – Feb 14
+
+
iOS Animation Contest 2021. $50,000
+
Jan 15 – Jan 31
+
+
Aptitude Test Contest. €250,000
+
Dec 31, 2020 – Jan 9
+
+
JavaScript Contest, Bonus Round
+
Aug 18 – Sep 1, 2020
+
+
JavaScript Contest, Stage 3
+
May 30 – Jun 20, 2020
+
+
Data Clustering Contest, Stage 2. €100,000
+
May 11 – May 25, 2020
+
+
VoIP Contest, Stage 3. €50,000
+
Mar 9 – Mar 30, 2020
+
+
Blockchain Contest, Stage 2: Bonus Prize €80,000
+
Mar 6 – Mar 20, 2020
+
+
JavaScript Contest, Stage 2
+
Jan 31 – Feb 15, 2020
+
+
VoIP Contest, Stage 2. $75,000
+
Jan 14 – Jan 29, 2020
+
+
Blockchain Contest, Stage 2. $100,000
+
Dec 7 – Dec 22, 2019
+
+
Data Clustering Contest. $100,000
+
Nov 18 – Dec 2, 2019
+
+
Javascript Contest, Stage 1. $80,000+
+
Nov 3 – Nov 17, 2019
+
+
VoIP Contest, Stage 1. $50,000+
+
Oct 15 – Oct 26, 2019
+
+
Theme Design Contest. $25,000+
+
Oct 5 – Oct 20, 2019
+
+
Animated Stickers Contest. $25,000+
+
Oct 5 – Oct 20, 2019
+
+
Blockchain Contest. $200,000–400,000
+
Sep 24 – Oct 15, 2019
+
+
Bugs on Telegram
+
Jun 14 – Jun 23, 2019
+
+
Android Chart Competition. $50,000
+
Apr 7 – Apr 15, 2019
+
+
iOS Chart Competition. $50,000
+
Apr 7 – Apr 15, 2019
+
+
JavaScript Chart Competition. $50,000
+
Apr 7 – Apr 15, 2019
+
+
+
+ + + + + + + + + + + + + + diff --git a/data/core.telegram.org/api/folders.html b/data/core.telegram.org/api/folders.html new file mode 100644 index 0000000000..93daeb805d --- /dev/null +++ b/data/core.telegram.org/api/folders.html @@ -0,0 +1,179 @@ + + + + + Folders + + + + + + + + + + + + + +
+ +
+
+
+ +

Folders

+ +
+ +

Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.
+In the API, folders are called "dialog filters"; in the UI, they are typically represented as tabs.

+

Scheme:

+
dialogFilter#7438f7e8 flags:# contacts:flags.0?true non_contacts:flags.1?true groups:flags.2?true broadcasts:flags.3?true bots:flags.4?true exclude_muted:flags.11?true exclude_read:flags.12?true exclude_archived:flags.13?true id:int title:string emoticon:flags.25?string pinned_peers:Vector<InputPeer> include_peers:Vector<InputPeer> exclude_peers:Vector<InputPeer> = DialogFilter;
+
+dialogFilterSuggested#77744d4a filter:DialogFilter description:string = DialogFilterSuggested;
+
+updateDialogFilter#26ffde7d flags:# id:int filter:flags.0?DialogFilter = Update;
+updateDialogFilterOrder#a5d72105 order:Vector<int> = Update;
+updateDialogFilters#3504914f = Update;
+
+---functions---
+
+messages.getDialogFilters#f19ed96d = Vector<DialogFilter>;
+messages.getSuggestedDialogFilters#a29cd42c = Vector<DialogFilterSuggested>;
+messages.updateDialogFilter#1ad4a04a flags:# id:int filter:flags.0?DialogFilter = Bool;
+messages.updateDialogFiltersOrder#c563c1e4 order:Vector<int> = Bool;
+
+help.getAppConfig#98914110 = JSONValue;
+

Folders

+

On startup, clients call:

+ +

The boolean under the dialog_filters_tooltip JSON key in the result of help.getAppConfig can be used to determine whether a folder tooltip should be presented to the user right away.
+The UI should then show a list of suggested folder combinations.

+

Once configuration is finished, apps call messages.updateDialogFilter to create or update existing folders.
+As per the dialogFilter constructor, folders have multiple flags that can be combined to determine which chats should be included in (or excluded from) the folder.
+Folders can also have unlimited pinned chats, as determined by the pinned_peers field.

+

To reorder existing folders, messages.updateDialogFiltersOrder should be used with the IDs of the various dialog filters.

+

To delete folders, use messages.updateDialogFilter without populating the filter flag field.

+

Clients can receive updateDialogFilter, updateDialogFilterOrder updates with new filter information, generated by other clients when modifying folder info.
+Clients can also receive updateDialogFilters, in which case folder info should be refetched manually using messages.getDialogFilters.

+

Peer folders

+

The API also has another method for identifying groups of peers, typically used only by archived chats.

+

Scheme:

+
inputDialogPeer#fcaafeb7 peer:InputPeer = InputDialogPeer;
+inputDialogPeerFolder#64600527 folder_id:int = InputDialogPeer;
+
+dialogPeer#e56dbf05 peer:Peer = DialogPeer;
+dialogPeerFolder#514519e2 folder_id:int = DialogPeer;
+
+updateFolderPeers#19360dc0 folder_peers:Vector<FolderPeer> pts:int pts_count:int = Update;
+
+updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;
+
+---functions---
+
+folders.editPeerFolders#6847d0ab folder_peers:Vector<InputFolderPeer> = Updates;
+folders.deleteFolder#1c295881 folder_id:int = Updates;
+

API peer folders are typically used only by archived chats, and are really handy for distinguishing groups of peers, since most peer-related constructors (updates, chat info) will contain the folder_id assigned the the specified chat.

+

In Telegram apps, API peer folders are used only to implement the chat archive, identified by folder_id 1; all other peers are in folder_id 0 by default; no other folder_id is allowed at the moment.

+
    +
  • folders.editPeerFolders can be used to add and remove peers from peer folders.
  • +
  • folders.deleteFolder can be used to delete peer folders, moving all peers previously present in that folder to the default 0 folder.
  • +
+

Both methods return an updates constructor, containing a single updateFolderPeers with the new folder_id of moved peers.
+Clients can also receive updateFolderPeers as a normal update, generated by other clients when modifying peer folders.

+ +
+ +
+
+ +
+ + + + + + + + diff --git a/data/core.telegram.org/api/updates.html b/data/core.telegram.org/api/updates.html new file mode 100644 index 0000000000..5bcca1471a --- /dev/null +++ b/data/core.telegram.org/api/updates.html @@ -0,0 +1,226 @@ + + + + + Working with Updates + + + + + + + + + + + + + +
+ +
+
+
+ +

Working with Updates

+ +
+ +

When a client is being actively used, events will occur that affect the current user and that they must learn about as soon as possible, e.g. when a new message is received. To eliminate the need for the client itself to periodically download these events, there is an update delivery mechanism in which the server sends the user notifications over one of its available connections with the client.

+

Subscribing to Updates

+

Update events are sent to an authorized user into the last active connection (except for connections needed for downloading / uploading files).

+

So to start receiving updates the client needs to init connection and call API method, e.g. to fetch current state.

+

Event sequences

+

All events are received from the socket as a sequence of TL-serialized Updates objects, which might be optionally gzip-compressed in the same way as responses to queries.

+

Each Updates object may contain single or multiple Update objects, representing different events happening.

+

In order to apply all updates in precise order and to guarantee that no update is missed or applied twice there is seq attribute in Updates constructors, and pts (with pts_count) or qts attributes in Update constructors. The client must use those attributes values in combination with locally stored state to correctly apply incoming updates.

+

When a gap in updates sequence occurs, it must be filled via calling one of the API methods. More below »

+

Updates sequence

+

As said earlier, each payload with updates has a TL-type Updates. It can be seen from the schema below that this type has several constructors.

+
updatesTooLong#e317af7e = Updates;
+updateShort#78d4dec1 update:Update date:int = Updates;
+updateShortMessage#2296d2c8 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int user_id:int message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> = Updates;
+updateShortChatMessage#402d5dbb flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int from_id:int chat_id:int message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> = Updates;
+updateShortSentMessage#11f1331c flags:# out:flags.1?true id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector<MessageEntity> = Updates;
+updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates;
+updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;
+

updatesTooLong indicates that there are too many events pending to be pushed to the client, so one needs to fetch them manually.

+

Events inside updateShort constructors, normally, have lower priority and are broadcast to a large number of users, i.e. one of the chat participants started entering text in a big conversation (updateChatUserTyping).

+

The updateShortMessage, updateShortSentMessage and updateShortChatMessage constructors are redundant but help significantly reduce the transmitted message size for 90% of the updates. They should be transformed to updateShort upon receiving.

+

Two remaining constructors updates and updatesCombined are part of the Updates sequence. Both of them have seq attribute, which indicates the remote Updates state after the generation of the Updates, and seq_start indicates the remote Updates state after the first of the Updates in the packet is generated. For updates, seq_start attribute is omitted, because it is assumed that it is always equal to seq.

+

Message-related event sequences

+

Each event related to a message box (message created, message edited, message deleted, etc) is identified by a unique autoincremented pts (or qts in case of secret chats).

+

Each message box can be considered as some server-side DB table that stores messages and events associated with them. +All boxes are completely independent, and each pts sequence is tied to just one box (see below).

+

Update object may contain info about multiple events (for example, updateDeleteMessages). +That's why all single updates might have pts_count parameter indicating the number of events contained in the received update (with some exceptions, in this case, the pts_count is considered to be 0).

+

Each channel and supergroup has its message box and its event sequence as a result; private chats and legacy groups of one user have another common event sequence. +User's Secret chats have yet another common secret event sequence.

+

To recap, the client has to take care of the integrity of the following sequences to properly handle updates:

+
    +
  • Updates sequence (seq)
      +
    • Common message box sequence (pts)
    • +
    • Secret message box sequence (qts)
    • +
    • Channel message box sequence 1 (pts)
    • +
    • Channel message box sequence 2 (pts)
    • +
    • Channel message box sequence 3 (pts)
    • +
    • and so on...
    • +
    +
  • +
+

Fetching state

+

The common update state is represented by the updates.State constructor. +When the user logs in for the first time, call to updates.getState has to be made to store the latest update state (which will not be the absolute initial state, just the latest state at the current time). +The common update state can also be fetched from updates.differenceTooLong.

+

The channel update state is represented simply by the pts of the event sequence: when first logging in, the initial channel state can be obtained from the dialog constructor when fetching dialogs, from the full channel info, or it can be received as an updateChannelTooLong update.

+

The secret chat update state is represented by the qts of the secret event sequence, it is contained in the updates.State of the common update state.

+

The Updates sequence state is represented by the date and seq of the Updates sequence, it is contained in the updates.State of the common update state.

+

Update handling

+

Update handling in Telegram clients consists of receiving events, making sure there were no gaps and no events were missed based on the locally stored state of the correspondent event sequence, and then updating the locally stored state based on the parameters received.

+

When the client receives payload with serialized updates, first of all, it needs to walk through all of the nested Update objects and check if they belong to any of message box sequences (have pts or qts parameters). Those updates need to be handled separately according to corresponding local state and new pts/qts values. Details below »

+

After message box updates are handled, if there are any other updates remaining the client needs to handle them with respect to seq. Details below »

+

pts: checking and applying

+

Here, local_pts will be the local state, pts will be the remote state, pts_count will be the number of events in the update.

+

If local_pts + pts_count === pts, the update can be applied. +If local_pts + pts_count > pts, the update was already applied, and must be ignored. +If local_pts + pts_count < pts, there's an update gap that must be filled.

+

For example, let's assume the client has the following local state for the channel 123456789:

+
local_pts = 131
+

Now let's assume an updateNewChannelMessage from channel 123456789 is received with pts = 132 and pts_count=1. +Since local_pts + pts_count === pts, the total number of events since the last stored state is, in fact, equal to pts_count: this means the update can be safely accepted and the remote pts applied:

+
local_pts = 132
+

Since:

+
    +
  • pts indicates the server state after the new channel message events are generated
  • +
  • pts_count indicates the number of events in the new channel update
  • +
  • The server state before the new channel message event was generated has to be: pts_before = pts - pts_count = 131, which is, in fact, equal to our local state.
  • +
+

Now let's assume an updateNewChannelMessage from channel 123456789 is received with pts = 132 and pts_count=1. +Since local_pts + pts_count > pts (133 > 132), the update is skipped because we've already handled this update (in fact, our current local_pts was set by this same update, and it was resent twice due to network issues or other issues).

+

Now let's assume an updateDeleteChannelMessages from channel 123456789 is received with pts = 140 and pts_count=5. +Since local_pts + pts_count < pts (137 < 140), this means that updates were missed, and the gap must be recovered.

+
Secret chats
+

The whole process is very similar for secret chats, but there is qts instead of pts, and events are never grouped, so it's assumed that qts_count is always equal to 1.

+

seq: checking and applying

+

On top level when handling received updates and updatesCombined there are three possible cases: +If local_seq + 1 === seq_start, the updates can be applied. +If local_seq + 1 > seq_start, the updates were already applied, and must be ignored. +If local_seq + 1 < seq_start, there's an updates gap that must be filled (updates.getDifference must be used as with common and secret event sequences).

+

If the updates were applied, local Updates state must be updated with seq and date from the constructor.

+

For all the other Updates type constructors there is no need to check seq or change a local state.

+

Recovering gaps

+

To do this, updates.getDifference (common/secret state) or updates.getChannelDifference (channel state) with the respective local states must be called. +These methods should also be called on startup, to fetch new updates (preferably with some flags to reduce server load, see the method's docs). +Manually obtaining updates is also required in the following situations:

+
    +
  • Loss of sync: a gap was found in seq / pts / qts (as described above). It may be useful to wait up to 0.5 seconds in this situation and abort the sync in case a new update arrives, that fills the gap.
  • +
  • Session loss on the server: the client receives a new session created notification. This can be caused by garbage collection on the MTProto server or a server reboot.
  • +
  • Incorrect update: the client cannot deserialize the received data.
  • +
  • Incomplete update: the client is missing data about a chat/user from one of the shortened constructors, such as updateShortChatMessage, etc.
  • +
  • Long period without updates: no updates for 15 minutes or longer.
  • +
  • The server requests the client to fetch the difference using updateChannelTooLong or updatesTooLong.
  • +
+

When calling updates.getDifference if the updates.differenceSlice constructor is returned in response, the full difference was too large to be received in one request. The intermediate status, intermediate_state, must be saved on the client and the query must be repeated, using the intermediate status as the current status.

+

To fetch the updates difference of a channel, updates.getChannelDifference is used. +If the difference is too large to be received in one request, the final flag of the result is not set (see docs). +The intermediate status, represented by the pts, must be saved on the client and the query must be repeated, using the intermediate status as the current status.

+

For perfomance reasons and for better user experience, client can set maximum gap size to be filled: pts_total_limit parameter of updates.getDifference and limit parameter for updates.getChannelDifference can be used.

+

If the gap is too large and there are too many updates to fetch, a *TooLong constructor will be returned. In this case, the client must re-fetch the state, re-start fetching updates from that state and follow the instructions that can be found here.

+

It is recommended to use limit 10-100 for channels and 1000-10000 otherwise.

+

Example implementations

+

Implementations also have to take care to postpone updates received via the socket while filling gaps in the event and Update sequences, as well as avoid filling gaps in the same sequence.

+

Example implementations: tdlib, MadelineProto.

+

An interesting and easy way this can be implemented, instead of using various locks, is by running background loops, like in MadelineProto ».

+

PUSH Notifications about Updates

+

If a client does not have an active connection at the time of an event, PUSH Notifications will also be useful.

+ +
+ +
+
+ +
+ + + + + + + + diff --git a/data/core.telegram.org/constructor/account.authorizations b/data/core.telegram.org/constructor/account.authorizations new file mode 100644 index 0000000000..a8366528f3 --- /dev/null +++ b/data/core.telegram.org/constructor/account.authorizations @@ -0,0 +1,147 @@ + + + + + account.authorizations + + + + + + + + + + + + + +
+ +
+
+
+ +

account.authorizations

+ +

Logged-in sessions

+

+
account.authorizations#1250abde authorizations:Vector<Authorization> = account.Authorizations;

+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
authorizationsVector<Authorization>Logged-in sessions
+

Type

+

account.Authorizations

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/auth.sentCodeTypeApp b/data/core.telegram.org/constructor/auth.sentCodeTypeApp new file mode 100644 index 0000000000..79ae3f2c22 --- /dev/null +++ b/data/core.telegram.org/constructor/auth.sentCodeTypeApp @@ -0,0 +1,147 @@ + + + + + auth.sentCodeTypeApp + + + + + + + + + + + + + +
+ +
+
+
+ +

auth.sentCodeTypeApp

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/auth.sentCodeTypeSms b/data/core.telegram.org/constructor/auth.sentCodeTypeSms new file mode 100644 index 0000000000..8123d72cbb --- /dev/null +++ b/data/core.telegram.org/constructor/auth.sentCodeTypeSms @@ -0,0 +1,147 @@ + + + + + auth.sentCodeTypeSms + + + + + + + + + + + + + +
+ +
+
+
+ +

auth.sentCodeTypeSms

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/channelAdminLogEventActionToggleInvites.html b/data/core.telegram.org/constructor/channelAdminLogEventActionToggleInvites.html new file mode 100644 index 0000000000..7256ba2dfa --- /dev/null +++ b/data/core.telegram.org/constructor/channelAdminLogEventActionToggleInvites.html @@ -0,0 +1,147 @@ + + + + + channelAdminLogEventActionToggleInvites + + + + + + + + + + + + + +
+ +
+
+
+ +

channelAdminLogEventActionToggleInvites

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/channelAdminLogEventActionToggleSlowMode.html b/data/core.telegram.org/constructor/channelAdminLogEventActionToggleSlowMode.html new file mode 100644 index 0000000000..6027ab610a --- /dev/null +++ b/data/core.telegram.org/constructor/channelAdminLogEventActionToggleSlowMode.html @@ -0,0 +1,155 @@ + + + + + channelAdminLogEventActionToggleSlowMode + + + + + + + + + + + + + +
+ +
+
+
+ +

channelAdminLogEventActionToggleSlowMode

+ +

Slow mode setting for supergroups was changed

+

+
channelAdminLogEventActionToggleSlowMode#53909779 prev_value:int new_value:int = ChannelAdminLogEventAction;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
prev_valueintPrevious slow mode value
new_valueintNew slow mode value
+

Type

+

ChannelAdminLogEventAction

+

Related pages

+

channels.toggleSlowMode

+

Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/channelParticipantSelf.html b/data/core.telegram.org/constructor/channelParticipantSelf.html new file mode 100644 index 0000000000..58defa03e8 --- /dev/null +++ b/data/core.telegram.org/constructor/channelParticipantSelf.html @@ -0,0 +1,157 @@ + + + + + channelParticipantSelf + + + + + + + + + + + + + +
+ +
+
+
+ +

channelParticipantSelf

+ +

Myself

+

+
channelParticipantSelf#a3289a6d user_id:int inviter_id:int date:int = ChannelParticipant;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
user_idintUser ID
inviter_idintUser that invited me to the channel/supergroup
dateintWhen did I join the channel/supergroup
+

Type

+

ChannelParticipant

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/channelParticipantsRecent.html b/data/core.telegram.org/constructor/channelParticipantsRecent.html new file mode 100644 index 0000000000..a00ba54d16 --- /dev/null +++ b/data/core.telegram.org/constructor/channelParticipantsRecent.html @@ -0,0 +1,132 @@ + + + + + channelParticipantsRecent + + + + + + + + + + + + + +
+ +
+
+
+ +

channelParticipantsRecent

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/chatInviteAlready.html b/data/core.telegram.org/constructor/chatInviteAlready.html new file mode 100644 index 0000000000..b65dbbdf90 --- /dev/null +++ b/data/core.telegram.org/constructor/chatInviteAlready.html @@ -0,0 +1,147 @@ + + + + + chatInviteAlready + + + + + + + + + + + + + +
+ +
+
+
+ +

chatInviteAlready

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/decryptedMessageActionFlushHistory.html b/data/core.telegram.org/constructor/decryptedMessageActionFlushHistory.html new file mode 100644 index 0000000000..fbd24979cf --- /dev/null +++ b/data/core.telegram.org/constructor/decryptedMessageActionFlushHistory.html @@ -0,0 +1,133 @@ + + + + + decryptedMessageActionFlushHistory + + + + + + + + + + + + + +
+ +
+
+
+ +

decryptedMessageActionFlushHistory

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/decryptedMessageActionScreenshotMessages.html b/data/core.telegram.org/constructor/decryptedMessageActionScreenshotMessages.html new file mode 100644 index 0000000000..81ba8b7d01 --- /dev/null +++ b/data/core.telegram.org/constructor/decryptedMessageActionScreenshotMessages.html @@ -0,0 +1,148 @@ + + + + + decryptedMessageActionScreenshotMessages + + + + + + + + + + + + + +
+ +
+
+
+ +

decryptedMessageActionScreenshotMessages

+ +

A screenshot was taken.

+

+
===8===
+decryptedMessageActionScreenshotMessages#8ac1f475 random_ids:Vector<long> = DecryptedMessageAction;

+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
random_idsVector<long>List of affected message ids (that appeared on the screenshot)
+

Type

+

DecryptedMessageAction

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/disabledFeature.html b/data/core.telegram.org/constructor/disabledFeature.html new file mode 100644 index 0000000000..45f9a9498a --- /dev/null +++ b/data/core.telegram.org/constructor/disabledFeature.html @@ -0,0 +1,163 @@ + + + + + disabledFeature + + + + + + + + + + + + + +
+ +
+
+
+ +

disabledFeature

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/emojiKeywordDeleted.html b/data/core.telegram.org/constructor/emojiKeywordDeleted.html new file mode 100644 index 0000000000..71635fb927 --- /dev/null +++ b/data/core.telegram.org/constructor/emojiKeywordDeleted.html @@ -0,0 +1,152 @@ + + + + + emojiKeywordDeleted + + + + + + + + + + + + + +
+ +
+
+
+ +

emojiKeywordDeleted

+ +

Deleted emoji keyword

+

+
emojiKeywordDeleted#236df622 keyword:string emoticons:Vector<string> = EmojiKeyword;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
keywordstringKeyword
emoticonsVector<string>Emojis that were associated to keyword
+

Type

+

EmojiKeyword

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/help.promoDataEmpty b/data/core.telegram.org/constructor/help.promoDataEmpty new file mode 100644 index 0000000000..bdc2f99481 --- /dev/null +++ b/data/core.telegram.org/constructor/help.promoDataEmpty @@ -0,0 +1,147 @@ + + + + + help.promoDataEmpty + + + + + + + + + + + + + +
+ +
+
+
+ +

help.promoDataEmpty

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/inputChannel.html b/data/core.telegram.org/constructor/inputChannel.html new file mode 100644 index 0000000000..fc4ca89d96 --- /dev/null +++ b/data/core.telegram.org/constructor/inputChannel.html @@ -0,0 +1,155 @@ + + + + + inputChannel + + + + + + + + + + + + + +
+ +
+
+
+ +

inputChannel

+ +

Represents a channel

+

+
inputChannel#afeb712e channel_id:int access_hash:long = InputChannel;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
channel_idintChannel ID
access_hashlongAccess hash taken from the channel constructor
+

Type

+

InputChannel

+

Related pages

+

channel

+

Channel/supergroup info

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/inputMessageID.html b/data/core.telegram.org/constructor/inputMessageID.html new file mode 100644 index 0000000000..22913e6fa8 --- /dev/null +++ b/data/core.telegram.org/constructor/inputMessageID.html @@ -0,0 +1,147 @@ + + + + + inputMessageID + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/inputMessageReplyTo.html b/data/core.telegram.org/constructor/inputMessageReplyTo.html new file mode 100644 index 0000000000..dad53bc175 --- /dev/null +++ b/data/core.telegram.org/constructor/inputMessageReplyTo.html @@ -0,0 +1,147 @@ + + + + + inputMessageReplyTo + + + + + + + + + + + + + +
+ +
+
+
+ +

inputMessageReplyTo

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/inputMessagesFilterContacts.html b/data/core.telegram.org/constructor/inputMessagesFilterContacts.html new file mode 100644 index 0000000000..c57c223963 --- /dev/null +++ b/data/core.telegram.org/constructor/inputMessagesFilterContacts.html @@ -0,0 +1,132 @@ + + + + + inputMessagesFilterContacts + + + + + + + + + + + + + +
+ +
+
+
+ +

inputMessagesFilterContacts

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/inputMessagesFilterEmpty.html b/data/core.telegram.org/constructor/inputMessagesFilterEmpty.html new file mode 100644 index 0000000000..d1a506c9fe --- /dev/null +++ b/data/core.telegram.org/constructor/inputMessagesFilterEmpty.html @@ -0,0 +1,132 @@ + + + + + inputMessagesFilterEmpty + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/inputPeerSelf.html b/data/core.telegram.org/constructor/inputPeerSelf.html new file mode 100644 index 0000000000..30d3449355 --- /dev/null +++ b/data/core.telegram.org/constructor/inputPeerSelf.html @@ -0,0 +1,132 @@ + + + + + inputPeerSelf + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/inputPrivacyKeyAddedByPhone.html b/data/core.telegram.org/constructor/inputPrivacyKeyAddedByPhone.html new file mode 100644 index 0000000000..aa4d8e2fd9 --- /dev/null +++ b/data/core.telegram.org/constructor/inputPrivacyKeyAddedByPhone.html @@ -0,0 +1,132 @@ + + + + + inputPrivacyKeyAddedByPhone + + + + + + + + + + + + + +
+ +
+
+
+ +

inputPrivacyKeyAddedByPhone

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/inputPrivacyKeyStatusTimestamp.html b/data/core.telegram.org/constructor/inputPrivacyKeyStatusTimestamp.html new file mode 100644 index 0000000000..c669e1eea6 --- /dev/null +++ b/data/core.telegram.org/constructor/inputPrivacyKeyStatusTimestamp.html @@ -0,0 +1,132 @@ + + + + + inputPrivacyKeyStatusTimestamp + + + + + + + + + + + + + +
+ +
+
+
+ +

inputPrivacyKeyStatusTimestamp

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/jsonArray.html b/data/core.telegram.org/constructor/jsonArray.html new file mode 100644 index 0000000000..69c9337c30 --- /dev/null +++ b/data/core.telegram.org/constructor/jsonArray.html @@ -0,0 +1,147 @@ + + + + + jsonArray + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/jsonObjectValue.html b/data/core.telegram.org/constructor/jsonObjectValue.html new file mode 100644 index 0000000000..4a568a9deb --- /dev/null +++ b/data/core.telegram.org/constructor/jsonObjectValue.html @@ -0,0 +1,152 @@ + + + + + jsonObjectValue + + + + + + + + + + + + + +
+ +
+
+
+ +

jsonObjectValue

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/langPackString.html b/data/core.telegram.org/constructor/langPackString.html new file mode 100644 index 0000000000..3fde904173 --- /dev/null +++ b/data/core.telegram.org/constructor/langPackString.html @@ -0,0 +1,152 @@ + + + + + langPackString + + + + + + + + + + + + + +
+ +
+
+
+ +

langPackString

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/messageActionScreenshotTaken.html b/data/core.telegram.org/constructor/messageActionScreenshotTaken.html new file mode 100644 index 0000000000..8ae3fc3607 --- /dev/null +++ b/data/core.telegram.org/constructor/messageActionScreenshotTaken.html @@ -0,0 +1,132 @@ + + + + + messageActionScreenshotTaken + + + + + + + + + + + + + +
+ +
+
+
+ +

messageActionScreenshotTaken

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/messageActionSecureValuesSent.html b/data/core.telegram.org/constructor/messageActionSecureValuesSent.html new file mode 100644 index 0000000000..a48098c816 --- /dev/null +++ b/data/core.telegram.org/constructor/messageActionSecureValuesSent.html @@ -0,0 +1,149 @@ + + + + + messageActionSecureValuesSent + + + + + + + + + + + + + +
+ +
+
+
+ +

messageActionSecureValuesSent

+ +

Request for secure telegram passport values was sent

+

+
messageActionSecureValuesSent#d95c6154 types:Vector<SecureValueType> = MessageAction;

+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
typesVector<SecureValueType>Secure value types
+

Type

+

MessageAction

+

Related pages

+

Telegram Passport Manual

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/messageEntityItalic.html b/data/core.telegram.org/constructor/messageEntityItalic.html new file mode 100644 index 0000000000..20abf931eb --- /dev/null +++ b/data/core.telegram.org/constructor/messageEntityItalic.html @@ -0,0 +1,152 @@ + + + + + messageEntityItalic + + + + + + + + + + + + + +
+ +
+
+
+ +

messageEntityItalic

+ +

Message entity representing italic text.

+

+
messageEntityItalic#826f8b60 offset:int length:int = MessageEntity;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
offsetintOffset of message entity within message (in UTF-8 codepoints)
lengthintLength of message entity within message (in UTF-8 codepoints)
+

Type

+

MessageEntity

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/messages.chatFull b/data/core.telegram.org/constructor/messages.chatFull new file mode 100644 index 0000000000..cab43152c5 --- /dev/null +++ b/data/core.telegram.org/constructor/messages.chatFull @@ -0,0 +1,157 @@ + + + + + messages.chatFull + + + + + + + + + + + + + +
+ +
+
+
+ +

messages.chatFull

+ +

Extended info on chat and auxiliary data.

+

+
messages.chatFull#e5d7d19c full_chat:ChatFull chats:Vector<Chat> users:Vector<User> = messages.ChatFull;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
full_chatChatFullExtended info on a chat
chatsVector<Chat>List containing basic info on chat
usersVector<User>List of users mentioned above
+

Type

+

messages.ChatFull

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/messages.messageViews b/data/core.telegram.org/constructor/messages.messageViews new file mode 100644 index 0000000000..3113b43e43 --- /dev/null +++ b/data/core.telegram.org/constructor/messages.messageViews @@ -0,0 +1,157 @@ + + + + + messages.messageViews + + + + + + + + + + + + + +
+ +
+
+
+ +

messages.messageViews

+ +

View, forward counter + info about replies

+

+
messages.messageViews#b6c4f543 views:Vector<MessageViews> chats:Vector<Chat> users:Vector<User> = messages.MessageViews;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
viewsVector<MessageViews>View, forward counter + info about replies
chatsVector<Chat>Chats mentioned in constructor
usersVector<User>Users mentioned in constructor
+

Type

+

messages.MessageViews

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/messages.recentStickers b/data/core.telegram.org/constructor/messages.recentStickers new file mode 100644 index 0000000000..56afa717dc --- /dev/null +++ b/data/core.telegram.org/constructor/messages.recentStickers @@ -0,0 +1,165 @@ + + + + + messages.recentStickers + + + + + + + + + + + + + +
+ +
+
+
+ +

messages.recentStickers

+ +

Recently used stickers

+

+
messages.recentStickers#22f3afb3 hash:int packs:Vector<StickerPack> stickers:Vector<Document> dates:Vector<int> = messages.RecentStickers;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
hashintHash for pagination, for more info click here
packsVector<StickerPack>Emojis associated to stickers
stickersVector<Document>Recent stickers
datesVector<int>When was each sticker last used
+

Type

+

messages.RecentStickers

+

Related pages

+

Pagination in the API

+

How to fetch results from large lists of objects.

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/pageBlockParagraph.html b/data/core.telegram.org/constructor/pageBlockParagraph.html new file mode 100644 index 0000000000..aa07fda5dd --- /dev/null +++ b/data/core.telegram.org/constructor/pageBlockParagraph.html @@ -0,0 +1,147 @@ + + + + + pageBlockParagraph + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow.html b/data/core.telegram.org/constructor/passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow.html new file mode 100644 index 0000000000..452a9767b1 --- /dev/null +++ b/data/core.telegram.org/constructor/passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow.html @@ -0,0 +1,165 @@ + + + + + passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow + + + + + + + + + + + + + +
+ +
+
+
+ +

passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow

+ +

This key derivation algorithm defines that SRP 2FA login must be used

+

+
passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow#3a912d4a salt1:bytes salt2:bytes g:int p:bytes = PasswordKdfAlgo;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
salt1bytesOne of two salts used by the derivation function (see SRP 2FA login)
salt2bytesOne of two salts used by the derivation function (see SRP 2FA login)
gintBase (see SRP 2FA login)
pbytes2048-bit modulus (see SRP 2FA login)
+

Type

+

PasswordKdfAlgo

+

Related pages

+

Two-factor authentication

+

How to login to a user's account if they have enabled 2FA, how to change password.

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/payments.bankCardData b/data/core.telegram.org/constructor/payments.bankCardData new file mode 100644 index 0000000000..ec70b5af75 --- /dev/null +++ b/data/core.telegram.org/constructor/payments.bankCardData @@ -0,0 +1,152 @@ + + + + + payments.bankCardData + + + + + + + + + + + + + +
+ +
+
+
+ +

payments.bankCardData

+ +

Credit card info, provided by the card's bank(s)

+

+
payments.bankCardData#3e24e573 title:string open_urls:Vector<BankCardOpenUrl> = payments.BankCardData;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
titlestringCredit card title
open_urlsVector<BankCardOpenUrl>Info URL(s) provided by the card's bank(s)
+

Type

+

payments.BankCardData

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/phoneCallDiscardReasonDisconnect.html b/data/core.telegram.org/constructor/phoneCallDiscardReasonDisconnect.html new file mode 100644 index 0000000000..12aecd88f7 --- /dev/null +++ b/data/core.telegram.org/constructor/phoneCallDiscardReasonDisconnect.html @@ -0,0 +1,132 @@ + + + + + phoneCallDiscardReasonDisconnect + + + + + + + + + + + + + +
+ +
+
+
+ +

phoneCallDiscardReasonDisconnect

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/photoSizeEmpty.html b/data/core.telegram.org/constructor/photoSizeEmpty.html new file mode 100644 index 0000000000..b5b911a269 --- /dev/null +++ b/data/core.telegram.org/constructor/photoSizeEmpty.html @@ -0,0 +1,150 @@ + + + + + photoSizeEmpty + + + + + + + + + + + + + +
+ +
+
+
+ +

photoSizeEmpty

+ +

Empty constructor. Image with this thumbnail is unavailable.

+

+
photoSizeEmpty#e17e23c type:string = PhotoSize;

+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
typestringThumbnail type (see. photoSize)
+

Type

+

PhotoSize

+

Related pages

+

photoSize

+

Image description.

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/privacyKeyForwards.html b/data/core.telegram.org/constructor/privacyKeyForwards.html new file mode 100644 index 0000000000..be8641d55f --- /dev/null +++ b/data/core.telegram.org/constructor/privacyKeyForwards.html @@ -0,0 +1,132 @@ + + + + + privacyKeyForwards + + + + + + + + + + + + + +
+ +
+
+
+ +

privacyKeyForwards

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/sendMessageChooseContactAction.html b/data/core.telegram.org/constructor/sendMessageChooseContactAction.html new file mode 100644 index 0000000000..99d4547b01 --- /dev/null +++ b/data/core.telegram.org/constructor/sendMessageChooseContactAction.html @@ -0,0 +1,132 @@ + + + + + sendMessageChooseContactAction + + + + + + + + + + + + + +
+ +
+
+
+ +

sendMessageChooseContactAction

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/sendMessageUploadDocumentAction.html b/data/core.telegram.org/constructor/sendMessageUploadDocumentAction.html new file mode 100644 index 0000000000..0ed8dbad29 --- /dev/null +++ b/data/core.telegram.org/constructor/sendMessageUploadDocumentAction.html @@ -0,0 +1,147 @@ + + + + + sendMessageUploadDocumentAction + + + + + + + + + + + + + +
+ +
+
+
+ +

sendMessageUploadDocumentAction

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/statsGroupTopPoster.html b/data/core.telegram.org/constructor/statsGroupTopPoster.html new file mode 100644 index 0000000000..392a88b38b --- /dev/null +++ b/data/core.telegram.org/constructor/statsGroupTopPoster.html @@ -0,0 +1,160 @@ + + + + + statsGroupTopPoster + + + + + + + + + + + + + +
+ +
+
+
+ +

statsGroupTopPoster

+ +

Information about an active user in a supergroup

+

+
statsGroupTopPoster#18f3d0f7 user_id:int messages:int avg_chars:int = StatsGroupTopPoster;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
user_idintUser ID
messagesintNumber of messages for statistics period in consideration
avg_charsintAverage number of characters per message
+

Type

+

StatsGroupTopPoster

+

Related pages

+

Channel statistics

+

Telegram offers detailed channel statistics for channels and supergroups.

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/storage.fileWebp b/data/core.telegram.org/constructor/storage.fileWebp new file mode 100644 index 0000000000..3f82f6bf46 --- /dev/null +++ b/data/core.telegram.org/constructor/storage.fileWebp @@ -0,0 +1,132 @@ + + + + + storage.fileWebp + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/topPeerCategoryBotsPM.html b/data/core.telegram.org/constructor/topPeerCategoryBotsPM.html new file mode 100644 index 0000000000..86cfabcdce --- /dev/null +++ b/data/core.telegram.org/constructor/topPeerCategoryBotsPM.html @@ -0,0 +1,132 @@ + + + + + topPeerCategoryBotsPM + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/topPeerCategoryPhoneCalls.html b/data/core.telegram.org/constructor/topPeerCategoryPhoneCalls.html new file mode 100644 index 0000000000..02940b1063 --- /dev/null +++ b/data/core.telegram.org/constructor/topPeerCategoryPhoneCalls.html @@ -0,0 +1,132 @@ + + + + + topPeerCategoryPhoneCalls + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/updateRecentStickers.html b/data/core.telegram.org/constructor/updateRecentStickers.html new file mode 100644 index 0000000000..a1e448e3db --- /dev/null +++ b/data/core.telegram.org/constructor/updateRecentStickers.html @@ -0,0 +1,132 @@ + + + + + updateRecentStickers + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + diff --git a/data/core.telegram.org/constructor/updateWebPage.html b/data/core.telegram.org/constructor/updateWebPage.html new file mode 100644 index 0000000000..209527cc75 --- /dev/null +++ b/data/core.telegram.org/constructor/updateWebPage.html @@ -0,0 +1,160 @@ + + + + + updateWebPage + + + + + + + + + + + + + +
+ +
+
+
+ +

updateWebPage

+ +

An instant view webpage preview was generated

+

+
updateWebPage#7f891213 webpage:WebPage pts:int pts_count:int = Update;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
webpageWebPageWebpage preview
ptsintEvent count after generation
pts_countintNumber of events that were generated
+

Type

+

Update

+

Related pages

+

Working with Updates

+

How to subscribe to updates and handle them properly.

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/account.getAllSecureValues b/data/core.telegram.org/method/account.getAllSecureValues new file mode 100644 index 0000000000..f0bd9a82dc --- /dev/null +++ b/data/core.telegram.org/method/account.getAllSecureValues @@ -0,0 +1,136 @@ + + + + + account.getAllSecureValues + + + + + + + + + + + + + +
+ +
+
+
+ +

account.getAllSecureValues

+ +

Get all saved Telegram Passport documents, for more info see the passport docs »

+

+
---functions---
+account.getAllSecureValues#b288bc7d = Vector<SecureValue>;

+

Parameters

+

This constructor does not require any parameters.

+

Result

+

Vector<SecureValue>

+

Related pages

+

Telegram Passport Manual

+

Telegram Passport Encryption Details

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/account.resetNotifySettings b/data/core.telegram.org/method/account.resetNotifySettings new file mode 100644 index 0000000000..d73be3f0e0 --- /dev/null +++ b/data/core.telegram.org/method/account.resetNotifySettings @@ -0,0 +1,135 @@ + + + + + account.resetNotifySettings + + + + + + + + + + + + + +
+ +
+
+
+ +

account.resetNotifySettings

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/account.sendConfirmPhoneCode b/data/core.telegram.org/method/account.sendConfirmPhoneCode new file mode 100644 index 0000000000..e448ca5830 --- /dev/null +++ b/data/core.telegram.org/method/account.sendConfirmPhoneCode @@ -0,0 +1,174 @@ + + + + + account.sendConfirmPhoneCode + + + + + + + + + + + + + +
+ +
+
+
+ +

account.sendConfirmPhoneCode

+ +

Send confirmation code to cancel account deletion, for more info click here »

+

+
auth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode;
+---functions---
+account.sendConfirmPhoneCode#1b3faa88 hash:string settings:CodeSettings = auth.SentCode;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
hashstringThe hash from the service notification, for more info click here »
settingsCodeSettingsPhone code settings
+

Result

+

auth.SentCode

+

Possible errors

+ + + + + + + + + + + + + + + +
CodeTypeDescription
400HASH_INVALIDThe provided hash is invalid
+

Related pages

+

Account deletion

+

How to reset an account if the 2FA password was forgotten.

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/account.uploadWallPaper b/data/core.telegram.org/method/account.uploadWallPaper new file mode 100644 index 0000000000..dc21790ac0 --- /dev/null +++ b/data/core.telegram.org/method/account.uploadWallPaper @@ -0,0 +1,160 @@ + + + + + account.uploadWallPaper + + + + + + + + + + + + + +
+ +
+
+
+ +

account.uploadWallPaper

+ +

Create and upload a new wallpaper

+

+
wallPaper#a437c3ed id:long flags:# creator:flags.0?true default:flags.1?true pattern:flags.3?true dark:flags.4?true access_hash:long slug:string document:Document settings:flags.2?WallPaperSettings = WallPaper;
+wallPaperNoFile#8af40b25 flags:# default:flags.1?true dark:flags.4?true settings:flags.2?WallPaperSettings = WallPaper;
+---functions---
+account.uploadWallPaper#dd853661 file:InputFile mime_type:string settings:WallPaperSettings = WallPaper;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
fileInputFileThe JPG/PNG wallpaper
mime_typestringMIME type of uploaded wallpaper
settingsWallPaperSettingsWallpaper settings
+

Result

+

WallPaper

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/channels.toggleSlowMode b/data/core.telegram.org/method/channels.toggleSlowMode new file mode 100644 index 0000000000..6e87887d06 --- /dev/null +++ b/data/core.telegram.org/method/channels.toggleSlowMode @@ -0,0 +1,200 @@ + + + + + channels.toggleSlowMode + + + + + + + + + + + + + +
+ +
+
+
+ +

channels.toggleSlowMode

+ +

Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds

+

+
updatesTooLong#e317af7e = Updates;
+updateShortMessage#2296d2c8 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int user_id:int message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> = Updates;
+updateShortChatMessage#402d5dbb flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int from_id:int chat_id:int message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> = Updates;
+updateShort#78d4dec1 update:Update date:int = Updates;
+updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates;
+updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;
+updateShortSentMessage#11f1331c flags:# out:flags.1?true id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector<MessageEntity> = Updates;
+---functions---
+channels.toggleSlowMode#edd49ef0 channel:InputChannel seconds:int = Updates;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
channelInputChannelThe supergroup
secondsintUsers will only be able to send one message every seconds seconds, 0 to disable the limitation
+

Result

+

Updates

+

Possible errors

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeTypeDescription
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this
400CHAT_NOT_MODIFIEDThe pinned message wasn't modified
400INPUT_METHOD_INVALID_1192227_XInvalid method
400INPUT_METHOD_INVALID_1604042050_XInvalid method
400SECONDS_INVALIDInvalid duration provided
+

Related pages

+

Channels

+

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

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/contacts.blockFromReplies b/data/core.telegram.org/method/contacts.blockFromReplies new file mode 100644 index 0000000000..78318c23b1 --- /dev/null +++ b/data/core.telegram.org/method/contacts.blockFromReplies @@ -0,0 +1,179 @@ + + + + + contacts.blockFromReplies + + + + + + + + + + + + + +
+ +
+
+
+ +

contacts.blockFromReplies

+ +

Stop getting notifications about thread replies of a certain user in @replies

+

+
updatesTooLong#e317af7e = Updates;
+updateShortMessage#2296d2c8 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int user_id:int message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> = Updates;
+updateShortChatMessage#402d5dbb flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int from_id:int chat_id:int message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> = Updates;
+updateShort#78d4dec1 update:Update date:int = Updates;
+updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates;
+updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;
+updateShortSentMessage#11f1331c flags:# out:flags.1?true id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector<MessageEntity> = Updates;
+---functions---
+contacts.blockFromReplies#29a8962c flags:# delete_message:flags.0?true delete_history:flags.1?true report_spam:flags.2?true msg_id:int = Updates;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
flags#Flags, see TL conditional fields
delete_messageflags.0?trueWhether to delete the specified message as well
delete_historyflags.1?trueWhether to delete all @replies messages from this user as well
report_spamflags.2?trueWhether to also report this user for spam
msg_idintID of the message in the @replies chat
+

Result

+

Updates

+

Bots can use this method

+

Related pages

+

Threads

+

Telegram allows commenting on a channel post or on a generic supergroup message, thanks to message threads.

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/contacts.getContacts b/data/core.telegram.org/method/contacts.getContacts new file mode 100644 index 0000000000..b3d8c4aac9 --- /dev/null +++ b/data/core.telegram.org/method/contacts.getContacts @@ -0,0 +1,155 @@ + + + + + contacts.getContacts + + + + + + + + + + + + + +
+ +
+
+
+ +

contacts.getContacts

+ +

Returns the current user's contact list.

+

+
contacts.contactsNotModified#b74ba9d2 = contacts.Contacts;
+contacts.contacts#eae87e42 contacts:Vector<Contact> saved_count:int users:Vector<User> = contacts.Contacts;
+---functions---
+contacts.getContacts#c023849f hash:int = contacts.Contacts;

+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
hashintIf there already is a full contact list on the client, a hash of a the list of contact IDs in ascending order may be passed in this parameter. If the contact set was not changed, (contacts.contactsNotModified) will be returned.
+

Result

+

contacts.Contacts

+

Related pages

+

Pagination in the API

+

How to fetch results from large lists of objects.

+

contacts.contactsNotModified

+

Contact list on the server is the same as the list on the client.

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/messages.getCommonChats b/data/core.telegram.org/method/messages.getCommonChats new file mode 100644 index 0000000000..a2cb64c4b7 --- /dev/null +++ b/data/core.telegram.org/method/messages.getCommonChats @@ -0,0 +1,185 @@ + + + + + messages.getCommonChats + + + + + + + + + + + + + +
+ +
+
+
+ +

messages.getCommonChats

+ +

Get chats in common with a user

+

+
messages.chats#64ff9fd5 chats:Vector<Chat> = messages.Chats;
+messages.chatsSlice#9cd81144 count:int chats:Vector<Chat> = messages.Chats;
+---functions---
+messages.getCommonChats#d0a48c4 user_id:InputUser max_id:int limit:int = messages.Chats;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
user_idInputUserUser ID
max_idintMaximum ID of chat to return (see pagination)
limitintMaximum number of results to return, see pagination
+

Result

+

messages.Chats

+

Possible errors

+ + + + + + + + + + + + + + + + + + + + +
CodeTypeDescription
400MSG_ID_INVALIDInvalid message ID provided
400USER_ID_INVALIDThe provided user ID is invalid
+

Related pages

+

Pagination in the API

+

How to fetch results from large lists of objects.

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/messages.getDocumentByHash b/data/core.telegram.org/method/messages.getDocumentByHash new file mode 100644 index 0000000000..4deba5fead --- /dev/null +++ b/data/core.telegram.org/method/messages.getDocumentByHash @@ -0,0 +1,178 @@ + + + + + messages.getDocumentByHash + + + + + + + + + + + + + +
+ +
+
+
+ +

messages.getDocumentByHash

+ +

Get a document by its SHA256 hash, mainly used for gifs

+

+
documentEmpty#36f8c871 id:long = Document;
+document#1e87342b flags:# id:long access_hash:long file_reference:bytes date:int mime_type:string size:int thumbs:flags.0?Vector<PhotoSize> video_thumbs:flags.1?Vector<VideoSize> dc_id:int attributes:Vector<DocumentAttribute> = Document;
+---functions---
+messages.getDocumentByHash#338e2464 sha256:bytes size:int mime_type:string = Document;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
sha256bytesSHA256 of file
sizeintSize of the file in bytes
mime_typestringMime type
+

Result

+

Document

+

Possible errors

+ + + + + + + + + + + + + + + +
CodeTypeDescription
400SHA256_HASH_INVALIDThe provided SHA256 hash is invalid
+

Bots can use this method

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/messages.getGameHighScores b/data/core.telegram.org/method/messages.getGameHighScores new file mode 100644 index 0000000000..1a1f257dae --- /dev/null +++ b/data/core.telegram.org/method/messages.getGameHighScores @@ -0,0 +1,187 @@ + + + + + messages.getGameHighScores + + + + + + + + + + + + + +
+ +
+
+
+ +

messages.getGameHighScores

+ +

Get highscores of a game

+

+
messages.highScores#9a3bfd99 scores:Vector<HighScore> users:Vector<User> = messages.HighScores;
+---functions---
+messages.getGameHighScores#e822649d peer:InputPeer id:int user_id:InputUser = messages.HighScores;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
peerInputPeerWhere was the game sent
idintID of message with game media attachment
user_idInputUserGet high scores made by a certain user
+

Result

+

messages.HighScores

+

Possible errors

+ + + + + + + + + + + + + + + + + + + + + + + + + +
CodeTypeDescription
400MESSAGE_ID_INVALIDThe provided message id is invalid
400PEER_ID_INVALIDThe provided peer id is invalid
400USER_BOT_REQUIREDThis method can only be called by a bot
+

Bots can use this method

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/messages.getMessagesViews b/data/core.telegram.org/method/messages.getMessagesViews new file mode 100644 index 0000000000..9fcc318691 --- /dev/null +++ b/data/core.telegram.org/method/messages.getMessagesViews @@ -0,0 +1,199 @@ + + + + + messages.getMessagesViews + + + + + + + + + + + + + +
+ +
+
+
+ +

messages.getMessagesViews

+ +

Get and increase the view counter of a message sent or forwarded from a channel

+

+
messages.messageViews#b6c4f543 views:Vector<MessageViews> chats:Vector<Chat> users:Vector<User> = messages.MessageViews;
+---functions---
+messages.getMessagesViews#5784d3e1 peer:InputPeer id:Vector<int> increment:Bool = messages.MessageViews;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
peerInputPeerPeer where the message was found
idVector<int>ID of message
incrementBoolWhether to mark the message as viewed and increment the view counter
+

Result

+

Vector<int>

+

Possible errors

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup
400CHAT_ID_INVALIDThe provided chat id is invalid
400MSG_ID_INVALIDInvalid message ID provided
400PEER_ID_INVALIDThe provided peer id is invalid
+

Related pages

+

Channels

+

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

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/messages.getPinnedDialogs b/data/core.telegram.org/method/messages.getPinnedDialogs new file mode 100644 index 0000000000..cb95c00880 --- /dev/null +++ b/data/core.telegram.org/method/messages.getPinnedDialogs @@ -0,0 +1,169 @@ + + + + + messages.getPinnedDialogs + + + + + + + + + + + + + +
+ +
+
+
+ +

messages.getPinnedDialogs

+ +

Get pinned dialogs

+

+
messages.peerDialogs#3371c354 dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> state:updates.State = messages.PeerDialogs;
+---functions---
+messages.getPinnedDialogs#d6b94df2 folder_id:int = messages.PeerDialogs;

+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
folder_idintPeer folder ID, for more info click here
+

Result

+

messages.PeerDialogs

+

Possible errors

+ + + + + + + + + + + + + + + +
CodeTypeDescription
400FOLDER_ID_INVALIDInvalid folder ID
+

Related pages

+

Folders

+

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

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/messages.getSavedGifs b/data/core.telegram.org/method/messages.getSavedGifs new file mode 100644 index 0000000000..825958f930 --- /dev/null +++ b/data/core.telegram.org/method/messages.getSavedGifs @@ -0,0 +1,153 @@ + + + + + messages.getSavedGifs + + + + + + + + + + + + + +
+ +
+
+
+ +

messages.getSavedGifs

+ +

Get saved GIFs

+

+
messages.savedGifsNotModified#e8025ca2 = messages.SavedGifs;
+messages.savedGifs#2e0709a5 hash:int gifs:Vector<Document> = messages.SavedGifs;
+---functions---
+messages.getSavedGifs#83bf3d52 hash:int = messages.SavedGifs;

+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
hashintHash for pagination, for more info click here
+

Result

+

messages.SavedGifs

+

Related pages

+

Pagination in the API

+

How to fetch results from large lists of objects.

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/messages.requestEncryption b/data/core.telegram.org/method/messages.requestEncryption new file mode 100644 index 0000000000..9b50d0ddff --- /dev/null +++ b/data/core.telegram.org/method/messages.requestEncryption @@ -0,0 +1,185 @@ + + + + + messages.requestEncryption + + + + + + + + + + + + + +
+ +
+
+
+ +

messages.requestEncryption

+ +

Sends a request to start a secret chat to the user.

+

+
encryptedChatEmpty#ab7ec0a0 id:int = EncryptedChat;
+encryptedChatWaiting#3bf703dc id:int access_hash:long date:int admin_id:int participant_id:int = EncryptedChat;
+encryptedChatRequested#62718a82 flags:# folder_id:flags.0?int id:int access_hash:long date:int admin_id:int participant_id:int g_a:bytes = EncryptedChat;
+encryptedChat#fa56ce36 id:int access_hash:long date:int admin_id:int participant_id:int g_a_or_b:bytes key_fingerprint:long = EncryptedChat;
+encryptedChatDiscarded#13d6dd27 id:int = EncryptedChat;
+---functions---
+messages.requestEncryption#f64daf43 user_id:InputUser random_id:int g_a:bytes = EncryptedChat;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
user_idInputUserUser ID
random_idintUnique client request ID required to prevent resending. This also doubles as the chat ID.
g_abytesA = g ^ a mod p, see Wikipedia
+

Result

+

EncryptedChat

+

Possible errors

+ + + + + + + + + + + + + + + + + + + + +
CodeTypeDescription
400DH_G_A_INVALIDg_a invalid
400USER_ID_INVALIDThe provided user ID is invalid
+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/payments.getBankCardData b/data/core.telegram.org/method/payments.getBankCardData new file mode 100644 index 0000000000..eb98dd017f --- /dev/null +++ b/data/core.telegram.org/method/payments.getBankCardData @@ -0,0 +1,149 @@ + + + + + payments.getBankCardData + + + + + + + + + + + + + +
+ +
+
+
+ +

payments.getBankCardData

+ +

Get info about a credit card

+

+
payments.bankCardData#3e24e573 title:string open_urls:Vector<BankCardOpenUrl> = payments.BankCardData;
+---functions---
+payments.getBankCardData#2e79d779 number:string = payments.BankCardData;

+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
numberstringCredit card number
+

Result

+

payments.BankCardData

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/method/photos.updateProfilePhoto b/data/core.telegram.org/method/photos.updateProfilePhoto new file mode 100644 index 0000000000..d43cb46b4f --- /dev/null +++ b/data/core.telegram.org/method/photos.updateProfilePhoto @@ -0,0 +1,191 @@ + + + + + photos.updateProfilePhoto + + + + + + + + + + + + + +
+ +
+
+
+ +

photos.updateProfilePhoto

+ +

Installs a previously uploaded photo as a profile photo.

+

+
photos.photo#20212ca8 photo:Photo users:Vector<User> = photos.Photo;
+---functions---
+photos.updateProfilePhoto#72d4742c id:InputPhoto = photos.Photo;

+

Parameters

+ + + + + + + + + + + + + + + +
NameTypeDescription
idInputPhotoInput photo
+

Result

+

UserProfilePhoto

+

Possible errors

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeTypeDescription
400FILE_PARTS_INVALIDThe number of file parts is invalid
400IMAGE_PROCESS_FAILEDFailure while processing image
400LOCATION_INVALIDThe provided location is invalid
400PHOTO_CROP_SIZE_SMALLPhoto is too small
400PHOTO_EXT_INVALIDThe extension of the photo is invalid
400PHOTO_ID_INVALIDPhoto ID invalid
+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/mtproto/security_guidelines_v1.html b/data/core.telegram.org/mtproto/security_guidelines_v1.html new file mode 100644 index 0000000000..38b59f3e62 --- /dev/null +++ b/data/core.telegram.org/mtproto/security_guidelines_v1.html @@ -0,0 +1,175 @@ + + + + + Security Guidelines for Client Developers (v.1.0, DEPRECATED) + + + + + + + + + + + + + +
+ +
+
+
+ +

Security Guidelines for Client Developers (v.1.0, DEPRECATED)

+ +
+ +
+

This document describes security recommendations for clients using MTProto 1.0, its status is DEPRECATED. +For up-to-date security recommendations, kindly see this document.

+
+

See also:

+

+ +

While MTProto is designed to be a reasonably fast and secure protocol, its advantages can be easily negated by careless implementation. We collected some security guidelines for client software developers on this page. All Telegram clients are required to comply with these.

+

Diffie--Hellman key exchange

+

We use DH key exchange in two cases:

+ +

In both cases, there are some verifications to be done whenever DH is used:

+

Validation of DH parameters

+

Client is expected to check whether p = dh_prime is a safe 2048-bit prime (meaning that both p and (p-1)/2 are prime, and that 2^2047 < p < 2^2048), and that g generates a cyclic subgroup of prime order (p-1)/2, i.e. is a quadratic residue mod p. Since g is always equal to 2, 3, 4, 5, 6 or 7, this is easily done using quadratic reciprocity law, yielding a simple condition on p mod 4g -- namely, p mod 8 = 7 for g = 2; p mod 3 = 2 for g = 3; no extra condition for g = 4; p mod 5 = 1 or 4 for g = 5; p mod 24 = 19 or 23 for g = 6; and p mod 7 = 3, 5 or 6 for g = 7. After g and p have been checked by the client, it makes sense to cache the result, so as not to repeat lengthy computations in future.

+

If the verification takes too long (which is the case for older mobile devices), one might initially run only 15 Miller--Rabin iterations (use parameter 30 in Java) for verifying primeness of p and (p - 1)/2 with error probability not exceeding one billionth, and do more iterations in the background later.

+

Another way to optimize this is to embed into the client application code a small table with some known "good" couples (g,p) (or just known safe primes p, since the condition on g is easily verified during execution), checked during code generation phase, so as to avoid doing such verification during runtime altogether. The server rarely changes these values, thus one usually needs to put the current value of server's dh_prime into such a table. For example, the current value of dh_prime equals (in big-endian byte order)

+
C7 1C AE B9 C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73 98 0D 40 23 8E 3E 21 C1 49 34 D0 37 56 3D 93 0F 48 19 8A 0A A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E 0A C9 25 13 95 43 AE D4 4C CE 7C 37 20 FD 51 F6 94 58 70 5A C6 8C D4 FE 6B 6B 13 AB DC 97 46 51 29 69 32 84 54 F1 8F AF 8C 59 5F 64 24 77 FE 96 BB 2A 94 1D 5B CD 1D 4A C8 CC 49 88 07 08 FA 9B 37 8E 3C 4F 3A 90 60 BE E6 7C F9 A4 A4 A6 95 81 10 51 90 7E 16 27 53 B5 6B 0F 6B 41 0D BA 74 D8 A8 4B 2A 14 B3 14 4E 0E F1 28 47 54 FD 17 ED 95 0D 59 65 B4 B9 DD 46 58 2D B1 17 8D 16 9C 6B C4 65 B0 D6 FF 9C A3 92 8F EF 5B 9A E4 E4 18 FC 15 E8 3E BE A0 F8 7F A9 FF 5E ED 70 05 0D ED 28 49 F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6 35 B1 05 EE 2E 4E 15 D0 4B 24 54 BF 6F 4F AD F0 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B
+

g_a and g_b validation

+

Apart from the conditions on the Diffie-Hellman prime dh_prime and generator g, both sides are to check that g, g_a and g_b are greater than 1 and less than dh_prime - 1. We recommend checking that g_a and g_b are between 2^{2048-64} and dh_prime - 2^{2048-64} as well.

+

Checking SHA1 hash values

+

Once the client receives a server_DH_params_ok answer in step 5) of the Authorization Key generation protocol and decrypts it obtaining answer_with_hash, it MUST check that

+
answer_with_hash := SHA1(answer) + answer + (0-15 random bytes)
+

In other words, the first 20 bytes of answer_with_hash must be equal to SHA1 of the remainder of the decrypted message without the padding random bytes.

+

Checking nonce, server_nonce and new_nonce fields

+

When the client receives and/or decrypts server messages during creation of Authorization Key, and these messages contain some nonce fields already known to the client from messages previously obtained during the same run of the protocol, the client is to check that these fields indeed contain the values previosly known.

+

Using secure pseudorandom number generator to create DH secret parameters a and b

+

Client must use a cryptographically secure PRNG to generate secret exponents a or b for DH key exchange. For secret chats, the client might request some entropy (random bytes) from the server while invoking messages.getDhConfig and feed these random bytes into its PRNG (for example, by PRNG_seed if OpenSSL library is used), but never using these "random" bytes by themselves or replacing by them the local PRNG seed. One should mix bytes received from server into local PRNG seed.

+

MTProto Encrypted Messages

+

Some important checks are to be done while sending and especially receiving encrypted MTProto messages.

+

Checking SHA1 hash value of msg_key

+

msg_key is used not only to compute the AES key and IV to decrypt the received message. After decryption, the client MUST check that msg_key is indeed equal to SHA1 of the plaintext obtained as the result of decryption (without the final padding bytes).

+

If an error is encountered before this check could be performed, the client must perform the msg-key check anyway before returning any result. Note that the response to any error encountered before the msg_key check must be the same as the response to a failed msg_key check.

+

Checking message length

+

The client is to check that the length of the message or container obtained from the decrypted message (computed from its length field) does not exceed the total size of the plaintext, and that the difference is not more than 15 bytes. Apart from this, knowing the total length is important for the previous verification.

+

The length should be always divisible by 4 and non-negative. On no account the client is to access data past the end of the decryption buffer containing the plaintext message.

+

Checking session_id

+

The client is to check that the session_id field in the decrypted message indeed equals to that of an active session created by the client.

+

Checking msg_id

+

The client must check that msg_id has even parity for messages from client to server, and odd parity for messages from server to client.

+

In addition, the identifiers (msg_id) of the last N messages received from the other side must be stored, and if a message comes in with an msg_id lower than all or equal to any of the stored values, that message is to be ignored. Otherwise, the new message msg_id is added to the set, and, if the number of stored msg_id values is greater than N, the oldest (i. e. the lowest) is discarded.

+

In addition, msg_id values that belong over 30 seconds in the future or over 300 seconds in the past are to be ignored (recall that msg_id approximately equals unixtime * 2^32). This is especially important for the server. The client would also find this useful (to protect from a replay attack), but only if it is certain of its time (for example, if its time has been synchronized with that of the server).

+

Certain client-to-server service messages containing data sent by the client to the server (for example, msg_id of a recent client query) may, nonetheless, be processed on the client even if the time appears to be “incorrect”. This is especially true of messages to change server_salt and notifications about invalid time on the client. See Mobile Protocol: Service Messages.

+

Behavior in case of mismatch

+

If one of the checks listed above fails, the client is to completely discard the message obtained from server. We also recommend closing and reestablishing the TCP connection to the server, then retrying the operation or the whole key generation protocol.

+

No information from incorrect messages can be used. Even if the application throws an exception and dies, this is much better than continuing with invalid data.

+

Notice that invalid messages will infrequently appear during normal work even if no malicious tampering is being done. This is due to network transmission errors. We recommend ignoring the invalid message and closing the TCP connection, then creating a new TCP connection to the server and retrying the original query.

+ +
+ +
+
+ +
+ + + + + + + + diff --git a/data/core.telegram.org/passport/example.html b/data/core.telegram.org/passport/example.html new file mode 100644 index 0000000000..d23bd8dcba --- /dev/null +++ b/data/core.telegram.org/passport/example.html @@ -0,0 +1,585 @@ + + + + + Example + + + + + + + + + + + + + + + +
+ +
+
+
+
+

Example

+ +

If you'd like to test Telegram Passport, use this page to request data. If you'd like to check out a real-life implementation, please see this blog post for examples of services that have integrated Telegram Passport.

+

Request Telegram Passport Data

+

+

+
+
+
+ + +
+
+
+
+ +
+ +
+ +
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+
+
+
+ +
+ +
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+
+
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ + +
+
+
+ +

+
+
+

Note that the passport demo bot will only store data for 1 hour and then discard it. After logging in here, you can use the logout button on this page to reset your session.

+
+ +
+ +
+
+ +
+ + + + + + + + + diff --git a/data/core.telegram.org/passport/sdk-android.html b/data/core.telegram.org/passport/sdk-android.html new file mode 100644 index 0000000000..a44201d52b --- /dev/null +++ b/data/core.telegram.org/passport/sdk-android.html @@ -0,0 +1,180 @@ + + + + + Android SDK + + + + + + + + + + + + + +
+ +
+
+
+ +

Android SDK

+ +
+ +

The Android SDK helps you easily integrate Telegram Passport requests into your Android-based apps. Check out our GitHub repository to see samples using this SDK.

+

Installation

+

Installing from Maven

+

Telegram Passport SDK is available from the Maven repository. +Add this line to the dependencies section in your build.gradle:

+
compile 'org.telegram:passport:1.1'
+

and sync your project.

+

Adding as a module

+

Download the library, unzip it and copy the library project to the root of your project directory (the one with settings.gradle and gradle.properties). Then, make the following changes to your Gradle scripts.

+

In settings.gradle, add ':telegrampassport' to includes:

+
include ':app', ':telegrampassport'
+

In the build.gradle file for your app, add this line to the dependencies section:

+
compile ':telegrampassport'
+

and sync your project.

+

Usage

+

Adding the button

+

The SDK provides the "Log in with Telegram" button which we recommend using for a consistent user experience across different apps. You can either add it from your Java code:

+
TelegramLoginButton telegramButton;
+// ...
+telegramButton=new TelegramLoginButton(this);
+// Optionally you can change the roundness of the button corners
+// to better fit your design.
+telegramButton.setCornerRoundness(1f);
+viewGroupOfSomeSort.addView(telegramButton, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+

Or from XML:

+
 <org.telegram.passport.TelegramLoginButton
+             android:layout_width="wrap_content"
+             android:layout_height="wrap_content"
+             app:cornerRoundness="0.5"/>
+

Requesting authorization

+

The button doesn't do anything by itself; you need to set an OnClickListener on it to start the authorization flow (replace the comments with actual parameters):

+
private static final int TG_PASSPORT_RESULT=352; // this can be any integer less than 0xFFFF
+// ...
+telegramButton.setOnClickListener(new View.OnClickListener(){
+@Override
+public void onClick(View view){
+    TelegramPassport.AuthRequest req=new TelegramPassport.AuthRequest();
+    req.botID=/* your bot ID here */;
+    req.publicKey=/* your bot public key here */;
+    req.nonce=/* a unique nonce to pass to the bot server */;
+    // Request either a passport or an ID card with selfie, a driver license, personal details with
+    // name as it appears in the documents, address with any address document, and a phone number.
+    // You could also pass a raw JSON object here if that's what works better for you
+    // (for example, if you already get it from your server in the correct format).
+    req.scope=new PassportScope(
+        new PassportScopeElementOneOfSeveral(PassportScope.PASSPORT, PassportScope.IDENTITY_CARD).withSelfie(),
+        new PassportScopeElementOne(PassportScope.PERSONAL_DETAILS).withNativeNames(),
+        PassportScope.DRIVER_LICENSE,
+        PassportScope.ADDRESS,
+        PassportScope.ADDRESS_DOCUMENT,
+        PassportScope.PHONE_NUMBER
+    );
+    TelegramPassport.request(MyActivity.this, req, TG_PASSPORT_RESULT);
+}});
+

If you need more control over the process, the TelegramPassport class contains several more methods:

+
    +
  • getAuthIntent(AuthParams) returns an Intent for you to use in startActivityForResult if you need to do that in some special way. Be sure to check that an app is present that can handle this intent before starting it by using PackageManager or intent.resolveActivity.
  • +
  • showAppInstallAlert(Activity) shows an alert that the user needs to install Telegram in order to continue. This is intended to be used together with the previous method for the cases when the app isn't installed.
  • +
+

Handling the result

+

The result is delivered via the onActivityResult method in your activity with the request code you passed to TelegramPassport.request. Currently, the only meaningful parameter is resultCode, which is RESULT_OK if the authorization was successful and RESULT_CANCELED otherwise.

+ +
+ +
+
+ +
+ + + + + + + + diff --git a/data/core.telegram.org/tdlib.html b/data/core.telegram.org/tdlib.html new file mode 100644 index 0000000000..dee8b1f4ba --- /dev/null +++ b/data/core.telegram.org/tdlib.html @@ -0,0 +1,147 @@ + + + + + Telegram Database Library + + + + + + + + + + + + + +
+ +
+
+
+
+

Telegram Database Library

+ +
+ +
+ +

TDLib (Telegram Database Library) is a cross-platform, fully functional Telegram client. We designed it to help third-party developers create their own custom apps using the Telegram platform.

+
+

Read about TDLib on the Telegram blog »

+
+

TDLib Advantages

+
    +
  • Cross-platform. TDLib can be used on Android, iOS, Windows, macOS, Linux, WebAssembly, FreeBSD, Windows Phone, watchOS, tvOS, Tizen, Cygwin. It should also work on other *nix systems with or without minimal effort.
  • +
  • Multilanguage. TDLib can be easily used with any programming language that is able to execute C functions. Additionally it already has native bindings to Java (using JNI) and C# (using C++/CLI).
  • +
  • Easy to use. TDLib takes care of all network implementation details, encryption and local data storage.
  • +
  • High-performance. In the Telegram Bot API, each TDLib instance handles more than 24,000 active bots simultaneously.
  • +
  • Well-documented. All TDLib API methods and public interfaces are fully documented.
  • +
  • Consistent. TDLib guarantees that all updates will be delivered in the right order.
  • +
  • Reliable. TDLib remains stable on slow and unreliable Internet connections.
  • +
  • Secure: All local data is encrypted using a user-provided encryption key.
  • +
  • Fully-asynchronous. Requests to TDLib don't block each other or anything else, responses will be sent when they are available.
  • +
+
+

Getting started with TDLib »

+
+

Resources

+

TDLib is fully open source, all code is available on GitHub.

+

See also:

+ +
+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/type/ContactStatus.html b/data/core.telegram.org/type/ContactStatus.html new file mode 100644 index 0000000000..c598c1f7f8 --- /dev/null +++ b/data/core.telegram.org/type/ContactStatus.html @@ -0,0 +1,143 @@ + + + + + ContactStatus + + + + + + + + + + + + + +
+ +
+
+
+ +

ContactStatus

+ + + +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/type/InputPaymentCredentials.html b/data/core.telegram.org/type/InputPaymentCredentials.html new file mode 100644 index 0000000000..2763dbcaef --- /dev/null +++ b/data/core.telegram.org/type/InputPaymentCredentials.html @@ -0,0 +1,158 @@ + + + + + InputPaymentCredentials + + + + + + + + + + + + + +
+ +
+
+
+ +

InputPaymentCredentials

+ +

Payment credentials

+

+
inputPaymentCredentialsSaved#c10eb2cf id:string tmp_password:bytes = InputPaymentCredentials;
+inputPaymentCredentials#3417d728 flags:# save:flags.0?true data:DataJSON = InputPaymentCredentials;
+inputPaymentCredentialsApplePay#aa1c39f payment_data:DataJSON = InputPaymentCredentials;
+inputPaymentCredentialsAndroidPay#ca05d50e payment_token:DataJSON google_transaction_id:string = InputPaymentCredentials;

+

Constructors

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ConstructorDescription
inputPaymentCredentialsSavedSaved payment credentials
inputPaymentCredentialsPayment credentials
inputPaymentCredentialsApplePayApple pay payment credentials
inputPaymentCredentialsAndroidPayAndroid pay payment credentials
+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/type/MessageMedia.html b/data/core.telegram.org/type/MessageMedia.html new file mode 100644 index 0000000000..5e7e743adc --- /dev/null +++ b/data/core.telegram.org/type/MessageMedia.html @@ -0,0 +1,227 @@ + + + + + MessageMedia + + + + + + + + + + + + + +
+ +
+
+
+ +

MessageMedia

+ +

Media

+

+
messageMediaEmpty#3ded6320 = MessageMedia;
+messageMediaPhoto#695150d7 flags:# photo:flags.0?Photo ttl_seconds:flags.2?int = MessageMedia;
+messageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia;
+messageMediaContact#cbf24940 phone_number:string first_name:string last_name:string vcard:string user_id:int = MessageMedia;
+messageMediaUnsupported#9f84f49e = MessageMedia;
+messageMediaDocument#9cb070d7 flags:# document:flags.0?Document ttl_seconds:flags.2?int = MessageMedia;
+messageMediaWebPage#a32dd600 webpage:WebPage = MessageMedia;
+messageMediaVenue#2ec0533f geo:GeoPoint title:string address:string provider:string venue_id:string venue_type:string = MessageMedia;
+messageMediaGame#fdb19008 game:Game = MessageMedia;
+messageMediaInvoice#84551347 flags:# shipping_address_requested:flags.1?true test:flags.3?true title:string description:string photo:flags.0?WebDocument receipt_msg_id:flags.2?int currency:string total_amount:long start_param:string = MessageMedia;
+messageMediaGeoLive#b940c666 flags:# geo:GeoPoint heading:flags.0?int period:int proximity_notification_radius:flags.1?int = MessageMedia;
+messageMediaPoll#4bd6e798 poll:Poll results:PollResults = MessageMedia;
+messageMediaDice#3f7ee58b value:int emoticon:string = MessageMedia;
+
+---functions---
+
+messages.getWebPagePreview#8b68b0cc flags:# message:string entities:flags.3?Vector<MessageEntity> = MessageMedia;
+messages.uploadMedia#519bc2b1 peer:InputPeer media:InputMedia = MessageMedia;

+

Constructors

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConstructorDescription
messageMediaEmptyEmpty constructor.
messageMediaPhotoAttached photo.
messageMediaGeoAttached map.
messageMediaContactAttached contact.
messageMediaUnsupportedCurrent version of the client does not support this media type.
messageMediaDocumentDocument (video, audio, voice, sticker, any media type except photo)
messageMediaWebPagePreview of webpage
messageMediaVenueVenue
messageMediaGameTelegram game
messageMediaInvoiceInvoice
messageMediaGeoLiveIndicates a live geolocation
messageMediaPollPoll
messageMediaDiceDice
+

Methods

+ + + + + + + + + + + + + + + + + +
MethodDescription
messages.getWebPagePreviewGet preview of webpage
messages.uploadMediaUpload a file and associate it to a chat (without actually sending it to the chat)
+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/type/MessagesFilter.html b/data/core.telegram.org/type/MessagesFilter.html new file mode 100644 index 0000000000..0bb1bd888a --- /dev/null +++ b/data/core.telegram.org/type/MessagesFilter.html @@ -0,0 +1,223 @@ + + + + + MessagesFilter + + + + + + + + + + + + + +
+ +
+
+
+ +

MessagesFilter

+ +

Object describes message filter.

+

+
inputMessagesFilterEmpty#57e2f66c = MessagesFilter;
+inputMessagesFilterPhotos#9609a51c = MessagesFilter;
+inputMessagesFilterVideo#9fc00e65 = MessagesFilter;
+inputMessagesFilterPhotoVideo#56e9f0e4 = MessagesFilter;
+inputMessagesFilterDocument#9eddf188 = MessagesFilter;
+inputMessagesFilterUrl#7ef0dd87 = MessagesFilter;
+inputMessagesFilterGif#ffc86587 = MessagesFilter;
+inputMessagesFilterVoice#50f5c392 = MessagesFilter;
+inputMessagesFilterMusic#3751b49e = MessagesFilter;
+inputMessagesFilterChatPhotos#3a20ecb8 = MessagesFilter;
+inputMessagesFilterPhoneCalls#80c99768 flags:# missed:flags.0?true = MessagesFilter;
+inputMessagesFilterRoundVoice#7a7c17a4 = MessagesFilter;
+inputMessagesFilterRoundVideo#b549da53 = MessagesFilter;
+inputMessagesFilterMyMentions#c1f8e69a = MessagesFilter;
+inputMessagesFilterGeo#e7026d0d = MessagesFilter;
+inputMessagesFilterContacts#e062db83 = MessagesFilter;
+inputMessagesFilterPinned#1bb00451 = MessagesFilter;

+

Constructors

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConstructorDescription
inputMessagesFilterEmptyFilter is absent.
inputMessagesFilterPhotosFilter for messages containing photos.
inputMessagesFilterVideoFilter for messages containing videos.
inputMessagesFilterPhotoVideoFilter for messages containing photos or videos.
inputMessagesFilterDocumentFilter for messages containing documents.
inputMessagesFilterUrlReturn only messages containing URLs
inputMessagesFilterGifReturn only messages containing gifs
inputMessagesFilterVoiceReturn only messages containing voice notes
inputMessagesFilterMusicReturn only messages containing audio files
inputMessagesFilterChatPhotosReturn only chat photo changes
inputMessagesFilterPhoneCallsReturn only phone calls
inputMessagesFilterRoundVoiceReturn only round videos and voice notes
inputMessagesFilterRoundVideoReturn only round videos
inputMessagesFilterMyMentionsReturn only messages where the current user was mentioned
inputMessagesFilterGeoReturn only messages containing geolocations
inputMessagesFilterContactsReturn only messages containing contacts
inputMessagesFilterPinnedFetch only pinned messages
+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/type/PhoneCall.html b/data/core.telegram.org/type/PhoneCall.html new file mode 100644 index 0000000000..22dff2a22f --- /dev/null +++ b/data/core.telegram.org/type/PhoneCall.html @@ -0,0 +1,168 @@ + + + + + PhoneCall + + + + + + + + + + + + + +
+ +
+
+
+ +

PhoneCall

+ +

Phone call

+

+
phoneCallEmpty#5366c915 id:long = PhoneCall;
+phoneCallWaiting#1b8f4ad1 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:int participant_id:int protocol:PhoneCallProtocol receive_date:flags.0?int = PhoneCall;
+phoneCallRequested#87eabb53 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:int participant_id:int g_a_hash:bytes protocol:PhoneCallProtocol = PhoneCall;
+phoneCallAccepted#997c454a flags:# video:flags.6?true id:long access_hash:long date:int admin_id:int participant_id:int g_b:bytes protocol:PhoneCallProtocol = PhoneCall;
+phoneCall#8742ae7f flags:# p2p_allowed:flags.5?true video:flags.6?true id:long access_hash:long date:int admin_id:int participant_id:int g_a_or_b:bytes key_fingerprint:long protocol:PhoneCallProtocol connections:Vector<PhoneConnection> start_date:int = PhoneCall;
+phoneCallDiscarded#50ca4de1 flags:# need_rating:flags.2?true need_debug:flags.3?true video:flags.6?true id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = PhoneCall;

+

Constructors

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ConstructorDescription
phoneCallEmptyEmpty constructor
phoneCallWaitingIncoming phone call
phoneCallRequestedRequested phone call
phoneCallAcceptedAn accepted phone call
phoneCallPhone call
phoneCallDiscardedIndicates a discarded phone call
+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/type/account.Themes b/data/core.telegram.org/type/account.Themes new file mode 100644 index 0000000000..e89d260a04 --- /dev/null +++ b/data/core.telegram.org/type/account.Themes @@ -0,0 +1,167 @@ + + + + + account.Themes + + + + + + + + + + + + + +
+ +
+
+
+ +

account.Themes

+ +

Installed themes

+

+
account.themesNotModified#f41eb622 = account.Themes;
+account.themes#7f676421 hash:int themes:Vector<Theme> = account.Themes;
+
+---functions---
+
+account.getThemes#285946f8 format:string hash:int = account.Themes;

+

Constructors

+ + + + + + + + + + + + + + + + + +
ConstructorDescription
account.themesNotModifiedNo new themes were installed
account.themesInstalled themes
+

Methods

+ + + + + + + + + + + + + +
MethodDescription
account.getThemesGet installed themes
+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/type/help.TermsOfService b/data/core.telegram.org/type/help.TermsOfService new file mode 100644 index 0000000000..95c76f0620 --- /dev/null +++ b/data/core.telegram.org/type/help.TermsOfService @@ -0,0 +1,143 @@ + + + + + help.TermsOfService + + + + + + + + + + + + + +
+ +
+
+
+ +

help.TermsOfService

+ +

Contains info about the latest telegram Terms Of Service.

+

+
help.termsOfService#780a0310 flags:# popup:flags.0?true id:DataJSON text:string entities:Vector<MessageEntity> min_age_confirm:flags.1?int = help.TermsOfService;

+

Constructors

+ + + + + + + + + + + + + +
ConstructorDescription
help.termsOfServiceInfo about the latest telegram Terms Of Service
+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/type/long.html b/data/core.telegram.org/type/long.html new file mode 100644 index 0000000000..c7970611b3 --- /dev/null +++ b/data/core.telegram.org/type/long.html @@ -0,0 +1,118 @@ + + + + + long + + + + + + + + + + + + + +
+ +
+
+
+ +

long

+ +

A basic bare type, elements of which correspond to two-element sequences, representing 64-bit signed numbers (little-endian).

+

More on basic types »

+

Related pages

+

Binary Data Serialization

+ +
+ +
+
+ +
+ + + + + + diff --git a/data/core.telegram.org/type/messages.StatedMessage b/data/core.telegram.org/type/messages.StatedMessage new file mode 100644 index 0000000000..70318f3ec2 --- /dev/null +++ b/data/core.telegram.org/type/messages.StatedMessage @@ -0,0 +1,128 @@ + + + + + messages.StatedMessage + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + diff --git a/data/telegram.org/blog/animated-stickers.html b/data/telegram.org/blog/animated-stickers.html new file mode 100644 index 0000000000..a70d30994f --- /dev/null +++ b/data/telegram.org/blog/animated-stickers.html @@ -0,0 +1,261 @@ + + + + + Animated Stickers Done Right + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+
+

Animated Stickers Done Right

+ +
+ +
+ +
+ Cover Image +
+ +

We launched stickers back in January 2015. Since then, the Telegram sticker format has been adopted by other apps to reach a total of 2 billion people. Today we're introducing a new format for animated stickers.

+

We asked ourselves: Can animated stickers have higher quality than static ones while taking less bandwidth? The answer turned out to be YES (but only after we told developers they'd get moving cat pictures).

+
+ +
+ + + +

Smooth Animations, Tiny Size

+

Telegram engineers experimented with vector graphics, packaging methods and forbidden magic to create the Lottie-based .TGS format, in which each sticker takes up about 20-30 Kilobytessix times smaller than the average photo.

+

Thanks to various optimizations, animated stickers consume less battery than GIFs and run at a smooth 60 frames per second. If a picture is worth a thousand words, that's 180,000 words per sticker.

+
+ +
+ + + +

Open Platform

+

Naturally, animated stickers are a free platform. All artists are welcome to create new sets and share them with Telegram users.

+

Like its static predecessor, the Telegram animated sticker format is likely to become the new industry standard in messaging. Check out this quick guide to get started.

+
+ +
+ +

Starter Packs

+
+ +To get your conversations moving right away, our artists have created a few sample sets ranging from Rambunctious Rodents to Sentient Snacks. You can find more animated sticker sets in the 'Trending' section of your sticker panel. 🔥 + +

+ +

As always, the fastest way to find a sticker that fits your mood is to type in a relevant emoji – Telegram will immediately suggest matching stickers.

+
+ +
+ +

Keep an eye out for new animated stickers – and our next update.

+

+ +

July 6, 2019
The Telegram Team

+
+ +
+ + +
+ + +
+
+
+ + + + + + + diff --git a/data/telegram.org/blog/channels.html b/data/telegram.org/blog/channels.html new file mode 100644 index 0000000000..8ccc467a99 --- /dev/null +++ b/data/telegram.org/blog/channels.html @@ -0,0 +1,224 @@ + + + + + Channels: Broadcasting Done Right + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+
+

Channels: Broadcasting Done Right

+ +
+ +
+ +
+

UPD: See Channels 2.0 for info on links to posts, silent messages and admin signatures.

+
+

Today we are introducing Channels, a new tool for broadcasting your messages to large audiences. Channels replace the old Broadcast lists and are better in every way. They can have an unlimited number of members, they can be public with a permanent URL and each post in a channel has its own view counter.

+
+ +

+
+ +

Views from forwarded copies of your messages will be included in the total count. Last but not least, new members can see the entire message history in a channel once they join — all the way to day one.

+

If you'd like an example, join our official Telegram channel to get notified about our updates, or try creating your own channels from the ‘New Message’ menu.

+

iOS 9 Notifications

+

In other good news, we‘ve added Quick Replies from notifications, which are now supported on iOS 9 devices. This means you can reply to messages in Telegram, directly from your iPhone’s lock screen. Split View and more iOS 9 features will become available in early October.

+

Unfortunately, due to a bug in iOS 9, it is currently not possible to display the input field for Quick Replies right away — you‘ll need to press the ’Reply' button in order for it to appear. Quick replies will work as expected when iOS 9.1 is released with the relevant bugfixes.

+

Photo Editor

+

The in-app Photo Editor for iOS was updated with tools to adjust an image's tint, fade, and curves. The existing shadows and highlights tools default to 50% and are now functional in both directions.

+
+ + +

+
+ +

September 22, 2015
The Telegram Team

+
+ +
+ + +
+ + +
+
+
+ + + + + + + diff --git a/data/telegram.org/blog/instant-view.html b/data/telegram.org/blog/instant-view.html new file mode 100644 index 0000000000..0cbcff1cdc --- /dev/null +++ b/data/telegram.org/blog/instant-view.html @@ -0,0 +1,268 @@ + + + + + Instant View, Telegraph, and Other Goodies + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+
+

Instant View, Telegraph, and Other Goodies

+ +
+ +
+ + +
+ +
+ +
Meet Instant View, an elegant way to view your dog articles with zero pageload time. To try it out, use Telegram version 3.14 to share a link to a Medium post or a TechCrunch article. This will get you an Instant View button that immediately shows a native page, saving you time and data.
+ +
+
+ +

Instant View button

+
+
+ +

Saves time and data

+
+ +

If you have feedback about the way an Instant View page was generated, ping our @previews bot. Only a handful of websites are supported at the moment, but we'll be adding more as we go. Eventually we want to provide Instant View pages for every story on the Web and thus devour the entire Internet (*evil laugh*).

+

Telegraph

+

Today we are launching Telegraph – a publishing tool that lets you create richly formatted posts with photos and all sorts of embedded stuff. Telegraph posts get beautiful Instant View pages on Telegram.

+

To try it, go to telegra.ph, publish a story, and share it on Telegram. With Telegraph, your Telegram channel can run stories just like the mainstream media (although you may find it tricky to become as biased).

+

Jump to Date

+

You can now travel in time to any moment in the past. Just tap Search inside a chat and choose a day using the Calendar tool.

+
+
+ +

Calendar button

+
+
+ +

Pick a day

+
+ +

Unfortunately, this doesn't work with dates from the future. Sorry, no flying cars and hoverboards for you today.

+

View Pack for Recent Stickers

+

Remember all those times when you had a sad Pepe among your recently sent stickers? If you‘re like us, your natural desire would’ve been to reunite the sad Pepe with the rest of his family by scrolling to the Pepe pack in your sticker panel.

+

You can now do that in an instant: try a long tap (or 3D-touch on iOS) on a recent sticker, then choose ‘View Pack’. Hey presto! For some mysterious reason, this also works with non-Pepe stickers.

+
+
+ +
+
+ + + +

Groups in Common

+

Sometimes you want to find a group in your chats, but can‘t recall the title. Here’s a life-hack for you: think about a contact of yours that was also a member in that group. This association technique may help you bring back the title too. If it doesn‘t, open that contact’s profile and tap Groups in Common.

+

Android Strikes Back

+

Some of you Android users told us we loved iPhones more than Androids. That almost made us cry (remember the sad Pepe in our recent stickers?). To make things right with you, we fired our iOS dev, who was too good.

+

Well, not really. We simply locked ourselves in the coding basement for several weeks to bring you this:

+
    +
  • A slick new interface for creating groups and selecting users in privacy settings (shiny animations included).
  • +
  • A new beautiful interface for notification settings.
  • +
  • Improved security for passcode locks (your chats won't be seen in the task switcher now). This one also works on iOS.
  • +
  • Improved camera speed when taking photos and videos.
  • +
  • Better video compression.
  • +
  • An improved and less obstructive photo viewer.
  • +
  • Easier editing of messages and adding captions to photos.
  • +
+

And that's just getting us warmed up. Make Android Great Again!

+

Also

+

Something big is brewing in our secret dungeons. Stay tuned.

+

+ +

November 22, 2016
The Telegram Team

+
+ +
+ + +
+ + +
+
+
+ + + + + + + diff --git a/data/telegram.org/blog/move-history.html b/data/telegram.org/blog/move-history.html new file mode 100644 index 0000000000..88e7d8ae8d --- /dev/null +++ b/data/telegram.org/blog/move-history.html @@ -0,0 +1,284 @@ + + + + + Moving Chat History from Other Apps + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+
+

Moving Chat History from Other Apps

+ +
+
+
+ +
+ Moving Chat History from Other Apps and More Privacy +
+ +

Over 100 million new users joined Telegram this January, seeking more privacy and freedom. But what about the messages and memories that remain in older apps?

+

Starting today, everyone can bring their chat history – including videos and documents – to Telegram from apps like WhatsApp, Line and KakaoTalk. This works both for individual chats and groups:

+
+ +
+ +

To move a chat from WhatsApp on iOS, open the Contact Info or Group Info page in WhatsApp, tap Export Chat, then choose Telegram in the Share menu.

+

On Android, open a WhatsApp chat, tap ⋮ > More > Export Chat, then choose Telegram in the Share menu:

+
+ +
+ +
+

WhatsApp for iOS also lets you export chats directly from the chat list. Swipe left on a chat, then choose '…' > Export Chat.

+
+

Messages will be imported into the current day but will also include their original timestamps. All members of the chat on Telegram will see the messages.

+

Move Chats and Save Space

+

The best part is that the messages and media you move don’t need to occupy extra space. Older apps make you store all data on your device – but Telegram can take up virtually no space while letting you access all your messages, photos and videos anytime you need them.

+
+

You can free up space and control your cache size in Settings > Data and Storage > Storage Usage.

+
+

Control Your Digital Footprint

+

Your data is your business, which is why Telegram users can not only export their chats, but also delete messages they send and receive for both sides – without a trace.

+

With this update, you get even more control: secret chats, groups you created and call history can now also be deleted for all sides at any time.

+
+ +
+ +

Telegram servers don’t store information about deleted chats and call logs, so the data will disappear completely, forever.

+

Improved Voice Chats

+

You can now see which of your groups have active Voice Chats from the top of the Call History page.

+

While in a voice chat you can adjust the volume of individual participants to manage microphone levels. Adjustments made by group admins are applied for all listeners.

+
+ +
+ +

Improved Audio Player

+

When a track is playing, tap the author name in the player to see their tracks from all your chats. If you need to skip ahead or repeat something you missed, press and hold on the Next and Previous buttons to fast-forward and rewind.

+
+ +
+ +

We’ve also added a fade effect to please your ears when you pause and resume the music.

+

Greeting stickers

+

If you have contacts who joined Telegram recently, it may be a nice touch to welcome them using one of Telegram's unique features. A greeting sticker will be suggested in your new chats, ready to send in one tap.

+
+ +
+ +

New Android Animations

+

A new update means sleek new interface animations. See if you can catch them all when downloading files, playing music, or loading chats after logging in.

+
+ +
+ +

Reporting Fake Channels

+

All Telegram apps let you report spam and other types of illegal content, including calls to violence or child abuse. Now you can also report fake channels or groups that impersonate famous people or organizations. Open their profile page and tap '…' > Report > Fake Account to let our moderators know.

+

Improved Accessibility

+

Many accessibility improvements have been added for both TalkBack and VoiceOver users. As we continue to refine app interfaces for all users, we welcome additional feedback on our Suggestions Platform.

+

A warm welcome to everyone who joined us recently! The next update shouldn’t take long.

+

+ +

January 28, 2021
The Telegram Team

+
+ +
+ + +
+ + +
+
+
+ + + + + + + + diff --git a/data/telegram.org/blog/replies-mentions-hashtags.html b/data/telegram.org/blog/replies-mentions-hashtags.html new file mode 100644 index 0000000000..ec05acc24d --- /dev/null +++ b/data/telegram.org/blog/replies-mentions-hashtags.html @@ -0,0 +1,238 @@ + + + + + Reinventing Group Chats: Replies, Mentions, Hashtags and More + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+
+

Reinventing Group Chats: Replies, Mentions, Hashtags and More

+ +
+ +
+ +

Group chats have not evolved much since they first appeared in messaging apps many years ago. Today's new features bring group chat communication much closer to what it should look like in 2015. iOS, Android, OSX and Telegram Web get them first.

+

Replies

+

To reply to a specific message in a group chat, simply tap on it (double-tap on iOS) and choose Reply. Easy as that!

+
+ + + + + +

+ +

The person you replied to will be notified about your message even if s/he muted the group chat — their notification settings for you personally apply in this case.

+

Replies also make group chats much easier to navigate. If you tap on the quote, the app scrolls up to the original message.

+

Mentions

+

If you want several people within a group chat to get instantly involved in the conversation, you may now also mention them in a message, provided they have a username:

+
+ + +

+
+ +

They will be notified about this message, even if they muted the group chat — unless they've muted you personally, of course!

+

Hashtags

+

Another new way of bringing structure to group chats is by using hashtags. Any word starting with a “#” will be clickable. Tap on a hashtag to get instant search results from your Telegram messages.

+
+ + +
+
+ +

Forwarding with comments

+

On top of this, you can now add a comment to the stuff you forward. This comment will be shown before the forwarded messages.

+
+

Group chats are becoming larger and livelier — a Telegram group may include up to 200 members that share thousands of messages daily. We hope that these new tools will help you bring order and clarity to the chaos of a thriving group chat.

+

+ +

March 19, 2015
The Telegram Team

+
+ +
+ + +
+ + +
+
+
+ + + + + + + diff --git a/data/telegram.org/teststore.html b/data/telegram.org/teststore.html new file mode 100644 index 0000000000..627632aa1c --- /dev/null +++ b/data/telegram.org/teststore.html @@ -0,0 +1,284 @@ + + + + + Telegram Messenger + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+ + + + + + +
+ +

Why Telegram?

+ +
+
+
+
+

Simple

+
Telegram is so simple you already know how to use it.
+
+
+ +
+
+
+

Private

+
Telegram messages are heavily encrypted and can self-destruct.
+
+
+ +
+
+
+

Synced

+
Telegram lets you access your chats from multiple devices.
+
+
+ +
+
+
+

Fast

+
Telegram delivers messages faster than any other application.
+
+
+ +
+
+
+

Powerful

+
Telegram has no limits on the size of your media and chats.
+
+
+ +
+
+
+

Open

+
Telegram has an open API and source code free for everyone.
+
+
+ +
+
+
+

Secure

+
Telegram keeps your messages safe from hacker attacks.
+
+
+ +
+
+
+

Social

+
Telegram groups can hold up to 200,000 members.
+
+
+ +
+
+
+

Expressive

+
Telegram lets you completely customize your messenger.
+
+
+
+ +
+ +
+ +
+
+
+ + + + + + + + diff --git a/data/themes.telegram.org.html b/data/themes.telegram.org.html new file mode 100644 index 0000000000..ea6b23db93 --- /dev/null +++ b/data/themes.telegram.org.html @@ -0,0 +1,162 @@ + + + + + Telegram Themes + + + + + + + + + + + + + + + + + + + +
+ +
+ Don't have Telegram yet? Try it now + +
+
+
+

Telegram Theme Editor

+

The online theme editor allows you to create and modify your existing cloud themes for every platform. Any changes will appear in the apps immediately after you save them.

+ +
+
+ + + + + + + + + + + + +