Created
November 10, 2012 20:20
-
-
Save paul-english/4052368 to your computer and use it in GitHub Desktop.
This file contains 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
function smsInboundCallback (req, res) { | |
console.log('smsInboundCallback', req.body); | |
// { AccountSid: 'AC64065c2140fe4bf6849b13316fe1847a', | |
// ApiVersion: 'v1', | |
// Body: 'Oh hai', | |
// From: '+18012101024', | |
// SmsSid: 'SMa4bfb6db0a10413bad796d33ca0dcadf', | |
// SmsStatus: 'sent', | |
// To: '+12676708074' } | |
var response = new InboundXML.Response(); | |
response.append( | |
new InboundXML.Sms("SMS message from our production app", { | |
action: 'http://sprouthelp.com/api/sms/test-action', | |
method: 'POST', | |
from: '(267) 670-8074', | |
to: '(805) 440-0925', | |
statusCallback: 'http://sprouthelp.com/api/sms/test-statusCallback' | |
}) | |
); | |
console.log(response.toString()); | |
res.send(response.toString()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment