Created
September 29, 2011 16:15
-
-
Save matbee-eth/1251133 to your computer and use it in GitHub Desktop.
NodeJS tropo-webapi
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
app.post('/inboundTropo', function (req, res) { | |
res.contentType('application/json'); | |
console.log('INBOUND TROPO MESSAGE: '); | |
console.log(req.body); | |
var tropo = new TropoWebAPI(); | |
tropo.message(req.body.session.parameters.msg, { to:req.body.session.parameters.to, network:"SMS" }); | |
res.send(TropoJSON(tropo)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment