change_cloud_password()

async Client.change_cloud_password()

Change your Two-Step Verification password (Cloud Password) with a new one.

Usable by Users Bots
Parameters:
  • current_password (str) – Your current password.

  • new_password (str) – Your new password.

  • new_hint (str, optional) – A new password hint. Pass None or omit it to keep the hint the account already has. Pass an empty string to remove the hint.

Returns:

bool – True on success.

Raises:

ValueError – In case there is no cloud password to change.

Example

# Change password only (keeps existing hint)
await app.change_cloud_password("current_password", "new_password")

# Change password and hint
await app.change_cloud_password("current_password", "new_password", new_hint="hint")

# Change password and remove hint
await app.change_cloud_password("current_password", "new_password", new_hint="")