2

I have an application where I use Twilio to send an SMS to a list of phone numbers which is triggered by an event. This works fine.

Now, I need to extend this feature such that, if any one of the recipients do reply to the original message, My application needs to capture the reply message body and forward it to all others in the list.

The problem is as per our business rule, a phone number can be a member of multiple groups and the reply body should only be forwarded to the group where the original message was sent.

So, Is there a way to associate original SMS sent and a reply SMS received by a Twilio number?

If yes, can I use that parameter in the webhook configured in Twilio account?

If No, Is there any other option in Twilio that I can make use of for completing my functionality.

Jose Francis
  • 950
  • 13
  • 28

1 Answers1

1

Twilio developer evangelist here.

If you are just using one number to send all of these messages, then the answer is no. As you'll notice if you go to your SMS application on your phone, there is no way to respond to a particular message. This is a limitation of SMS messages in general.

However, if you were to provide a telephone number per group that the users is signed up to receive messages from, then when your user responds to a message it will go back to the group's number and you can look that up on the incoming request. Then you can fan that out to the rest of the group signed up to that number too.

Let me know if this helps at all.

philnash
  • 70,667
  • 10
  • 60
  • 88
  • Hi @philnash , I am also looking for the incoming message to twilio.I gone through the document which you specified But Twiml is for incoming voice message not for the text message is it right? – prasanthi Aug 29 '18 at 10:24
  • @prasanthi TwiML is for both [voice](https://www.twilio.com/docs/voice/twiml) and [messaging](https://www.twilio.com/docs/sms/twiml). – philnash Aug 30 '18 at 01:15