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 helpphoneinfopy -l [--login]for login [Need to mention country code]phoneinfopy -c [--code]for country codephoneinfopy -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:
Metadata
Release files for phoneinfopy 1.0.0.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| phoneinfopy-1.0.0.17.tar.gz | 4.7 kB | Without provenance | Details for phoneinfopy-1.0.0.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phoneinfopy-1.0.0.17-py3-none-any.whl | Python 3 | none | any | Details for phoneinfopy-1.0.0.17-py3-none-any.whl |
Total release size: 9.8 kB
Release files / phoneinfopy-1.0.0.17.tar.gz
| Download URL | phoneinfopy-1.0.0.17.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
23fda96851b93800bc10f1273015f3734074964e62ab149c281cec1263f28890
|
|
BLAKE2b-256 checksum How to use checksums |
fd05e379eecb79a4fb2eb5152a52fe2ebc071d5dbe0bfa1e324340cda22bc122
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / phoneinfopy-1.0.0.17-py3-none-any.whl
| Download URL | phoneinfopy-1.0.0.17-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7aa8e1da2cfad12cd8d777c43b4d7a28679e1fba902c423045632d40e1da3b05
|
|
BLAKE2b-256 checksum How to use checksums |
8749af982403215f3cb1d30a88e3bc6854e8ade0763410a2c57cd6d6abc3b167
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for phoneinfopy 1.0.0.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.