TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaGuardAccessAuthRequest req = new AlibabaGuardAccessAuthRequest();
AlibabaGuardAccessAuthRequest.IdentifyAuthDTO obj1 = new AlibabaGuardAccessAuthRequest.IdentifyAuthDTO();
obj1.setAuthTypeEnum("CONTROLLER_SINGLE_VOUCHER");
obj1.setPropertiesJson("{}");
List<AlibabaGuardAccessAuthRequest.VoucherDTO> list3 = new ArrayList<AlibabaGuardAccessAuthRequest.VoucherDTO>();
AlibabaGuardAccessAuthRequest.VoucherDTO obj4 = new AlibabaGuardAccessAuthRequest.VoucherDTO();
list3.add(obj4);
obj4.setVoucherNo("0092027340");
obj4.setVoucherTypeEnum("类型枚举");
obj1.setVoucherList(list3);
obj1.setAppCode("08988");
obj1.setDeviceId("xxxx");
obj1.setTimeStamp(12221L);
obj1.setSign("xx");
req.setIdentifyAuthDto(obj1);
AlibabaGuardAccessAuthResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaGuardAccessAuthRequest req = new AlibabaGuardAccessAuthRequest();
AlibabaGuardAccessAuthRequest.IdentifyAuthDTODomain obj1 = new AlibabaGuardAccessAuthRequest.IdentifyAuthDTODomain();
obj1.AuthTypeEnum = "CONTROLLER_SINGLE_VOUCHER";
obj1.PropertiesJson = "{}";
List<AlibabaGuardAccessAuthRequest.VoucherDTODomain> list3 = new List<AlibabaGuardAccessAuthRequest.VoucherDTODomain>();
AlibabaGuardAccessAuthRequest.VoucherDTODomain obj4 = new AlibabaGuardAccessAuthRequest.VoucherDTODomain();
list3.Add(obj4);
obj4.VoucherNo = "0092027340";
obj4.VoucherTypeEnum = "类型枚举";
obj1.VoucherList= list3;
obj1.AppCode = "08988";
obj1.DeviceId = "xxxx";
obj1.TimeStamp = 12221L;
obj1.Sign = "xx";
req.IdentifyAuthDto_ = obj1;
AlibabaGuardAccessAuthResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaGuardAccessAuthRequest;
$identify_auth_dto = new IdentifyAuthDTO;
$identify_auth_dto->auth_type_enum="CONTROLLER_SINGLE_VOUCHER";
$identify_auth_dto->properties_json="{}";
$voucher_list = new VoucherDTO;
$voucher_list->voucher_no="0092027340";
$voucher_list->voucher_type_enum="类型枚举";
$identify_auth_dto->voucher_list = $voucher_list;
$identify_auth_dto->app_code="08988";
$identify_auth_dto->device_id="xxxx";
$identify_auth_dto->time_stamp="12221";
$identify_auth_dto->sign="xx";
$req->setIdentifyAuthDto(json_encode($identify_auth_dto));
$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.guard.access.auth' \
-d 'partner_id=apidoc' \
-d 'sign=857BFAD10A4613D3B4330235088EECB1' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-25+20%3A32%3A37' \
-d 'v=2.0' \
-d 'identify_auth_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaGuardAccessAuthRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.identify_auth_dto="数据结构示例JSON格式"
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.guard.access.auth");
add_param(pRequest,"identify_auth_dto","数据结构JSON示例");
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.guard.access.auth', {
'identify_auth_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})