0
votes

I have a trial Twilio Acct and I have registered my number. I am able to send an SMS to myself using Node/Twilio API (Thanks!). I also have a listener in node for the return incoming webhook 'incomingSMSMessage':

app.on('incomingSMSMessage', function(sms) {

     //_________________________Stuff here

});

So, from my Twilio Registered Number in my Trail Acct how do I get the SMS (actual message) sent from Twilio Number to my Node server? I realize I can use TwiML XML to respond w a hardcoded message, but I would like the actual SMS sent from my Twilio Registered Phone. If I must use the TwiML XML how do I populate dynamically with the SMS sent? I do not care about the message sent to the Twilio Phone- just the reply from the Twilio Phone SMS.

1

1 Answers

0
votes

Twilio evangelist here.

You need to configure the Messaging Request URL of your Twilio number with a URL that points to your node server. To do this log into your Twilio dashboard, click the Numbers menu option, then click the number you want to configure. On the number configuration page, drop in a public URL in the Messaging Request URL field and save:

Message URL

When Twilio receives an SMS message we will make an HTTP request to that URL, passing a bunch of parameters that you can use in your app.

Hope that helps.