Skip to content

naveenkrnl/Truecaller-APIs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Truecaller-APIs

This is a brief description of what this app does and how these apis work
As specified, this app is just like truecaller and works on same principle

To start the project, one needs to run the server first using the specified virtual environment.
On Linux,
Enter following commands once you are in this directory

    source venv/bin/activate 
    cd truecaller
    python manage.py runserver

Now the application server has started,

Every Functionality implemented in the code could have been implemented using various other methods. I have used methods which I felt would be appropriate

To access anything in the api , one needs to be logged in otherwise it will raise Authentication errors.

To register using the API: -


ENDPOINT - http://localhost:8000/api/auth/register/

data = {
    "name": "",
    "phone_number": "",
    "email": "",
    "password": "",
    "password2": ""
}


To login and authenticate into the API :


ENDPOINT - http://localhost:8000/api/auth/login/

data = {
    "phone_number/email": "",
    "password": "",
}

Note :- I have used JWT Authentication and implicitly logging into django using login function, but for third party devices and apps, we can use token based system to verify and it has also been implemented here only
After logging in you can use below ENDPOINTS

Search using the API


ENDPOINT - http://localhost:8000/api/data/


To search using a phone number -
ENDPOINT - http://localhost:8000/api/data/?p={phone_number}

Replace {phone_number} with phone number and make a get request

To search using a name -
ENDPOINT - http://localhost:8000/api/data/?name={name}

Replace {phone_number} with phone number and make a get request


Detail View of Users

ENDPOINT - http://localhost:8000/api/data/{user_id}

Replace {user_id} with respective id of user to display.
It has been keeping in mind to show the Email if Requested User has logged in user's phone number as a contact

To mark spam Make a POST request to the ENDPOINT

Detail View of Contacts


ENDPOINT - http://localhost:8000/api/data/p/{user_id}/
Replace {user_id} with respective id of user to display.
It has been keeping in mind to show the Email if Requested User has logged in user's phone number as a contact
To mark spam
Make a POST request to the ENDPOINT

Declaration - This application is intended for educational purposes only. Any use in professional manner or to harm anyone or any organization doesn't relate to me and can be considered as illegal.

Promotion - If you are lookingfor best instagram captions for your instagram posts then must check out Instafbcaptions.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published