Send an SMS with Thinwrap (TypeScript)

Send SMS via the Thinwrap unified Sms facade in TypeScript — same call shape for Twilio, Vonage, Plivo, and every other supported SMS provider.

1. Install

npm install @thinwrap/notifications

2. Send the call

import { Sms } from '@thinwrap/notifications';

const sms = new Sms('twilio', {
  accountSid: process.env.TWILIO_ACCOUNT_SID!,
  authToken: process.env.TWILIO_AUTH_TOKEN!,
  from: '+15555550100',
});

const result = await sms.send({
  to: '+15555550199',
  body: 'Your verification code is 123456',
});

console.log(result.status, result.providerMessageId);

Same code works for all supported providers — just change the provider ID.