Skip to main content

phoneinfopy is a Python package that allow you to get respones from truecaller APIs. You can able to do login, OTP verification, and phone number search using Truecaller API with this package.

Project description

PhoneInfopy

PhoneInfopy is a python tool to directly make request to Truecaller API's and get response. This module will allow you to register your number, validate OTP while registering and search information about a phone number.

Table to Contents

Requirements

To use PhoneInfopy module you need below pre requirements.

  • valid mobile number
  • python
  • truecaller auth token [This token will get by login/register process]

Command Line Usage

You can install PhoneInfopy package using pip

  • phoneinfopy -h [--help] for help
  • phoneinfopy -l [--login] for login [Need to mention country code]
  • phoneinfopy -c [--code] for country code
  • phoneinfopy -i [--info] for search mobile number [Need to mention country code]

Installation

pip install phoneinfopy

Login

python3 -m phoneinfopy.cli -c <countryCode> -l <phoneNumber>

Example

python3 -m phoneinfopy.cli -c +91 -l 98xxxxxxxx

search-Number

You can search phone number by using below command

python3 -m phoneinfo.cli -c +91 -i 98xxxxxxxx

Module-usage

Install

You can install the phoneinfopy moudle using pip:

pip install phoneinfopy

Register

from phoneinfopy import register_phone_number

number = "+9198xxxxxxxx"
response = register_phone_number(number)

# register_phone_number method will return json object
# example:
# {
#   status : bool,
#   message: str
#   requestId: str
# }

Validate-OTP:

Once you get success response from register method next you need to verify the OTP to get access token.

from phoneinfopy import validate_OTP

number = "+9198xxxxxxxx"
OTP = "123456"
requestId = "<you get this ID while register process>"
response = validate_OTP(number, OTP, requestId)

# validate_OTP method will return json object
# {
#   status: bool
#   message: str
#   access_token: str  [If OTP validatino is success]
# }

Search-number

You need to get user information using phone number you can use like this..

from phoneinfopy import get_phone_info

target_number = "98xxxxxxxx"
country_code = "+91"
access_token = "a10--******" ["you get this token while validating OTP"]

response = get_phone_info(target_number, country_code, access_token)

# get_phone_info will return json object 
#{
#   status: bool
#   message: str
#   data: object [if user info found]
# }

Contribution

Contributions to the phoneinfopy package are welcome!... If you faced any issue or you have good idea to improve please open a issue or submit a pull request.

Let's Connect:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phoneinfopy-1.0.0.14.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phoneinfopy-1.0.0.14-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file phoneinfopy-1.0.0.14.tar.gz.

File metadata

  • Download URL: phoneinfopy-1.0.0.14.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for phoneinfopy-1.0.0.14.tar.gz
Algorithm Hash digest
SHA256 c92609bb5a40ac00ff5592c2e71a5b63e23677091f54735afc25e462b1637a03
MD5 4fc85682e41465a93f97a42fe115864d
BLAKE2b-256 604243465d2e6cde437ea8e99575939bdca42a7ff1865d6ba04b1f3476c90b56

See more details on using hashes here.

File details

Details for the file phoneinfopy-1.0.0.14-py3-none-any.whl.

File metadata

  • Download URL: phoneinfopy-1.0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for phoneinfopy-1.0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 e95bfd2ea4a46bc8674a5913affe0a38a1bf11da0ffbfa3e9fa9da70db0fd43e
MD5 3f36e35e2af436550476d7ba540660e2
BLAKE2b-256 b1de35354813d556f4e0874a9b4e165016d2a29a9364153ee30b735dcab2c41c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page