Extra simple NodeJS client for REDSMS.
yarn add @breadhead/red-sms-client
import RedSmsClient from '@breadhead/red-sms-client';
const smsClient = new RedSmsClient(login, apiKey);
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
}