Skip to content
云通讯node版sms实现
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.editorconfig
.gitattributes
.gitignore
.jshintrc
.npmignore
.travis.yml
.yo-rc.json
Gruntfile.js
README.md
index.js
package.json

README.md

NPM version Build Status Dependency Status

云通讯node实现

Install

$ npm install --save node-ytx

Usage

var ytx = require('node-ytx');
var config = {
url: 'sandboxapp.cloopen.com',
     port: 8883,
     version: '2013-12-26',
     appId: 'yourAppId',
     accountSid: 'yourAccountSid',
     accountToken: 'YourAccountToken'
};
ytx.init(config);

//Specify a phone number which your can test
var phone = '13800000000';

ytx.smsTemplate(phone, [' 云通讯测试', "" + Math.round(Math.random() * 1000000) ], 1, function (error, data) {
  var json;
  try {
    json = JSON.parse(String(data));
  } catch(e) {
    console.log(e);
  }
});

License

MIT © calidion

You can’t perform that action at this time.