Skip to content

breadhead/red-sms-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

red-sms-client

Extra simple NodeJS client for REDSMS.

Instalation

yarn add @breadhead/red-sms-client

Usage

import RedSmsClient from '@breadhead/red-sms-client';


const smsClient = new RedSmsClient(login, apiKey);

Methods

sendSms

const from = 'My First StartUp';
const to = '+79999999999';
const text = 'Hello, World!';

const result = await smsClient.sendSms(from, to, text);

returns

RedSmsResponse {
  messages: [
    {
      uuid: string,
      to: string,
    },
  ],
}

and throws

RedSmsException {
  prev: Error
  message: string
}