Layer 224
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 |
|---|---|---|
| Code | string | Code received via email |
| NewSettings | flags.0?account.PasswordInputSettings | New password |
Returns
auth.AuthorizationGogram Example
// AuthRecoverPassword - using Params struct result, err := client.AuthRecoverPassword(&tg.AuthRecoverPasswordParams{ Code: "Hello, World!", // Optional fields: // NewSettings: nil, }) if err != nil { // handle error } // result is *tg.AuthAuthorization
Possible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CODE_EMPTY | The provided code is empty. |
| 400 | NEW_SETTINGS_INVALID | The new password settings are invalid. |