TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkScRelationRecordRequest req = new TbkScRelationRecordRequest();
req.setExternalId("100000");
req.setExternalType(1L);
req.setOpType(1L);
req.setRedirectUrl("http://www.taobao.com");
req.setUcrowdId(1L);
TbkScRelationRecordResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkScRelationRecordRequest req = new TbkScRelationRecordRequest();
req.ExternalId = "100000";
req.ExternalType = 1L;
req.OpType = 1L;
req.RedirectUrl = "http://www.taobao.com";
req.UcrowdId = 1L;
TbkScRelationRecordResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkScRelationRecordRequest;
$req->setExternalId("100000");
$req->setExternalType("1");
$req->setOpType("1");
$req->setRedirectUrl("http://www.taobao.com");
$req->setUcrowdId("1");
$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.tbk.sc.relation.record' \
-d 'partner_id=apidoc' \
-d 'session=50fc8cf5-0a9f-4f6f-a089-6a9f3796597b' \
-d 'sign=D12637D13BDEC9328DB585E9C1BA595C' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+00%3A43%3A30' \
-d 'v=2.0' \
-d 'external_id=100000' \
-d 'external_type=1' \
-d 'op_type=1' \
-d 'redirect_url=http%3A%2F%2Fwww.taobao.com' \
-d 'ucrowd_id=1'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkScRelationRecordRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.external_id="100000"
req.external_type=1
req.op_type=1
req.redirect_url="http://www.taobao.com"
req.ucrowd_id=1
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.tbk.sc.relation.record");
add_param(pRequest,"external_id","100000");
add_param(pRequest,"external_type","1");
add_param(pRequest,"op_type","1");
add_param(pRequest,"redirect_url","http://www.taobao.com");
add_param(pRequest,"ucrowd_id","1");
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.tbk.sc.relation.record', {
'external_id':'100000',
'external_type':'1',
'op_type':'1',
'redirect_url':'http://www.taobao.com',
'ucrowd_id':'1'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})