0

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

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, I think that answers my question! Will I need to port forward for just the twilio webhook to work?
For local development? Yes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.