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
| Name | Type | Required | Description |
|---|---|---|---|
Revoked | bool | — | Whether to revoke the chat invite |
Peer | InputPeerClass | yes | Chat |
Link | string | yes | Invite link |
ExpireDate | int | — | New expiration date |
UsageLimit | int | — | Maximum number of users that can join using this link |
RequestNeeded | bool | — | Whether admin confirmation is required before admitting each separate user into the chat |
Title | string | — | Description of the invite link, visible only to administrators |
Returns
MessagesExportedChatInviteClass
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | CHAT_INVITE_PERMANENT | You can't set an expiration date on permanent invite links. |
| 403 | CHAT_WRITE_FORBIDDEN | You can't write in this chat. |
| 403 | EDIT_BOT_INVITE_FORBIDDEN | Normal users can't edit invites that were created by bots. |
| 400 | INVITE_HASH_EXPIRED | The invite link has expired. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | USAGE_LIMIT_INVALID | The specified usage limit is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.editExportedChatInvite#bdca2f75