Layer 220
AccountUpdatePasswordSettings
Set a new 2 FA password
method
Users
account.updatePasswordSettings#a59b102f password:InputCheckPasswordSRP new_settings:account.PasswordInputSettings = Bool;
Parameters
| Name | Type | Description |
|---|---|---|
| Password | InputCheckPasswordSRP | The old password (see SRP ) |
| NewSettings | account.PasswordInputSettings | The new password (see SRP ) |
Returns
BoolPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | EMAIL_INVALID | The specified email is invalid. |
| 400 | EMAIL_UNCONFIRMED | Email unconfirmed. |
| 400 | EMAIL_UNCONFIRMED_%d | The provided email isn't confirmed, <number> is the length of the verification code that was just sent to the email: use account. verify Email to enter the received verification code and enable the recovery email. |
| 400 | NEW_SALT_INVALID | The new salt is invalid. |
| 400 | NEW_SETTINGS_EMPTY | No password is set on the current account, and no new password was specified in new_settings. |
| 400 | NEW_SETTINGS_INVALID | The new password settings are invalid. |
| 400 | PASSWORD_HASH_INVALID | The provided password hash is invalid. |
| 400 | SRP_ID_INVALID | Invalid SRP ID provided. |
| 400 | SRP_PASSWORD_CHANGED | Password has changed. |
Gogram Example
// AccountUpdatePasswordSettings - positional arguments result, err := client.AccountUpdatePasswordSettings(&tg.InputCheckPasswordSrp{}, nil) if err != nil { // handle error } // result is *tg.Bool