SendConfirmPhoneCodeRequest
Only users can use this method. See code examples.
---functions--- account.sendConfirmPhoneCode#1b3faa88 hash:string settings:CodeSettings = auth.SentCode
Returns
| auth.SentCode |
This type can only be an instance of:
| SentCode |
Parameters
| hash | string | |
| settings | CodeSettings |
Known RPC errors
This request can cause 1 known error:
HashInvalidError | The provided hash 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.SendConfirmPhoneCodeRequest(
hash='A4LmkR23G0IGxBE71zZfo1',
settings=types.CodeSettings(
allow_flashcall=True,
current_number=True,
allow_app_hash=True,
allow_missed_call=True,
logout_tokens=[b'arbitrary\x7f data \xfa here']
)
))
print(result.stringify())