Code Monkey home page Code Monkey logo

node-alidayu-sms's Introduction

node-alidayu-sms

npm version

Node.js下阿里大于(原阿里大鱼)短信客户端

安装

npm install node-alidayu-sms --save

使用方法

发送短信 send(options)

返回Promise格式结果

import sms from 'node-alidayu-sms';

sms.send({
  appkey: 'appkey',
  appsecret: 'appsecret',
  params: {
    extend: '123456',
    sms_type: 'normal',
    sms_free_sign_name: '大鱼测试',
    rec_num: '18900000000',
    sms_template_code: 'SMS_8985285',
    sms_param: {
      customer: 'Ray'
    }
  }
})
.then((result) => {
  console.log(result);
})
.catch((err) => {
  console.error(err);
});

参数

  • appkey 阿里大于TOP分配给应用的AppKey
  • appsecret 阿里大于TOP分配给应用的AppSecret
  • https 是否使用https调用接口 (默认: true)
  • params 短信发送请求参数(请参考官方说明文档)

返回结果

返回json格式的结果 (具体返回内容请参考官方说明文档)

License

MIT

node-alidayu-sms's People

Contributors

ihahoo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

node-alidayu-sms's Issues

webpack下报错,无法使用...

SMSPoc/node_modules/tough-cookie/package.json Unexpected token (2:9)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (2:9)

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.