TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAliqinFcSmsNumSendRequest req = new AlibabaAliqinFcSmsNumSendRequest();
req.setRecNum("13000000000");
req.setSmsTemplateCode("SMS_585014");
req.setExtend("123456");
req.setSmsFreeSignName("阿里大于");
req.setSmsParamString("{\"code\":\"1234\",\"product\":\"alidayu\"}");
req.setSmsType("normal");
AlibabaAliqinFcSmsNumSendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAliqinFcSmsNumSendRequest req = new AlibabaAliqinFcSmsNumSendRequest();
req.RecNum = "13000000000";
req.SmsTemplateCode = "SMS_585014";
req.Extend = "123456";
req.SmsFreeSignName = "阿里大于";
req.SmsParam = "{\"code\":\"1234\",\"product\":\"alidayu\"}";
req.SmsType = "normal";
AlibabaAliqinFcSmsNumSendResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAliqinFcSmsNumSendRequest;
$req->setRecNum("13000000000");
$req->setSmsTemplateCode("SMS_585014");
$req->setExtend("123456");
$req->setSmsFreeSignName("阿里大于");
$req->setSmsParam("{\"code\":\"1234\",\"product\":\"alidayu\"}");
$req->setSmsType("normal");
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=alibaba.aliqin.fc.sms.num.send' \
-d 'partner_id=apidoc' \
-d 'sign=32AAC29AD0470DD770E3B4213D703FEE' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-01+08%3A00%3A03' \
-d 'v=2.0' \
-d 'extend=123456' \
-d 'rec_num=13000000000' \
-d 'sms_free_sign_name=%E9%98%BF%E9%87%8C%E5%A4%A7%E4%BA%8E' \
-d 'sms_param=%7B%5C%22code%5C%22%3A%5C%221234%5C%22%2C%5C%22product%5C%22%3A%5C%22alidayu%5C%22%7D' \
-d 'sms_template_code=SMS_585014' \
-d 'sms_type=normal'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAliqinFcSmsNumSendRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.rec_num="13000000000"
req.sms_template_code="SMS_585014"
req.extend="123456"
req.sms_free_sign_name="阿里大于"
req.sms_param="{\"code\":\"1234\",\"product\":\"alidayu\"}"
req.sms_type="normal"
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"alibaba.aliqin.fc.sms.num.send");
add_param(pRequest,"rec_num","13000000000");
add_param(pRequest,"sms_template_code","SMS_585014");
add_param(pRequest,"extend","123456");
add_param(pRequest,"sms_free_sign_name","阿里大于");
add_param(pRequest,"sms_param","{\"code\":\"1234\",\"product\":\"alidayu\"}");
add_param(pRequest,"sms_type","normal");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
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', {
'rec_num':'13000000000',
'sms_template_code':'SMS_585014',
'extend':'123456',
'sms_free_sign_name':'阿里大于',
'sms_param':'{\"code\":\"1234\",\"product\":\"alidayu\"}',
'sms_type':'normal'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})