account.verifyEmail
Verify an email address.
func (c *Client) AccountVerifyEmail(ctx context.Context, request *AccountVerifyEmailRequest) (AccountEmailVerifiedClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountVerifyEmail(ctx, &tg.AccountVerifyEmailRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // AccountEmailVerifiedClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Purpose | EmailVerifyPurposeClass | yes | Verification purpose |
Verification | EmailVerificationClass | yes | Email verification code or token |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CODE_INVALID | Code invalid. |
| 400 | EMAIL_INVALID | The specified email is invalid. |
| 400 | EMAIL_NOT_ALLOWED | The specified email cannot be used to complete the operation. |
| 400 | EMAIL_VERIFY_EXPIRED | The verification email has expired. |
| 400 | PHONE_CODE_EXPIRED | The phone code you provided has expired. |
| 400 | PHONE_NUMBER_INVALID | The phone number is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.verifyEmail#32da4cf