0.24.2 • Published 17 days ago

@novu/providers v0.24.2

Weekly downloads
-
License
MIT
Repository
github
Last release
17 days ago

Novu Providers

Version Downloads

A collection of stateless notification delivery providers, abstracting the underlying delivery provider implementation details. Independently usable, and additionally consumed by the Novu Platform.

Installation

npm install @novu/providers

Usage

The @novu/providers package contains a set of providers that can be used to send notifications to various channels.

The following example shows how to use the TwilioSmsProvider to send a message to a phone number.

import { TwilioSmsProvider } from '@novu/providers';

const provider = new TwilioSmsProvider({
  accountSid: process.env.TWILIO_ACCOUNT_SID,
  authToken: process.env.TWILIO_AUTH_TOKEN,
  from: process.env.TWILIO_FROM_NUMBER, // a valid twilio phone number
});

await provider.sendMessage({
  to: '0123456789',
  content: 'Message to send',
});

For all supported providers, visit the Novu Providers package.