TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAliqinFcIotSmsSendRequest req = new AlibabaAliqinFcIotSmsSendRequest();
req.setRecNum("13000000000");
req.setSmsTemplateCode("SMS_585014");
req.setExtend("123456");
req.setSmsParamString("{\"code\":\"1234\",\"product\":\"alidayu\"}");
req.setSmsType("normal");
AlibabaAliqinFcIotSmsSendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAliqinFcIotSmsSendRequest req = new AlibabaAliqinFcIotSmsSendRequest();
req.RecNum = "13000000000";
req.SmsTemplateCode = "SMS_585014";
req.Extend = "123456";
req.SmsParam = "{\"code\":\"1234\",\"product\":\"alidayu\"}";
req.SmsType = "normal";
AlibabaAliqinFcIotSmsSendResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAliqinFcIotSmsSendRequest;
$req->setRecNum("13000000000");
$req->setSmsTemplateCode("SMS_585014");
$req->setExtend("123456");
$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.iot.sms.send' \
-d 'partner_id=apidoc' \
-d 'sign=2B24AFA3CA444BB2153237BD4CE2D20D' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-04+13%3A05%3A20' \
-d 'v=2.0' \
-d 'extend=123456' \
-d 'rec_num=13000000000' \
-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.AlibabaAliqinFcIotSmsSendRequest(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_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.iot.sms.send");
add_param(pRequest,"rec_num","13000000000");
add_param(pRequest,"sms_template_code","SMS_585014");
add_param(pRequest,"extend","123456");
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.iot.sms.send', {
'rec_num':'13000000000',
'sms_template_code':'SMS_585014',
'extend':'123456',
'sms_param':'{\"code\":\"1234\",\"product\":\"alidayu\"}',
'sms_type':'normal'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})