In this guide we'll highlight a few of the key features of Add-ons and set you up to use them today. Let's dive in.
Add-ons are enabled through the Twilio Console, and once installed, they enhance specific Twilio APIs, such as Twilio Voice and Twilio SMS. Two popular features from Add-ons are extracting information about a phone number's current owner, and ensuring a number is compliant with Telephone Consumer Protection Act (TCPA) regulations.
Let's first take a look at how to get the information about a phone number's current owner by enabling an Add-on for SMS called Ekata Reverse Phone. Inside the new Add-on catalog you can see all of the available API Add-ons. Select Ekata Reverse Phone from the catalog, on the first row.
Clicking on the Add-on gives you additional information, including a description and access to the product’s documentation. The two things you need to know about on this screen are:
- What APIs this will be enabled on — listed under Supported Products
- Whether or not the Add-on is Installed
Go ahead and click Install. You can view all installed Add-ons by clicking on Add-ons > Installed.
Since we’re interested in Lookups on a phone number in this scenario, check the Lookups box under the Configure tab.
Looking at the JSON response, we can see that the Lookup returned basic information about the phone number that we queried. Depending on the type of phone number found, different subsets of information may be returned, though these results are wrapped into a dictionary for you to access. More information on all the potential return values and dictionary keys can be found within the Add-ons marketplace.
Another Add-on, Prove, protects your business from hefty fines levied under TCPA regulations for texting the wrong number. The Prove TCPA Compliance Add-on can quickly tell you if the number you are about to send an SMS to is active and still owned by your customer, with 100% reliability.
To use this Add-on we'll need to install it just like we did with Ekata Reverse Phone. Go to your Add-on catalog, locate and click on Prove TCPA Compliance, and click Install.
Since we want to leverage the Twilio Lookups API to find the TCPA Compliance information for a phone number, check the Lookups box under the Configure tab of the Prove TCPA Compliance Add-on. Afterwards, we are ready to query the TCPA Compliance information on our target phone number. Here is the code:
The results from the TCPA Compliance Lookup are wrapped into a dictionary, which contains the key
Y for a compliant number,
N for a non-compliant number, and
I for an indeterminate number. The dictionary also has some keys related to the identification of the device claiming ownership of the number. If you’re looking for demographic and carrier information, you can access it with the Ekata Reverse Phone Add-on.
To learn more about using Add-ons check-out the Add-ons Reference.