Giter VIP home page Giter VIP logo

ali-sms's Introduction

ali-sms

Build Status

Nodejs SDK for Aliyun SMS service

Install

npm install ali-sms --save

Usage

const sms = require("ali-sms");
const accessKeyID     = process.env.ALI_SMS_ACCESSKEYID;
const accessKeySecret = process.env.ALI_SMS_ACCESSKEYSECRET;

const config = {
  accessKeyID       : accessKeyID,
  accessKeySecret   : accessKeySecret,
  paramString       : {code: '123456'},
  recNum            : ['1891234567'],
  signName          : 'alibaba',
  templateCode      : 'SMS_28100008',
};
sms(config, (err, body) => {
  console.log(err, body);
});

Config

param type description
accessKeyID string access key id, get from aliyun
accessKeySecret string access key secret, get from aliyun
paramString object ali sms param which you have defined on aliyun sms dashboard
recNum array phone numbers of users
signName string ali sms param, get from aliyun sms dashboard
templateCode string ali sms param, get from aliyun sms dashboard

Note

From 2017.06.22, Aliyun has upgraded the sms service. For a new sms user, Aliyun forces you using the new sms service. So, your sms dashboard should be https://dysms.console.aliyun.com/dysms.htm. But for an old sms user, you can still use the old sms service and your sms dashboard should be https://mns.console.aliyun.com/#/home/cn-hangzhou. If you are the old sms user. Please install version 1.0.2

npm install [email protected] --save

ali-sms's People

Contributors

icyblazek avatar tsq avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.