auth.resetLoginEmail
Reset the login email ».
func (c *Client) AuthResetLoginEmail(ctx context.Context, request *AuthResetLoginEmailRequest) (AuthSentCodeClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AuthResetLoginEmail(ctx, &tg.AuthResetLoginEmailRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // AuthSentCodeClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
PhoneNumber | string | yes | Phone number of the account |
PhoneCodeHash | string | yes | Phone code hash, obtained as described in the documentation » |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | EMAIL_INSTALL_MISSING | |
| 400 | PHONE_NUMBER_INVALID | The phone number is invalid. |
| 400 | TASK_ALREADY_EXISTS | An email reset was already requested. |
References
- Official documentation
- Generated Go reference
- TL definition:
auth.resetLoginEmail#7e960193