Skip to content

AuthySE/Lookup-API-Samples

Repository files navigation

#Lookup cURL API Samples

You'll need

  1. Twilio SID
  2. Auth Token

Add them to the .env file and source .env

Lookup Documentation

First Class Twilio Calls

  1. Basic
  2. Carrier

3rd Party AddOns

For any AddOns you want to use, you'll need to browse to https://www.twilio.com/console/lookup/add-ons and:

  1. Create a unique name
  2. enable the AddOn for Lookup.

You'll use the unique name in the cURL call.

AddOn Setup

Example cURLs

Lookup Basic (free)

Essentially a RESTful a wrapper around libphonenumber

lookup_basic.sh

curl -X GET "https://lookups.twilio.com/v1/PhoneNumbers/$1/" \
-u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN"
./lookup_basic.sh 15551234567

Multiple AddOns

Append each unique addon's name as an additional param

lookup_multiple.sh

curl -X GET "https://lookups.twilio.com/v1/PhoneNumbers/$1/?AddOns=whitepages_pro_phone_intel&AddOns=whitepages_pro_caller_id" \
-u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN"
./lookup_multiple.sh 15551234567

About

Lookup cURL examples.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages