Skip to main content

account.initTakeoutSession

Initialize a takeout session, see here » for more info.

func (c *Client) AccountInitTakeoutSession(ctx context.Context, request *AccountInitTakeoutSessionRequest) (*AccountTakeout, error)

Calling this method​

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.AccountInitTakeoutSession(ctx, &tg.AccountInitTakeoutSessionRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *AccountTakeout
return nil
})

Parameters​

NameTypeRequiredDescription
Contactsbool—Whether to export contacts
MessageUsersbool—Whether to export messages in private chats
MessageChatsbool—Whether to export messages in basic groups
MessageMegagroupsbool—Whether to export messages in supergroups
MessageChannelsbool—Whether to export messages in channels
Filesbool—Whether to export files
FileMaxSizeint64—Maximum size of files to export

Returns​

*AccountTakeout

References​