auth.sendCode #

Send the verification code for login

Layer 223

auth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode;
auth.sentCodeSuccess#2390fe44 authorization:auth.Authorization = auth.SentCode;
auth.sentCodePaymentRequired#e0955a3c store_product:string phone_code_hash:string support_email_address:string support_email_subject:string currency:string amount:long = auth.SentCode;
---functions---
auth.sendCode#a677244f phone_number:string api_id:int api_hash:string settings:CodeSettings = auth.SentCode;

Parameters #

NameTypeDescription
phone_numberstringPhone number in international format
api_idintApplication identifier (see App configuration)
api_hashstringApplication secret hash (see App configuration)
settingsCodeSettingsSettings for the code type to send

Result #

auth.SentCode

Only users can use this method #

This method can be invoked over an unauthenticated connection » #

Possible errors #

CodeTypeDescription
400API_ID_INVALIDAPI ID invalid.
400API_ID_PUBLISHED_FLOODThis API id was published somewhere, you can't use it now.
500AUTH_RESTARTRestart the authorization process.
500AUTH_RESTART_%dInternal error (debug info %d), please repeat the method call.
400PHONE_NUMBER_APP_SIGNUP_FORBIDDENYou can't sign up using this app.
400PHONE_NUMBER_BANNEDThe provided phone number is banned from telegram.
400PHONE_NUMBER_FLOODYou asked for the code too many times.
406PHONE_NUMBER_INVALIDThe phone number is invalid.
406PHONE_PASSWORD_FLOODYou have tried logging in too many times.
400PHONE_PASSWORD_PROTECTEDThis phone is password protected.
400SMS_CODE_CREATE_FAILEDAn error occurred while creating the SMS code.
406UPDATE_APP_TO_LOGINPlease update your client to login.