XDH_LESSON11

2016-08-19  本文已影响0人  变得简单
短信认证接口

阿里大于http://www.alidayu.com/。注册账号,送10元入驻费。
#######使用SDK
网页下载
#######调用接口
修改你需要的配置才能接入,改3个地方
APP Key
APP Secret
短信模板ID

使用Nodejs sdk
         TopClient = require('./topClient').TopClient;
         var client = new TopClient({ 
                  'appkey': 'appkey',
                  'appsecret': 'secret',
                  'REST_URL': 'http://gw.api.taobao.com/router/rest' }); 
          client.execute('alibaba.aliqin.fc.sms.num.send', { 
                   'extend':'123456', 
                   'sms_type':'normal', 
                   'sms_free_sign_name':'阿里大于', 
                   'sms_param':'{\"code\":\"1234\",\"product\":\"alidayu\"}', 
                   'rec_num':'13000000000', 
                   'sms_template_code':'SMS_585014'
            }, function(error, response) {
                    if (!error) console.log(response);
                            else console.log(error);
            })

响应为

           { 
                  "alibaba_aliqin_fc_sms_num_send_response":{ 
                            "result":{ 
                                     "err_code":"0",
                                     "model":"134523^4351232",
                                     "success":false,
                                     "msg":"成功"
                         } 
                    } 
              }
上一篇 下一篇

猜你喜欢

热点阅读