diff --git a/data/web/corefork.telegram.org/api/takeout.html b/data/web/corefork.telegram.org/api/takeout.html index 62d47f5f70..b4eeb05624 100644 --- a/data/web/corefork.telegram.org/api/takeout.html +++ b/data/web/corefork.telegram.org/api/takeout.html @@ -2,10 +2,10 @@
-Start by passing the first message range; continue passing the same message range while paginating using the usual offset_*
, limit
, etc parameters; once there are no more results left, switch to the next message range, re-starting offset_*
, limit
pagination from the beginning.
Repeat until you've finished all the message ranges that were returned by messages.getSplitRanges.
Example implementation: tdesktop.
+Here's an overview of the steps required to export account information.
+All requests must be wrapped in an invokeWithTakeout constructors, including upload.getFile calls to save files.
+Unless otherwise specified, all requests do not require pagination using split ranges.
+If the user wants to download messages from chats, groups or channels:
+First of all, fetch and save the dialog list using split ranges and messages.getDialogs; at the beginning of each split range, make an initial request with all offsets set to 0
and limit=1
to fetch total dialog count
to display a proper progress bar.
Request and save info about left channels and supergroups if the user wants to export channel and group messages.
+For all dialogs, check if they match the dialog types chosen by the user, and if yes download all messages using split ranges and messages.getHistory; for each split range, make an initial request with all offsets set to 0
and limit=1
to fetch the initial message count to display a proper progress bar.
+Use the single message returned by the initial limit=1
request to also skip ranges that don't have any messages, because an empty messages
vector or a single messageEmpty is returned.
+If the user also chose to download only messages within a specific date interval, skip ranges whose:
limit=1
call) has a date
smaller than the bottom of the specified date interval. limit=1
, offset_id=1
, add_offset=-1
) has a date
bigger than tha top of the specified date interval.For each downloaded and saved message, also download and save all attached media, including custom emojis present in messages and captions, respecting the download filesize limits imposed by the user.
+If the user chose to download only their own messages, not messages sent by other users, use messages.search with peer
set to inputPeerSelf instead of messages.getHistory.
If the user wants to export their stories:
+If the user wants to export personal info:
+If the user wants to export their own profile pictures:
+If the user wants to export their contact list:
+If the user wants to export their sessions:
+If the user wants to export any other data not mentioned above, like for example personal data related to new Telegram features, that do not have any specific takeout methods in the Takeout API yet.
+savedPhoneContact#1142bd56 phone:string first_name:string last_name:string date:int = SavedContact;