Object contains info on user authorization.
auth.authorization#f6b673a4 expires:int user:User = auth.Authorization;
---functions---
auth.signUp#1b067634 phone_number:string phone_code_hash:string phone_code:string first_name:string last_name:string = auth.Authorization;
auth.signIn#bcd51581 phone_number:string phone_code_hash:string phone_code:string = auth.Authorization;
auth.importAuthorization#e3ef9613 id:int bytes:bytes = auth.Authorization;
Constructor | Description |
---|---|
auth.authorization | Contains user authorization info. |
auth.authorizationSignUpRequired | An account with this phone number doesn't exist on telegram: the user has to enter basic information and sign up |
Method | Description |
---|---|
auth.signUp | Registers a validated phone number in the system. |
auth.signIn | Signs in a user with a validated phone number. |
auth.importAuthorization | Logs in a user using a key transmitted from his native data-center. |
auth.importBotAuthorization | Login as a bot |
auth.checkPassword | Try logging to an account protected by a 2FA password. |
auth.recoverPassword | Reset the 2FA password using the recovery code sent using auth.requestPasswordRecovery. |
auth.importWebTokenAuthorization | Login by importing an authorization token |