account.initTakeoutSession
Intialize account takeout session
Example
const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result = await client.invoke(new Api.account.initTakeoutSession({
contacts: true,
messageUsers: true,
messageChats: true,
messageMegagroups: true,
messageChannels: true,
files: true,
fileMaxSize: 7615220,
}));
console.log(result); // prints the result
})();
TL schema
account.takeout#4dba4501 id:long = account.Takeout;
---functions---
account.initTakeoutSession#f05b4804 flags:# contacts:flags.0?true message_users:flags.1?true message_chats:flags.2?true message_megagroups:flags.3?true message_channels:flags.4?true files:flags.5?true file_max_size:flags.5?int = account.Takeout;
Parameters
Name
Type
Description
Result
Possible errors
Code
Type
Description
420
TAKEOUT_INIT_DELAY_X
Wait X seconds before initing takeout
Can bots use this methd ?
yes
Related pages
How to handle channels, supergroups, groups, and what's the difference between them.
Last updated
Was this helpful?