auth.SentCode

class pyrogram.raw.base.auth.SentCode

Contains info on a confirmation code message sent via SMS, phone call or Telegram.

Constructors:

This base type has 3 constructors available.

auth.SentCode

Contains info about a sent verification code.

auth.SentCodePaymentRequired

Official apps may receive this constructor, indicating that due to the high cost of SMS verification codes for the user's country/provider, the user must purchase a Telegram Premium subscription in order to proceed with the login/signup.

auth.SentCodeSuccess

The user successfully authorized using future auth tokens

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
├── typeauth.SentCodeType
│ ├── auth.SentCodeTypeApp
│ │ └── lengthint
│ ├── auth.SentCodeTypeSms
│ │ └── lengthint
│ ├── auth.SentCodeTypeCall
│ │ └── lengthint
│ │ └── patternstring
│ │ ├── prefixstring
│ │ └── lengthint
│ │ ├── apple_signin_allowedtrue (optional)
│ │ ├── google_signin_allowedtrue (optional)
│ │ ├── email_patternstring
│ │ ├── lengthint
│ │ ├── reset_available_periodint (optional)
│ │ └── reset_pending_dateint (optional)
│ │ ├── apple_signin_allowedtrue (optional)
│ │ └── google_signin_allowedtrue (optional)
│ │ ├── urlstring
│ │ └── lengthint
│ │ ├── noncebytes (optional)
│ │ ├── play_integrity_project_idlong (optional)
│ │ ├── play_integrity_noncebytes (optional)
│ │ ├── receiptstring (optional)
│ │ ├── push_timeoutint (optional)
│ │ └── lengthint
│ │ └── beginningstring (optional)
│ └── beginningstring (optional)
├── phone_code_hashstring
├── next_typeauth.CodeType (optional)
│ ├── auth.CodeTypeSms
│ ├── auth.CodeTypeCall
└── timeoutint (optional)

Example

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