miniproto.auth.service.AuthService.sign_in_phone
miniproto.auth.service.AuthService.sign_in_phone
Section titled “miniproto.auth.service.AuthService.sign_in_phone”sign_in_phone(phone: str, code_callback: Callback0, password_callback: Callback0 | None = None) -> objectSign in a phone-number account, requesting a code and optional 2FA password.
Parameters:
- phone (
str) – Account phone number sent toauth.sendCode. - code_callback (
Callback0) – Callable that returns or awaits the verification code. - password_callback (
Callback0 | None) – Callable used only when Telegram requires two-factor authentication.
Returns:
object– The successful Telegram authorization object.
Raises:
PasswordRequired– If the account needs 2FA and no password callback was provided.SignUpRequired– If the number has no Telegram account.RpcError– If Telegram returns an unexpected result for an authorization request.