Takeout SessionsUSER-ONLY
User Walkthrough 39 of 50
Takeout sessions let users export account data with higher request limits.
Starting a Session
startTakeoutSession starts an export.
const takeoutId = await client.startTakeoutSession();
Exporting Left Channels
getLeftChannels retrieves channels that the account has left while the session is active.
The takeout identifier connects left-channel and chat-history exports to the session.
const leftChannels = await client.getLeftChannels(takeoutId);
Methods that support takeout sessions, such as getHistory, accept the same identifier.
const history = await client.getHistory(chatId, { takeoutId });
Ending a Session
endTakeoutSession finishes the export.
await client.endTakeoutSession(takeoutId);