Layer 220
AuthRecoverPassword
Reset the 2 FA password using the recovery code sent using auth. request Password Recovery.
method
Users
auth.recoverPassword#37096c70 flags:# code:string new_settings:flags.0?account.PasswordInputSettings = auth.Authorization;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Code | string | Code received via email |
| NewSettings | flags.0?account.PasswordInputSettings | New password |
Returns
auth.AuthorizationPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CODE_EMPTY | The provided code is empty. |
| 400 | NEW_SETTINGS_INVALID | The new password settings are invalid. |
Gogram Example
// AuthRecoverPassword - using Params struct result, err := client.AuthRecoverPassword(&tg.AuthRecoverPasswordParams{ Code: "...", // Optional fields: // NewSettings: nil, }) if err != nil { // handle error } // result is *tg.AuthAuthorization