account.changePhone

Change the phone number of the current account

userEmpty#200250ba id:int = User;
userSelf#7007b451 id:int first_name:string last_name:string username:string phone:string photo:UserProfilePhoto status:UserStatus inactive:Bool = User;
userContact#cab35e18 id:int first_name:string last_name:string username:string access_hash:long phone:string photo:UserProfilePhoto status:UserStatus = User;
userRequest#d9ccc4ef id:int first_name:string last_name:string username:string access_hash:long phone:string photo:UserProfilePhoto status:UserStatus = User;
userForeign#75cf7a8 id:int first_name:string last_name:string username:string access_hash:long photo:UserProfilePhoto status:UserStatus = User;
userDeleted#d6016d7a id:int first_name:string last_name:string username:string = User;
---functions---
account.changePhone#70c32edb phone_number:string phone_code_hash:string phone_code:string = User;

Parameters

Name Type Description
phone_number string New phone number
phone_code_hash string Phone code hash received when calling account.sendChangePhoneCode
phone_code string Phone code received when calling account.sendChangePhoneCode

Result

User

Possible errors

Code Type Description
400 PHONE_CODE_EMPTY phone_code is missing.
400 PHONE_CODE_EXPIRED The phone code you provided has expired.
406 PHONE_NUMBER_INVALID The phone number is invalid.
400 PHONE_NUMBER_OCCUPIED The phone number is already in use.

Related pages

account.sendChangePhoneCode

Verify a new phone number to associate to the current account