Layer 220
method Users
account.changePhone#70c32edb phone_number:string phone_code_hash:string phone_code:string = User;

Parameters

Name Type Description
PhoneNumber string New phone number
PhoneCodeHash string Phone code hash received when calling account. send Change Phone Code
PhoneCode string Phone code received when calling account. send Change Phone Code

Returns

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.

Gogram Example

// AccountChangePhone - positional arguments
result, err := client.AccountChangePhone("...", "...", "...")
if err != nil {
    // handle error
}
// result is *tg.User