How to use twilio webhook to reply to an sms in production

I am new to Twilio services and just started using their api for sms with django. the sms outbound work well and now i want to make sure to grab the value replied by the person who has received the message.

Locally, I have used Ngrok as a webhook, I provided the Ngrok URL generated while running my python application locally + backend api endpoint URL in the Twilio SMS settings required for the webhook and it work.

Please note that i made sure that the URL the SMS response is supposed to hit is publicly available.

Now my question is how do I make this work in a production environment where i cannot run Ngrok from my computer?

I removed the Ngrok URL provided since its not running locally and left the URL of the endpoint but i am not receiving anything back as a response.

Twilio developer evangelist here.

You can use PythonAnywhere! Directions are outlined in this blog post by my coworker Miguel Grinberg. It’s easier to use than Heroku (which you could also use), and 100% focused on Python.

Let me know if this helps at all!

Back to Top