telegram api method · layer 229 · #a59b102f
account.updatePasswordSettings
Set a new 2FA password
definition
account.updatePasswordSettings#a59b102f password:InputCheckPasswordSRP new_settings:account.PasswordInputSettings = Bool;
parameters
| name | type | description |
|---|---|---|
password | InputCheckPasswordSRP | The old password (see SRP) |
new_settings | account.PasswordInputSettings | The new password (see SRP) |
returns
errors (11)
| code | error | description |
|---|---|---|
| 400 | BUSINESS_CONNECTION_NOT_ALLOWED | This method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection. |
| 400 | EMAIL_INVALID | The specified email is invalid. |
| 400 | EMAIL_UNCONFIRMED | Email unconfirmed. |
| 400 | EMAIL_UNCONFIRMED_%d | The provided email isn't confirmed, %d is the length of the verification code that was just sent to the email: use account.verifyEmail 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. |
| 401 | AUTH_KEY_UNREGISTERED | The specified authorization key is not registered in the system (for example, a PFS temporary key has expired). |
history
present in layers 46–229 · constructor id changed 1×
| id | layers |
|---|---|
| #fa7c4b86 | 46–83 |
| #a59b102f | 84–229 |