Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

How to Validate Phone numbers in Node/JavaScript with the Twilio Lookup API

Blog post from Twilio

Post Details
Company
Date Published
Author
Sam Agnew
Word Count
698
Company Posts That Month
17
Language
English
Hacker News Points
-
Summary

Twilio Lookup is a phonebook REST API that allows developers to check whether a number exists, determine if it can receive text messages, and retrieve carrier data associated with a number. To validate phone numbers using the Twilio Node module, you need to install the Twilio module, set up your account SID and Auth Token, and create a file named lookup.js with a code sample that performs a basic phone number lookup. The basic functionality is free, but carrier lookups require an extra parameter and cost $0.005 per request. You can use this API to determine if a phone number is valid by trying to do a carrier lookup and checking for errors. Twilio Lookup also supports looking up invalid phone numbers and retrieving information from 3rd party data sources via the Twilio Marketplace.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 1 205 60 26 -27%