ConfirmPhoneRequest
Only users can use this method. See code examples.
---functions--- account.confirmPhone#5f2178c3 phone_code_hash:string phone_code:string = Bool
Returns
| Bool |
This type has no instances available.
Parameters
| phone_code_hash | string | |
| phone_code | string |
Known RPC errors
This request can cause 2 known errors:
CodeHashInvalidError | Code hash invalid. |
PhoneCodeEmptyError | The phone code is missing. |
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.ConfirmPhoneRequest(
phone_code_hash='some string here',
phone_code='some string here'
))
print(result)