Recieve SMS example?
Opened this issue · 2 comments
I don't have much experience at all with web stuff, especially done in Haskell. Would be nice to have a simple example of a round trip SMS exchange.
@cpdurham can you explain at a high-level the scenario you'd like to see? Then we can see about writing an example for it.
Thanks,
Mark
Yeah, I'm completely new to Twilio, didn't read any docs and got sending working immediately with very little knowledge thanks to your library. Took me a while going through the docs and then finally a tutorial by Twilio on how to receive message to realize that you had to run a web server to receive SMS.
I got a simple snap server running with POST and ngrok (from the tutorial) and got a server up. At a high level, might be cool to see a simple http server where you send a message to twilio and just get a reply back. Maybe just
httpServe defaultConfig (getPostParam "Body" >> liftIO . runTwilio sid sat . post . PostMessage to from)
Do you know off the top of your head if Twilio protects against loops? That example could be dangerous otherwise...
tutorial