Paul
Paul

Reputation: 23

Python Twilio without using flask or django?

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

Upvotes: 0

Views: 231

Answers (1)

Matthew Gaiser
Matthew Gaiser

Reputation: 4763

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

Upvotes: 2

Related Questions