Simple Twilio Whatsapp Chatbot webhook built with Laravel.
Easily serve a custom webhook for your twilio Whatsapp chatbot. Intended for people who want to run a custom webhook that follows a USSD like structured process, thus a step by step interaction. i.e:
Step 1 - Select Language:
1. English 2. Chichewa
Step 2 - Select a level:
1. Service 1 2. Service 2 3. Back
......extra level option sets
This project currently provides an example requiring the dev to write static methods for each level.
The idea is to have something that a dev can just plug in the necessary data ,something like a JSON tree of the steps and the hook app auto handles the responses.
Use SSH
git clone [email protected]:Fraganya/twilio-hook.git
Change into project directory and install composer dependencies
composer install
For devs , install npm dependencies
npm install
Copy the .env.example file to .env
This can easily be achieved by running
cp .env.example .env
Set the application key by running
php artisan key:generate
In your Twilio console , configure your whatsapp bot settings and configure them in your .env file.
- TWILIO_AUTH_SID
- TWILIO_AUTH_TOKEN
- TWILIO_WHATSAPP_FROM
To reflect your running environment, You can update the env parameters such as
- Database name
- Database username
- Database password
- Database Port
- Database host