auth.SentCode

class pyrogram.raw.types.auth.SentCode

Contains info about a sent verification code.

Constructor of SentCode.

Details:
  • Layer: 227

  • ID: 5E002502

Parameters:
  • type (auth.SentCodeType) – Phone code type

  • phone_code_hash (str) – Phone code hash, to be stored and later re-used with auth.signIn

  • next_type (auth.CodeType, optional) – Phone code type that will be sent next, if the phone code is not received within timeout seconds: to send it use auth.resendCode

  • timeout (int 32-bit, optional) – Timeout for reception of the phone code

Functions:

This object can be returned by 7 functions.

auth.SendCode

Send the verification code for login

auth.ResendCode

Resend the login code via another medium, the phone code type is determined by the return value of the previous auth.sendCode/auth.resendCode: see login for more info.

auth.ResetLoginEmail

Reset the login email ».

auth.CheckPaidAuth

{schema}

account.SendChangePhoneCode

Verify a new phone number to associate to the current account

account.SendConfirmPhoneCode

Send confirmation code to cancel account deletion, for more info click here »

account.SendVerifyPhoneCode

Send the verification phone code for telegram passport.

TL Schema

auth.sentCode#5e002502
flags:#
type:auth.SentCodeType
phone_code_hash:string
next_type:flags.1?auth.CodeType
timeout:flags.2?int

= auth.SentCode

Parameter Tree

SentCode
├── type → auth.SentCodeType
│ ├── auth.SentCodeTypeApp
│ │ └── length → int
│ ├── auth.SentCodeTypeSms
│ │ └── length → int
│ ├── auth.SentCodeTypeCall
│ │ └── length → int
│ │ └── pattern → string
│ │ ├── prefix → string
│ │ └── length → int
│ │ ├── apple_signin_allowed → true (optional)
│ │ ├── google_signin_allowed → true (optional)
│ │ ├── email_pattern → string
│ │ ├── length → int
│ │ ├── reset_available_period → int (optional)
│ │ └── reset_pending_date → int (optional)
│ │ ├── apple_signin_allowed → true (optional)
│ │ └── google_signin_allowed → true (optional)
│ │ ├── url → string
│ │ └── length → int
│ │ ├── nonce → bytes (optional)
│ │ ├── play_integrity_project_id → long (optional)
│ │ ├── play_integrity_nonce → bytes (optional)
│ │ ├── receipt → string (optional)
│ │ ├── push_timeout → int (optional)
│ │ └── length → int
│ │ └── beginning → string (optional)
│ └── beginning → string (optional)
├── phone_code_hash → string
├── next_type → auth.CodeType (optional)
│ ├── auth.CodeTypeSms
│ ├── auth.CodeTypeCall
└── timeout → int (optional)

Example

SentCode(
    type=SentCodeTypeApp(length=0),
    phone_code_hash="text",
)