A (Js) serverless implementation of the back-end is also available.
install deps: pip install -r requirements.txt
.
Add your own account_sid
, auth_token
, from
(given by twilio when creating a phone number for your servie), to
numbers to your environment after your registered for a Twilio account.
It can be found in your console.
your to
phone number (used to create a twilio account) must be verified.
Create your own virtual environment: virtualenv .venv
.
Activate your environment: source .venv/bin/activate
.
Add your environment variables to a .env
file.
Source environment variables for your project before running it: source .env
or use autoenv
.
Run webserver with Twilio SMS Webhook.
If you don't want to host your webserver you can use ngrok locally to add your webhook endpoint to the Messaging service /sms
route on the webserver PORT:5000
.
Use the Makefile
to serve
and run your project.
./serverless
directory holds a script using webtask.io using Twilio API.
Alternatively, you can use stdlib.
After cd
the directory, you can install the deps npm i
, and run the npm deploy
task to update your script on webtask.io.
You will need to provide a .secrets
file with your API variables: TWILIO_ACCOUNT_SID
, TWILIO_AUTH_TOKEN
, TWILIO_NUMBER_FROM
, TWILIO_NUMBER_TO
or source them in your environment.
- Leak detector - @slyg & @fif0o