Skip to main content

messages.checkChatInvite

Check the validity of a chat invite link and get basic info about it

func (c *Client) MessagesCheckChatInvite(ctx context.Context, hash string) (ChatInviteClass, error)

Calling this method​

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

res, err := api.MessagesCheckChatInvite(ctx, hash)
if err != nil {
return err
}
_ = res // ChatInviteClass
return nil
})

Parameters​

NameTypeRequiredDescription
HashstringyesInvite hash from chat invite deep link ».

Returns​

ChatInviteClass

Possible errors​

CodeTypeDescription
406CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400INVITE_HASH_EMPTYThe invite hash is empty.
406INVITE_HASH_EXPIREDThe invite link has expired.
400INVITE_HASH_INVALIDThe invite hash is invalid.

References​