@beige/mengwang-sdk

梦网 短信 接口

Usage no npm install needed!

<script type="module">
  import beigeMengwangSdk from 'https://cdn.skypack.dev/@beige/mengwang-sdk';
</script>

README

The MengWang Server SDK

MengWang is committed to providing cloud-based instant messaging services for Internet and Mobile Internet developers. It enables developers to quickly integrate instant messaging capabilities with applications without any hardware installation requirements.

The server SDK is a wrapper of all the https API calls, which could be found here

Install

$ npm install @beige/mengwang-sdk

Init

const mengwangSdk = require('@beige/mengwang-sdk')({
  userid: '******',
  pwd: '******'
});

Usage

var Sms = mengwangSdk.Sms;

var smsData = {
    mobile: '15311489017',
  content: '同事您好,感谢您对此次测试的配合。123456',
  svrtype: '',
  exno: '',
  custid: '',
  exdata: ''
};
Sms.singleSend(smsData).then(result => {
    console.log(result);
}, error => { 
    console.log(error);
});

License

MIT