Skip to content

A Flask application that processes incoming SMS messages via Twilio webhook and responds with areply message.

Notifications You must be signed in to change notification settings

thiunuwan/flask-twilio-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Twilio Webhook

This project demonstrates the integration of a Flask application with Twilio to handle incoming messages via a webhook.

Description

This Flask application receives incoming SMS messages using a Twilio webhook, processes the message content, and responds with a confirmation message including the received text.

When a message is sent to your Twilio number, Twilio will send a POST request to the /api/message endpoint of this application. The application then extracts the message content, processes it, and sends back a response acknowledging the received message.

Usage

  1. Clone the repository:

    git clone https://github.com/thiunuwan/flask-twilio-webhook.git
    cd flask-twilio-webhook
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Start the Flask application:

    python app.py
  4. Set up a ngrok tunnel (optional for local development):

    ngrok http 5000
  5. Configure your Twilio number's webhook URL to point to your server's URL followed by /api/message.

About

A Flask application that processes incoming SMS messages via Twilio webhook and responds with areply message.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published