Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recieve SMS example? #58

Open
ghost opened this issue Oct 20, 2017 · 2 comments
Open

Recieve SMS example? #58

ghost opened this issue Oct 20, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 20, 2017

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.

@markandrus
Copy link
Owner

@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

@ghost
Copy link
Author

ghost commented Oct 20, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant