Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 1.1 KB

README.md

File metadata and controls

39 lines (24 loc) · 1.1 KB

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.