So here is our desired sequence of events:
- We use Twilio to send text messages to our users with a notification of a specific transaction in our web application, which includes a simple call to action, for example. "Hi Alice. Your transaction regarding your teddy bear is pending. Answer" YES "to approve this transaction."
- The user replies "YES"
- This causes an endpoint to be called on our server, which changes the status of this transaction to “approved” in our database.
The problem is that we cannot determine how to track the WHICH transaction with which a specific SMS is associated.
Our ideas so far:
- provide the user with a code, for example. "Please reply" APPROVE EH384F "to approve this transaction," but this clearly detracts from the user experience, and we would prefer it to be very simple.
- Set twilio cookie. . but they seem to expire after 4 hours, and we do not want the text to work only if the user responds within 4 hours.
Can someone tell us how we could do this?
source
share