Skip to main content

messages.getExportedChatInvite

Get info about a chat invite

func (c *Client) MessagesGetExportedChatInvite(ctx context.Context, request *MessagesGetExportedChatInviteRequest) (MessagesExportedChatInviteClass, error)

Calling this method

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

res, err := api.MessagesGetExportedChatInvite(ctx, &tg.MessagesGetExportedChatInviteRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // MessagesExportedChatInviteClass
return nil
})

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesChat
LinkstringyesInvite link

Returns

MessagesExportedChatInviteClass

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
403CHAT_WRITE_FORBIDDENYou can't write in this chat.
400INVITE_HASH_EXPIREDThe invite link has expired.
400PEER_ID_INVALIDThe provided peer id is invalid.

References