TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
SmartCallTaskCreateRequest req = new SmartCallTaskCreateRequest();
req.setRecallType(1L);
req.setTemplateId(1L);
req.setMaxConcurrency(1L);
req.setVoiceId(1L);
req.setRepeatInterval(1L);
req.setRepeatTimes("8:00,9:00");
req.setName("外呼任务测试");
req.setRepeatReason(2,3L);
req.setStartTime("2022-09-16");
req.setGatewayId(1L);
req.setRepeatCount(1L);
req.setCallTime("[[8.5,12],[13.5,19]]");
SmartCallTaskCreateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
SmartCallTaskCreateRequest req = new SmartCallTaskCreateRequest();
req.RecallType = 1L;
req.TemplateId = 1L;
req.MaxConcurrency = 1L;
req.VoiceId = 1L;
req.RepeatInterval = 1L;
req.RepeatTimes = "8:00,9:00";
req.Name = "外呼任务测试";
req.RepeatReason = 2,3L;
req.StartTime = "2022-09-16";
req.GatewayId = 1L;
req.RepeatCount = 1L;
req.CallTime = "[[8.5,12],[13.5,19]]";
SmartCallTaskCreateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new SmartCallTaskCreateRequest;
$req->setRecallType("1");
$req->setTemplateId("1");
$req->setMaxConcurrency("1");
$req->setVoiceId("1");
$req->setRepeatInterval("1");
$req->setRepeatTimes("8:00,9:00");
$req->setName("外呼任务测试");
$req->setRepeatReason("2,3");
$req->setStartTime("2022-09-16");
$req->setGatewayId("1");
$req->setRepeatCount("1");
$req->setCallTime("[[8.5,12],[13.5,19]]");
$resp = $c->execute($req, $sessionKey);
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=taobao.smart.call.task.create' \
-d 'partner_id=apidoc' \
-d 'session=bbecad27-dc59-4cb7-af71-69c8ffd22503' \
-d 'sign=24BC908737ED41ED5D2732DFA9B65E87' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-08-29+17%3A38%3A45' \
-d 'v=2.0' \
-d 'call_time=%5B8.5%2C12%5D%2C%5B13.5%2C19%5D' \
-d 'gateway_id=1' \
-d 'max_concurrency=1' \
-d 'name=%E5%A4%96%E5%91%BC%E4%BB%BB%E5%8A%A1%E6%B5%8B%E8%AF%95' \
-d 'recall_type=1' \
-d 'repeat_count=1' \
-d 'repeat_interval=1' \
-d 'repeat_reason=2%2C3' \
-d 'repeat_times=8%3A00%2C9%3A00' \
-d 'start_time=2022-09-16' \
-d 'template_id=1' \
-d 'voice_id=1'
# -*- coding: utf-8 -*-
import top.api
req=top.api.SmartCallTaskCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.recall_type=1
req.template_id=1
req.max_concurrency=1
req.voice_id=1
req.repeat_interval=1
req.repeat_times="8:00,9:00"
req.name="外呼任务测试"
req.repeat_reason=2,3
req.start_time="2022-09-16"
req.gateway_id=1
req.repeat_count=1
req.call_time="[[8.5,12],[13.5,19]]"
try:
resp= req.getResponse(sessionkey)
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,"taobao.smart.call.task.create");
add_param(pRequest,"recall_type","1");
add_param(pRequest,"template_id","1");
add_param(pRequest,"max_concurrency","1");
add_param(pRequest,"voice_id","1");
add_param(pRequest,"repeat_interval","1");
add_param(pRequest,"repeat_times","8:00,9:00");
add_param(pRequest,"name","外呼任务测试");
add_param(pRequest,"repeat_reason","2,3");
add_param(pRequest,"start_time","2022-09-16");
add_param(pRequest,"gateway_id","1");
add_param(pRequest,"repeat_count","1");
add_param(pRequest,"call_time","[8.5,12],[13.5,19]");
pResponse = top_execute(pClient,pRequest,sessionKey);
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('taobao.smart.call.task.create', {
'recall_type':'1',
'template_id':'1',
'max_concurrency':'1',
'voice_id':'1',
'repeat_interval':'1',
'repeat_times':'8:00,9:00',
'name':'外呼任务测试',
'repeat_reason':'2,3',
'start_time':'2022-09-16',
'gateway_id':'1',
'repeat_count':'1',
'call_time':'[8.5,12],[13.5,19]'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})