Python Twilio without using flask or django?

Question:

As far as I know, this question hasn’t really been asked.

I want to use Twilio to send and receive messages from a Python app. Sending isn’t a problem, but I know receiving uses webhooks. Every tutorial and even the Twilio documentation uses Flask. I’m wondering if I can create a program to receive information from Twilio without using Flask or is Flask/Django required.

Thanks

Asked By: Paul

||

Answers:

You need something that can accept HTTP requests

Webhooks are user-defined HTTP callbacks. They are usually triggered by some event, such as receiving an SMS message or an incoming phone call. When that event occurs, Twilio makes an HTTP request (usually a POST or a GET) to the URL configured for the webhook.

To handle a webhook, you only need to build a small web application that can accept the HTTP requests.

It needs to be something that Twilio can access through HTTP. So while you can probably use any web framework you want, you are going to need one.

https://www.twilio.com/docs/sms/tutorials/how-to-receive-and-reply-python

Answered By: Matthew Gaiser
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.