SendVerifyPhoneCodeRequest

Only users can use this request. See code examples.

---functions---
account.sendVerifyPhoneCode#a5a356f9 phone_number:string settings:CodeSettings = auth.SentCode

Returns

auth.SentCode

This type can be an instance of either:

SentCodeSentCodeSuccess

Parameters

phone_numberstring
settingsCodeSettings

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,
            allow_firebase=True,
            unknown_number=True,
            logout_tokens=[b'arbitrary\x7f data \xfa here'],
            token='some string here',
            app_sandbox=False
        )
    ))
    print(result.stringify())