Last active
January 23, 2017 20:54
-
-
Save tfogo/97873b3b5b08c50ece0c605095ff5dbb to your computer and use it in GitHub Desktop.
Make a call to the available phone numbers Twilio API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var twilio = require('twilio'); | |
| const accountSid = process.env.TWILIO_AC_SID; | |
| const authToken = process.env.TWILIO_AUTH_TOKEN; | |
| var client = require('twilio')(accountSid, authToken); | |
| // Make a call to the available phone numbers API for the US | |
| var twilioPromise = client.availablePhoneNumbers('US').local.list({ | |
| areaCode: '650' | |
| }); | |
| twilioPromise.then(data => { | |
| console.log(data); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment