@breadhead/red-sms-client

NodeJS provider for Red SMS

Usage no npm install needed!

<script type="module">
  import breadheadRedSmsClient from 'https://cdn.skypack.dev/@breadhead/red-sms-client';
</script>

README

red-sms-client

Sms client for REDSMS.

Instalation

yarn add @breadhead/red-sms-client

Usage

import RedSmsClient from '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
}