Twilio Lookup is a phonebook REST API that you can use to check whether a number exists, determine whether a phone can receive text messages, and retrieve carrier data associated with a number.

Let’s write some code to validates phone numbers using the Twilio Node module.

Getting started

Before we dive into the code you’ll need to make sure you have: