auth.Authorization

Object contains info on user authorization.

auth.authorization#cd050916 flags:# tmp_sessions:flags.0?int user:User = auth.Authorization;
auth.authorizationSignUpRequired#44747e9a flags:# terms_of_service:flags.0?help.TermsOfService = auth.Authorization;

---functions---

auth.signUp#80eee427 phone_number:string phone_code_hash: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;
auth.importBotAuthorization#67a3ff2c flags:int api_id:int api_hash:string bot_auth_token:string = auth.Authorization;
auth.checkPassword#d18b4d16 password:InputCheckPasswordSRP = auth.Authorization;
auth.recoverPassword#37096c70 flags:# code:string new_settings:flags.0?account.PasswordInputSettings = auth.Authorization;

Constructors

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

Methods

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