auth.signIn #

Signs in a user with a validated phone number.

Layer 223

auth.authorization#2ea2c0d4 flags:# setup_password_required:flags.1?true otherwise_relogin_days:flags.1?int tmp_sessions:flags.0?int future_auth_token:flags.2?bytes user:User = auth.Authorization;
auth.authorizationSignUpRequired#44747e9a flags:# terms_of_service:flags.0?help.TermsOfService = auth.Authorization;
---functions---
auth.signIn#8d52a951 flags:# phone_number:string phone_code_hash:string phone_code:flags.0?string email_verification:flags.1?EmailVerification = auth.Authorization;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
phone_numberstringPhone number in the international format
phone_code_hashstringSMS-message ID, obtained from auth.sendCode
phone_codeflags.0?stringValid numerical code from the SMS-message
email_verificationflags.1?EmailVerificationEmail verification code or token

Result #

auth.Authorization

Only users can use this method #

This method can be invoked over an unauthenticated connection » #

Possible errors #

CodeTypeDescription
500AUTH_RESTARTRestart the authorization process.
400PHONE_CODE_EMPTYphone_code is missing.
400PHONE_CODE_EXPIREDThe phone code you provided has expired.
400PHONE_CODE_INVALIDThe provided phone code is invalid.
406PHONE_NUMBER_INVALIDThe phone number is invalid.
400PHONE_NUMBER_UNOCCUPIEDThe phone number is not yet being used.
500SIGN_IN_FAILEDFailure while signing in.
406UPDATE_APP_TO_LOGINPlease update your client to login.

auth.sendCode #

Send the verification code for login