How do I receive sms with twilio?

1k views Asked by At

I just got started with twilio.

I would like to receive an sms message on my node.js server and process it. I assume the message can be processed in a callback. How in the hell is this done? I have searched endlessly for an example but there doesn't seem to be very clear documentation on this. If you can tell me how this is done I would very much like to know.

I am specifically looking for a nodejs implementation of this simple process.

Thanks!

1

There are 1 answers

2
philnash On

Twilio developer evangelist here.

Your best bet is probably to read this introductory blog post to Twilio and Node.js. It starts with using the REST API to make phone calls and send messages, but later moves on to receiving calls and messages.

Essentially, you need to set up an application with a URL that you can give to Twilio to send HTTP requests (webhooks) to when Twilio receives a call/message on a number that you have bought from Twilio. Your application can then respond with some XML (called TwiML) that instructs Twilio what to do with the call/message.