Skip to content

Instantly share code, notes, and snippets.

@matbee-eth
Created September 29, 2011 16:15
Show Gist options
  • Save matbee-eth/1251133 to your computer and use it in GitHub Desktop.
Save matbee-eth/1251133 to your computer and use it in GitHub Desktop.
NodeJS tropo-webapi
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