SendVerifyPhoneCodeRequest
Only users can use this method. See code examples.
---functions--- account.sendVerifyPhoneCode#a5a356f9 phone_number:string settings:CodeSettings = auth.SentCode
Returns
| auth.SentCode |
This type can only be an instance of:
| SentCode |
Parameters
| phone_number | string | |
| settings | CodeSettings |
Known RPC errors
This request can't cause any RPC error as far as we know.
Example
from telethon.sync import TelegramClient
from telethon import functions, types
with TelegramClient(name, api_id, api_hash) as client:
result = client(functions.account.SendVerifyPhoneCodeRequest(
phone_number='some string here',
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())