Skip to main content

messages.editExportedChatInvite

Edit an exported chat invite

func (c *Client) MessagesEditExportedChatInvite(ctx context.Context, request *MessagesEditExportedChatInviteRequest) (MessagesExportedChatInviteClass, error)

Calling this method​

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

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

Parameters​

NameTypeRequiredDescription
Revokedbool—Whether to revoke the chat invite
PeerInputPeerClassyesChat
LinkstringyesInvite link
ExpireDateint—New expiration date
UsageLimitint—Maximum number of users that can join using this link
RequestNeededbool—Whether admin confirmation is required before admitting each separate user into the chat
Titlestring—Description of the invite link, visible only to administrators

Returns​

MessagesExportedChatInviteClass

Possible errors​

CodeTypeDescription
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400CHAT_INVITE_PERMANENTYou can't set an expiration date on permanent invite links.
403CHAT_WRITE_FORBIDDENYou can't write in this chat.
403EDIT_BOT_INVITE_FORBIDDENNormal users can't edit invites that were created by bots.
400INVITE_HASH_EXPIREDThe invite link has expired.
400PEER_ID_INVALIDThe provided peer id is invalid.
400USAGE_LIMIT_INVALIDThe specified usage limit is invalid.

References​