change_phone_number()

Client.change_phone_number()

Change a user phone number in Telegram with a valid confirmation code.

Usable by Users Bots
Parameters:
  • phone_number (str) – Phone number in international format (includes the country prefix).

  • phone_code_hash (str) – Code identifier taken from the result of send_phone_number_code().

  • phone_code (str) – The valid confirmation code you received from SMS in your phone number.

Returns:

User – On success, in case the change completed, the user is returned.