Created
December 8, 2014 22:29
-
-
Save lrvick/ba303eae8ad89b7f0f4d to your computer and use it in GitHub Desktop.
Twilio Node.JS SMS sending example.
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 twilioNumber = '+19252414543'; | |
var twilioSID = 'Your twilio account SID'; | |
var twilioToken = 'Your twilio auth tokenn' | |
var client = require('twilio')(twilioSID,twilioToken); | |
var sendSMS = function(number,message){ | |
client.sms.messages.post({ | |
to:twilioNumber, | |
from:fromNumber, | |
body:message | |
}, function(err, text) { | |
console.log('Sent: '+ text.body); | |
console.log('Status: '+ text.status); | |
}); | |
}; | |
sendSMS('+14072837596','Sample message from node.js'): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
not working, have you tested?