auth.recoverPassword #

Reset the 2FA password using the recovery code sent using auth.requestPasswordRecovery.

Layer 223

auth.authorization#2ea2c0d4 flags:# setup_password_required:flags.1?true otherwise_relogin_days:flags.1?int tmp_sessions:flags.0?int future_auth_token:flags.2?bytes user:User = auth.Authorization;
auth.authorizationSignUpRequired#44747e9a flags:# terms_of_service:flags.0?help.TermsOfService = auth.Authorization;
---functions---
auth.recoverPassword#37096c70 flags:# code:string new_settings:flags.0?account.PasswordInputSettings = auth.Authorization;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
codestringCode received via email
new_settingsflags.0?account.PasswordInputSettingsNew password

Result #

auth.Authorization

Only users can use this method #

Possible errors #

CodeTypeDescription
400CODE_EMPTYThe provided code is empty.
400NEW_SETTINGS_INVALIDThe new password settings are invalid.

Two-factor authentication #

How to login to a user's account if they have enabled 2FA, how to change password.

auth.requestPasswordRecovery #

Request recovery code of a 2FA password, only for accounts with a recovery email configured.