aws-sns-sms

1.0.2 • Public • Published

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

  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);
  });

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1,948
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1,948
  • 1.0.1
    2
  • 1.0.0
    2

Package Sidebar

Install

npm i aws-sns-sms

Weekly Downloads

204

Version

1.0.2

License

ISC

Last publish

Collaborators

  • vishal7201