account.SendChangePhoneCode

class pyrogram.raw.functions.account.SendChangePhoneCode

Verify a new phone number to associate to the current account

Details:
  • Layer: 223

  • ID: 82574AE5

Parameters:
  • phone_number (str) – New phone number

  • settings (CodeSettings) – Phone code settings

Returns:

auth.SentCode

TL Schema

account.sendChangePhoneCode#82574ae5
phone_number:string
settings:CodeSettings

= auth.SentCode

Parameter Tree

SendChangePhoneCode
├── phone_numberstring
└── 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(
    SendChangePhoneCode(
        phone_number="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
        ),
    )
)