Layer 220
AccountChangePhone
Change the phone number of the current account
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
UserPossible 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