ChangePhoneRequest
Only users can use this request. See code examples.
---functions--- account.changePhone#70c32edb phone_number:string phone_code_hash:string phone_code:string = User
Returns
User |
This type can be an instance of either:
User | UserEmpty |
Parameters
phone_number | string | |
phone_code_hash | string | |
phone_code | string |
Known RPC errors
This request can cause 1 known error:
PhoneNumberInvalidError | The phone number is invalid. |
You can import these from telethon.errors
.
Example
from telethon.sync import TelegramClient from telethon import functions, types with TelegramClient(name, api_id, api_hash) as client: result = client(functions.account.ChangePhoneRequest( phone_number='some string here', phone_code_hash='some string here', phone_code='some string here' )) print(result.stringify())