- authorization by phone number;
- record a new user in the database;
- assigning a generated code to a new user;
- the ability to track in the profile the number of users who entered the invite code of the current user.
The function "phone_auth" sending an authorization code, adding a user (phone number) to the database.
Below are the main parameters:
Endpoint: api/phone_auth
method: GET
params: phonenumber
answer: OK, error(403)
The function "phone_code" sending an invite code, adding a user (phone number, invitation code) to the "User" database.
Below are the main parameters:
Endpoint: api/phone_code
method: GET
params: phonenumber, phonecode
answer: OK/JSON(referralcode), error(403)
The function "invite" processes the received invite code.
Below are the main parameters:
Endpoint: api/invite
method: GET
params: phonenumber, usercode, invitecode
answer: OK, error(401)
The function "getreferrals" provides a list of invited users.
Below are the main parameters:
Endpoint: api/getreferrals
method: GET
params: phonenumber, usercode
answer: OK/JSON(phonelist), error(401)
To test the system, run the file "testapi.py" and follow the instructions.