InitTakeoutSessionRequest
Only users can use this request. See code examples.
---functions--- account.initTakeoutSession#8ef3eab0 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?long = account.Takeout
Returns
account.Takeout |
This type can only be an instance of:
Takeout |
Parameters
contacts | flag | This argument defaults to None and can be omitted. |
message_users | flag | This argument defaults to None and can be omitted. |
message_chats | flag | This argument defaults to None and can be omitted. |
message_megagroups | flag | This argument defaults to None and can be omitted. |
message_channels | flag | This argument defaults to None and can be omitted. |
files | flag | This argument defaults to None and can be omitted. |
file_max_size | long | This argument defaults to None and can be omitted. |
Known RPC errors
This request can't cause any RPC error as far as we know.
Example
Please refer to the documentation of client.takeout()
to learn about the parameters and see several code examples on how to use it.
The method above is the recommended way to do it. If you need more control over the parameters or want to learn how it is implemented, open the details by clicking on the "Details" text.
from telethon.sync import TelegramClient from telethon import functions, types with TelegramClient(name, api_id, api_hash) as client: result = client(functions.account.InitTakeoutSessionRequest( contacts=True, message_users=True, message_chats=True, message_megagroups=True, message_channels=True, files=True, file_max_size=-12398745604826 )) print(result.stringify())