adonis-twilio-node

1.0.2 • Public • Published

Adonis Twilio 🚀

Twilio provider for AdonisJS.

Installation

Simply run:

adonis install adonis-twilio-node

Add twilio provider to your AdonisJS application located at start/app.js:

const providers = [
    ...
    'adonis-twilio/providers/TwilioProvider'
];

Add to your .env file

TWILIO_SID=
TWILIO_TOKEN=

Usage

Simply call it using:

const Twilio = use('Twilio');

Examples

Sending SMS

const Twilio = use('Twilio');

const sendSms = async () => {
    const message = await Twilio.messages.create({
        body: 'This is the ship that made the Kessel Run in fourteen parsecs?',
        from: '+15017122661',
        to: '+15558675310'
    });

  console.log(message.sid);
};

Official Documentation

This is basically a wrapper over twilio-node.

For more information, kindly check out the Twilio Official Documentation.

Contributing

If you find any issue, bug or missing feature, please kindly create an issue or submit a pull request.

License

Adonis Twilio is open-sourced software licensed under the MIT license.

Package Sidebar

Install

npm i adonis-twilio-node

Weekly Downloads

13

Version

1.0.2

License

MIT

Unpacked Size

3.43 kB

Total Files

5

Last publish

Collaborators

  • tnkemdilim