aws-sns-sms

A AWS SNS wrapper to send message to a mobile number (useful to send OTP)

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
aws-sns-sms
511.0.27 years ago7 years agoMinified + gzip package size for aws-sns-sms in KB

Readme

aws-sns-sms
An AWS SNS Module to send msessage to a phone number.(Can be used to send OTP)

Installation

npm install aws-sns-sms

Usage

```javascript let sendMsg = require('aws-sns-sms'); let awsConfig = { accessKeyId: '', secretAccessKey: '', region: '' }; let msg = {
"message": "your OTP is 845214",
"sender": "VISHAL",
"phoneNumber": "+91XXXXXXXXXX" // phoneNumber along with country code
}; sendMsg(awsConfig, msg).then(data => {
console.log("Message sent");
}) .catch(err => {
consolr.log(err);
}); ```