I am using ruby 2.0.0 and Rails 4.0.
I am sending a text message out via my rails app to my end user.
When they respond, I want to redirect them to an api call:
www.myapp.com/api/verify_text_response
Within that API call, I want to see what the text message sent from the end user to my url is. Ideally, I would receive a param of "text_response
" that I could then do what I wanted to with.
How can I redirect a reply from my end_user to the above url, and capture the phone number it came from as well as the message sent to me in my params? If this isn't possible, how can I use TwiML to do something similar?
End Goal
For what it's worth, this is what I'm trying to accomplish:
- I send a text message out - "
Would you like to subscribe?
" - The end user responds "
Yes
" or "No
". - I change the
subscribed
attribute on mysubscription
model to true or false. - I send another text message saying either "
You are subscribed.
" or "You are not subscribed.
".
Item's #3 and #4 are based on the user responding "Yes" or "No" in item #2.