Query the Twilio Lookup API to retrieve line type intelligence (mobile, landline, VoIP, etc.) for a given phone number.
-
Bash
-
jqinstalled (for JSON formatting) -
Twilio account with:
-
TWILIO_ACCOUNT_SID -
TWILIO_AUTH_TOKEN
-
Export your Twilio credentials in your shell:
export TWILIO_ACCOUNT_SID=your_account_sid
export TWILIO_AUTH_TOKEN=your_auth_token./linelookup.sh <10 Digit Phone Number>
This will return JSON output from Twilio with line type details.
{ "caller_name": null, "country_code": "US", "phone_number": "+17144780056", "national_format": "(714) 478-0056", "line_type_intelligence": { "type": "mobile", "carrier": "Verizon Wireless" } }Ray Kooyenga