Twilio + Better-Notify
Send typed SMS notifications through Twilio. Better-Notify validates input, runs middleware, and hands off a clean message — Twilio delivers it.
Install
npm install @betternotify/twilioQuick start
import { createClient } from '@betternotify/core';
import { twilioSmsTransport } from '@betternotify/twilio';
const mail = createClient({
catalog,
transportsByChannel: {
sms: twilioSmsTransport({
accountSid: process.env.TWILIO_SID,
authToken: process.env.TWILIO_TOKEN,
fromNumber: '+15551234567',
}),
},
});
await mail.verification.send({ to: '+15559876543', input: { code: '123456' } });Features
- Twilio Messaging API
- Messaging Service SID support
- Comprehensive error code mapping
- Rate limit detection
- Flexible sender configuration