Skip to content

This is a simple SMS sending and receiving and otp client. It uses SMS Sarara API to send and receive SMS.

License

Notifications You must be signed in to change notification settings

py-package/smssarara-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMSSarara

This is a simple SMS sending and receiving and otp client. It uses SMS Sarara API to send and receive SMS.

Installation

npm install smssarara

Usage

Initialization

const SMSSarara = require("smssarara");

const sms = SMSSarara({
  apiToken: "xxx-xxxxxxxxxx",
  otpToken: "xxx-xxxxxxxxxx",
});

Sending OTP

const response = await sms.sendOtp("9841xxxxxx");

console.log(response);

// sample response
{
  status: "success",
  message: "OTP sent successfully",
}

// or

{
  status: "error",
  message: "...",
}

Verifying OTP

const response = await sms.verifyOtp("9841xxxxxx", "123456");

console.log(response);

// sample response
{
  status: "success",
  message: "OTP verified successfully",
}

// or

{
  status: "error",
  message: "...",
}

About

This is a simple SMS sending and receiving and otp client. It uses SMS Sarara API to send and receive SMS.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors