Skip to main content

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

NameTypeRequiredDescription
PhoneNumberstringyesPhone number of the account
PhoneCodeHashstringyesPhone code hash, obtained as described in the documentation »

Returns

AuthSentCodeClass

Possible errors

CodeTypeDescription
400EMAIL_INSTALL_MISSING
400PHONE_NUMBER_INVALIDThe phone number is invalid.
400TASK_ALREADY_EXISTSAn email reset was already requested.

References