account.confirmPasswordEmail
Verify an email to use as 2FA recovery method.
func (c *Client) AccountConfirmPasswordEmail(ctx context.Context, code string) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountConfirmPasswordEmail(ctx, code)
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Code | string | yes | The phone code that was received after setting a recovery email |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CODE_INVALID | Code invalid. |
| 400 | EMAIL_HASH_EXPIRED | Email hash expired. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.confirmPasswordEmail#8fdf1920