auth.SignIn

class pyrogram.raw.functions.auth.SignIn

Signs in a user with a validated phone number.

Details:
  • Layer: 223

  • ID: 8D52A951

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

  • phone_code_hash (str) – SMS-message ID, obtained from auth.sendCode

  • phone_code (str, optional) – Valid numerical code from the SMS-message

  • email_verification (EmailVerification, optional) – Email verification code or token

Returns:

auth.Authorization

TL Schema

auth.signIn#8d52a951
flags:#
phone_number:string
phone_code_hash:string
phone_code:flags.0?string
email_verification:flags.1?EmailVerification

= auth.Authorization

Parameter Tree

SignIn
├── phone_numberstring
├── phone_code_hashstring
├── phone_codestring (optional)
└── email_verificationEmailVerification (optional)
│ └── codestring
│ └── tokenstring
└── tokenstring

Example

await app.invoke(
    SignIn(
        phone_number="text",
        phone_code_hash="text",
        phone_code="text",
        email_verification=EmailVerificationCode(code="text"),
    )
)