TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaSecurityJaqAfsCheckRequest req = new AlibabaSecurityJaqAfsCheckRequest();
req.setPlatform(3L);
req.setToken("EF6YJAURO2-RXUC3I4COXWWNV6MXGFN1-LKCS1GRI-0");
req.setSessionId("Kjm0SbY8Vis_X2jImyo-LRn4BovHtl3xEsCqD7Ph-4737BFrTmwz5prSIfd1d3PU");
req.setSig("04BFGg1F3ah4yhOF5uMXAap62ip2PoCwuzT-XjcyPAAh1rlK19YbcypOMklGE5VhTWLUWS8_On7CqRh88A0tan0JlT4V-l1kh6CbHgbRhjzZ-Do1Sp2q8_-4obt6iwXbwDymNa9YYkU5FcU74xCmPX_SkW5TcKoR5KnD5sLE-Ba5BWQqyqH08GHE22AMWRwP6a");
req.setAfsKey("FFF10000000007271111");
AlibabaSecurityJaqAfsCheckResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaSecurityJaqAfsCheckRequest req = new AlibabaSecurityJaqAfsCheckRequest();
req.Platform = 3L;
req.Token = "EF6YJAURO2-RXUC3I4COXWWNV6MXGFN1-LKCS1GRI-0";
req.SessionId = "Kjm0SbY8Vis_X2jImyo-LRn4BovHtl3xEsCqD7Ph-4737BFrTmwz5prSIfd1d3PU";
req.Sig = "04BFGg1F3ah4yhOF5uMXAap62ip2PoCwuzT-XjcyPAAh1rlK19YbcypOMklGE5VhTWLUWS8_On7CqRh88A0tan0JlT4V-l1kh6CbHgbRhjzZ-Do1Sp2q8_-4obt6iwXbwDymNa9YYkU5FcU74xCmPX_SkW5TcKoR5KnD5sLE-Ba5BWQqyqH08GHE22AMWRwP6a";
req.AfsKey = "FFF10000000007271111";
AlibabaSecurityJaqAfsCheckResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaSecurityJaqAfsCheckRequest;
$req->setPlatform("3");
$req->setToken("EF6YJAURO2-RXUC3I4COXWWNV6MXGFN1-LKCS1GRI-0");
$req->setSessionId("Kjm0SbY8Vis_X2jImyo-LRn4BovHtl3xEsCqD7Ph-4737BFrTmwz5prSIfd1d3PU");
$req->setSig("04BFGg1F3ah4yhOF5uMXAap62ip2PoCwuzT-XjcyPAAh1rlK19YbcypOMklGE5VhTWLUWS8_On7CqRh88A0tan0JlT4V-l1kh6CbHgbRhjzZ-Do1Sp2q8_-4obt6iwXbwDymNa9YYkU5FcU74xCmPX_SkW5TcKoR5KnD5sLE-Ba5BWQqyqH08GHE22AMWRwP6a");
$req->setAfsKey("FFF10000000007271111");
$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.security.jaq.afs.check' \
-d 'partner_id=apidoc' \
-d 'sign=0ADB0187FF22C2333BD45694891E5875' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+14%3A56%3A01' \
-d 'v=2.0' \
-d 'afs_key=FFF10000000007271111' \
-d 'platform=3' \
-d 'session_id=Kjm0SbY8Vis_X2jImyo-LRn4BovHtl3xEsCqD7Ph-4737BFrTmwz5prSIfd1d3PU' \
-d 'sig=04BFGg1F3ah4yhOF5uMXAap62ip2PoCwuzT-XjcyPAAh1rlK19YbcypOMklGE5VhTWLUWS8_On7CqRh88A0tan0JlT4V-l1kh6CbHgbRhjzZ-Do1Sp2q8_-4obt6iwXbwDymNa9YYkU5FcU74xCmPX_SkW5TcKoR5KnD5sLE-Ba5BWQqyqH08GHE22AMWRwP6a' \
-d 'token=EF6YJAURO2-RXUC3I4COXWWNV6MXGFN1-LKCS1GRI-0'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaSecurityJaqAfsCheckRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.platform=3
req.token="EF6YJAURO2-RXUC3I4COXWWNV6MXGFN1-LKCS1GRI-0"
req.session_id="Kjm0SbY8Vis_X2jImyo-LRn4BovHtl3xEsCqD7Ph-4737BFrTmwz5prSIfd1d3PU"
req.sig="04BFGg1F3ah4yhOF5uMXAap62ip2PoCwuzT-XjcyPAAh1rlK19YbcypOMklGE5VhTWLUWS8_On7CqRh88A0tan0JlT4V-l1kh6CbHgbRhjzZ-Do1Sp2q8_-4obt6iwXbwDymNa9YYkU5FcU74xCmPX_SkW5TcKoR5KnD5sLE-Ba5BWQqyqH08GHE22AMWRwP6a"
req.afs_key="FFF10000000007271111"
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.security.jaq.afs.check");
add_param(pRequest,"platform","3");
add_param(pRequest,"token","EF6YJAURO2-RXUC3I4COXWWNV6MXGFN1-LKCS1GRI-0");
add_param(pRequest,"session_id","Kjm0SbY8Vis_X2jImyo-LRn4BovHtl3xEsCqD7Ph-4737BFrTmwz5prSIfd1d3PU");
add_param(pRequest,"sig","04BFGg1F3ah4yhOF5uMXAap62ip2PoCwuzT-XjcyPAAh1rlK19YbcypOMklGE5VhTWLUWS8_On7CqRh88A0tan0JlT4V-l1kh6CbHgbRhjzZ-Do1Sp2q8_-4obt6iwXbwDymNa9YYkU5FcU74xCmPX_SkW5TcKoR5KnD5sLE-Ba5BWQqyqH08GHE22AMWRwP6a");
add_param(pRequest,"afs_key","FFF10000000007271111");
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.security.jaq.afs.check', {
'platform':'3',
'token':'EF6YJAURO2-RXUC3I4COXWWNV6MXGFN1-LKCS1GRI-0',
'session_id':'Kjm0SbY8Vis_X2jImyo-LRn4BovHtl3xEsCqD7Ph-4737BFrTmwz5prSIfd1d3PU',
'sig':'04BFGg1F3ah4yhOF5uMXAap62ip2PoCwuzT-XjcyPAAh1rlK19YbcypOMklGE5VhTWLUWS8_On7CqRh88A0tan0JlT4V-l1kh6CbHgbRhjzZ-Do1Sp2q8_-4obt6iwXbwDymNa9YYkU5FcU74xCmPX_SkW5TcKoR5KnD5sLE-Ba5BWQqyqH08GHE22AMWRwP6a',
'afs_key':'FFF10000000007271111'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})