This example shows how Plivo APIs can be used to integrate estimated time arrival notification system into your own web application. This example is built in Python using Flask application framework.
The next section explains how the application works and in-turn how Plivo as a platform works.
- Python version >= 3.7.x.
- A Plivo account - sign up
This application verifies your phone number using the two factor authentication system.
-
Clone this repo.
git clone https://github.com/plivo/ETA-notifications-flask.git
-
Change your working directory to 2FA_FlaskApp
cd ETA-notification-flask
-
Install the dependencies using the requirements.txt file. You can use the below command.
pip install -r requirements.txt
-
Change the placeholders in the
.env
file. You should replace the PLIVO_AUTH_ID, PLIVO_AUTH_TOKEN, PLIVO_NUMBER & PHLO_ID placeholders. -
You can get your auth_id & auth_token from your Plivo Console. Please sign up for a Plivo account if you do not have one already.
Note: Enter your phone number in E.164 format.
-
Use the below command to initiate & setup your db locally.
flask db init flask db migrate flask db upgrade
-
Use the below command to start the redis.
flask run
- To add it to your order list, enter your name and phone number and click
submit
. - Choose View Orders to see your recently added order and change the status to
pickup
ordeliver
. - Your order status will be sent to you via SMS.
Helper libraries for various languages are available on the Plivo github page.