Question

Hi I have an automated system setup for twillio. When ever anyone texts our number we automatically respond with a thank you text. However we would like that text to be the only text that goes out. Currently if someone texts the number again responding to our thank you text, they get the same text response back. Since it's setup to trigger with any incoming sms text message. Does anyone know how to set this to just STOP after the first sms response on our part?

Était-ce utile?

La solution

Its not really a twilio issue, but for every text you receive, you need to store the number in a database of some sort, and do a lookup against that table to check if a reply should be sent.

You won't be able to do this with just twiml, you'll need to add a bit of custom code in the language of your choice.

Autres conseils

You can get the number as

from_number = request.POST.get('From', '')

and save it every number to which you send message in database. Filter the table with number before an sms is being sent from your end.

if not from_number_exists in table:
    send sms
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top