Modules@robinpath/sms

@robinpath/sms

0.1.0Public

SMS sending via Twilio and Vonage with validation, formatting, lookup, and cost estimation

@robinpath/sms

SMS sending via Twilio and Vonage with validation, formatting, lookup, and cost estimation

Category Functions Auth License

Why use this module?

The sms module lets you:

  • Send an SMS message
  • Send SMS to multiple recipients
  • Validate E.164 phone format
  • Format phone to E.164
  • Lookup phone info via Twilio

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/sms

Quick Start

1. Set up credentials

sms.configure "main" {"provider": "twilio", "accountSid": "AC...", "authToken": "..."}

2. Send an SMS message

sms.send "main" "+15559876543" "Your code is 1234"

Available Functions

FunctionDescription
sms.configureConfigure SMS provider (Twilio or Vonage)
sms.sendSend an SMS message
sms.sendBulkSend SMS to multiple recipients
sms.validateValidate E.164 phone format
sms.formatFormat phone to E.164
sms.lookupLookup phone info via Twilio
sms.statusCheck message delivery status
sms.estimateCostEstimate SMS cost
sms.isGsmCheck if message uses GSM-7 encoding
sms.segmentCountCount SMS segments

Examples

Send an SMS message

sms.send "main" "+15559876543" "Your code is 1234"

Send SMS to multiple recipients

sms.sendBulk "main" ["+155511111", "+155522222"] "Hello!"

Validate E.164 phone format

sms.validate "+15551234567"

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/sms";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  sms.configure "main" {"provider": "twilio", "accountSid": "AC...", "authToken": "..."}
  sms.send "main" "+15559876543" "Your code is 1234"
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/sms
Version0.1.0
LicenseMIT
Unpacked Size5.9 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday