adonis-twilio
Twilio Provider for AdonisJs framework.
Installation
In order to use adonis-twilio
npm install adonis-twilio --save
Setup
Once you have installed the provider from the npm, make sure to follow the below steps to setup the provider.
bootstrap/app.js
const providers = ... 'adonis-twilio/providers/TwilioProvider'
Also, for registering commands.
bootstrap/app.js
const aceProviders = ... 'adonis-twilio/providers/CommandsProvider' const commands = ... 'Adonis/Commands/Twilio:Config'
Also, it is a good practice to setup an alias to avoid typing the complete namespace.
bootstrap/app.js
const aliases = ... Twilio: 'Adonis/Addons/Twilio'
Then, for generating a config file.
./ace twilio:config
Configuration
Adonis Twilio configuration file located at config/twilio.js
and set your environment variables in .env
with following.
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_FROM=+15005550006
Usage
Load the module first
const Twilio =
Send SMS
Twilio
Send MMS
Twilio
Make a Call
Twilio
Changelog
Credits
Thanks to the community of AdonisJs.
Copyright and License
Copyright (c) 2016 Ahsaan Muhammad Yousuf, MIT License