Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smsroute (Node)

Official Node.js client for the smsroute.cc SMS API — send SMS to 150+ countries.

npm install smsroute
const { SmsRoute } = require('smsroute');

const sms = new SmsRoute({ apiKey: process.env.SMSROUTE_API_KEY });

const res = await sms.send({
  to: '+447700900000',      // E.164
  from: 'MyBrand',          // alphanumeric sender ID (see country rules below)
  text: 'Your code is 123456',
});
console.log(res);

API

Method Purpose
send({ to, from, text }) send one message
status(id) delivery status for a message
balance() account balance

Errors throw SmsRouteError with .status and .body. Requests time out at 15s (timeoutMs).

Sender IDs differ by country

Alphanumeric sender IDs need pre-registration in many countries (and are banned in some). Open dataset of the rules: sms-sender-id-regulations.

Links

MIT licensed.

About

Official Node.js client for the smsroute.cc SMS API - send SMS to 150+ countries

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages