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
| Name | Type | Required | Description |
|---|---|---|---|
Hash | string | yes | Invite hash from chat invite deep link ». |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 406 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | INVITE_HASH_EMPTY | The invite hash is empty. |
| 406 | INVITE_HASH_EXPIRED | The invite link has expired. |
| 400 | INVITE_HASH_INVALID | The invite hash is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.checkChatInvite#3eadb1bb