medusa-plugin-twilio-sms

1.2.8 • Public • Published

Twilio SMS

Utilize Twilio's SMS APIs to send customers SMS notifications.

Twilio SMS Plugin Documentation | Medusa Website | Medusa Repository

Features

  • Access Twilio's SMS APIs easily using the TwilioSmsService.

Prerequisites


How to Install

1. Run the following command in the directory of the Medusa backend:

npm install medusa-plugin-twilio-sms

2. Set the following environment variable in .env:

TWILIO_SMS_ACCOUNT_SID=<YOUR_ACCOUNT_SID>
TWILIO_SMS_AUTH_TOKEN=<YOUR_AUTH_TOKEN>
TWILIO_SMS_FROM_NUMBER=<YOUR_TWILIO_NUMBER>

3. In medusa-config.js add the following at the end of the plugins array:

const plugins = [
  // ...
  {
    resolve: `medusa-plugin-twilio-sms`,
    options: {
      account_sid: process.env.TWILIO_SMS_ACCOUNT_SID,
      auth_token: process.env.TWILIO_SMS_AUTH_TOKEN,
      from_number: process.env.TWILIO_SMS_FROM_NUMBER,
    },
  },
]

Test the Plugin

In your code, use the TwilioSmsService where necessary to send your customers notifications.


Additional Resources

Dependencies (5)

Dev Dependencies (12)

Package Sidebar

Install

npm i medusa-plugin-twilio-sms

Weekly Downloads

303

Version

1.2.8

License

AGPL-3.0-or-later

Unpacked Size

34.4 kB

Total Files

5

Last publish

Collaborators

  • sebrindom
  • oliverjuhl