var http = require('http');
var querystring = require('querystring');
var postData = {
uid:'<enter your UID>',
pas:'<enter your UID Pass>',
mob:'<enter your mobiles>',
cid:'<enter your cid>',
type:'json'
};
var content = querystring.stringify(postData);
var options = {
host:'api.weimi.cc',
path:'/2/gjsms/send.html',
method:'POST',
agent:false,
rejectUnauthorized : false,
headers:{
'Content-Type' : 'application/x-www-form-urlencoded',
'Content-Length' :content.length
}
};
var req = http.request(options,function(res){
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(JSON.parse(chunk));
});
res.on('end',function(){
console.log('over');
});
});
req.write(content);
req.end();
/*
注意:以上参数传入时不包括“<>”符号
*/
{ "code":0, "msg":"发送成功" }
√ 开发文档
√ 短信接口
√ 彩信接口
√ 账户余额查询接口
√ PHP示例
√ Java示例
√ Python示例
√ C#示例