Skip to main content

chatlists.exportChatlistInvite

Export a folder », creating a chat folder deep link ».

func (c *Client) ChatlistsExportChatlistInvite(ctx context.Context, request *ChatlistsExportChatlistInviteRequest) (*ChatlistsExportedChatlistInvite, error)

Calling this method

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

res, err := api.ChatlistsExportChatlistInvite(ctx, &tg.ChatlistsExportChatlistInviteRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *ChatlistsExportedChatlistInvite
return nil
})

Parameters

NameTypeRequiredDescription
ChatlistInputChatlistDialogFilteryesThe folder to export
TitlestringyesAn optional name for the link
Peers[]InputPeerClassyesThe list of channels, group and supergroups to share with the link. Basic groups will automatically be converted to supergroups when invoking the method.

Returns

*ChatlistsExportedChatlistInvite

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400CHATLISTS_TOO_MUCHYou have created too many folder links, hitting the chatlist_invites_limit_default/chatlist_invites_limit_premium limits ».
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400FILTER_ID_INVALIDThe specified filter ID is invalid.
400FILTER_NOT_SUPPORTEDThe specified filter cannot be used in this context.
400INVITES_TOO_MUCHThe maximum number of per-folder invites specified by the chatlist_invites_limit_default/chatlist_invites_limit_premium client configuration parameters » was reached.
400PEERS_LIST_EMPTYThe specified list of peers is empty.

References