auth.signUp

Registers a validated phone number in the system.

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;

Parameters

Name Type Description
phone_number string Phone number in the international format
phone_code_hash string SMS-message ID
first_name string New user first name
last_name string New user last name

Result

auth.Authorization

Possible errors

Code Type Description
400 FIRSTNAME_INVALID The first name is invalid.
400 LASTNAME_INVALID The last name is invalid.
400 PHONE_CODE_EMPTY phone_code is missing.
400 PHONE_CODE_EXPIRED The phone code you provided has expired.
400 PHONE_CODE_INVALID The provided phone code is invalid.
400 PHONE_NUMBER_FLOOD You asked for the code too many times.
406 PHONE_NUMBER_INVALID The phone number is invalid.
400 PHONE_NUMBER_OCCUPIED The phone number is already in use.