node-ytx
v0.3.0
Published
云通讯node实现
Downloads
17
Readme
云通讯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