auth.SendCode

class pyrogram.raw.functions.auth.SendCode

Send the verification code for login

Details:
  • Layer: 223

  • ID: A677244F

Parameters:
  • phone_number (str) – Phone number in international format

  • api_id (int 32-bit) – Application identifier (see App configuration)

  • api_hash (str) – Application secret hash (see App configuration)

  • settings (CodeSettings) – Settings for the code type to send

Returns:

auth.SentCode

TL Schema

auth.sendCode#a677244f
phone_number:string
api_id:int
api_hash:string
settings:CodeSettings

= auth.SentCode

Parameter Tree

SendCode
├── phone_numberstring
├── api_idint
├── api_hashstring
└── settingsCodeSettings
└── CodeSettings
├── allow_flashcalltrue (optional)
├── current_numbertrue (optional)
├── allow_app_hashtrue (optional)
├── allow_missed_calltrue (optional)
├── allow_firebasetrue (optional)
├── unknown_numbertrue (optional)
├── logout_tokensVector < bytes > (optional)
├── tokenstring (optional)
└── app_sandboxBool (optional)

Example

await app.invoke(
    SendCode(
        phone_number="text",
        api_id=0,
        api_hash="text",
        settings=CodeSettings(
            allow_flashcall=None,
            current_number=None,
            allow_app_hash=None,
            allow_missed_call=None,
            allow_firebase=None,
            unknown_number=None,
            logout_tokens=None,
            token=None,
            app_sandbox=None
        ),
    )
)