TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaSecurityJaqCaptchaSendRequest req = new AlibabaSecurityJaqCaptchaSendRequest();
req.setCaptchaType(1L);
req.setExtendData("{\"screenHeight\":100,\"screenWidth\":100}");
req.setInfoToken("57a5c6ce-06c6-11e6-8ba5-a0d3c1f1fdf4");
req.setProtocolVersion("1.0");
req.setRsign("a3a6c0de6db6c85d1ec183e95f082f08");
req.setRtkenIndex("c2607d757dcad439b94349e99fc6bab8");
req.setUtoken("Uk/41dHvLE4DALlys7tWlJuq");
AlibabaSecurityJaqCaptchaSendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaSecurityJaqCaptchaSendRequest req = new AlibabaSecurityJaqCaptchaSendRequest();
req.CaptchaType = 1L;
req.ExtendData = "{\"screenHeight\":100,\"screenWidth\":100}";
req.InfoToken = "57a5c6ce-06c6-11e6-8ba5-a0d3c1f1fdf4";
req.ProtocolVersion = "1.0";
req.Rsign = "a3a6c0de6db6c85d1ec183e95f082f08";
req.RtkenIndex = "c2607d757dcad439b94349e99fc6bab8";
req.Utoken = "Uk/41dHvLE4DALlys7tWlJuq";
AlibabaSecurityJaqCaptchaSendResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaSecurityJaqCaptchaSendRequest;
$req->setCaptchaType("1");
$req->setExtendData("{\"screenHeight\":100,\"screenWidth\":100}");
$req->setInfoToken("57a5c6ce-06c6-11e6-8ba5-a0d3c1f1fdf4");
$req->setProtocolVersion("1.0");
$req->setRsign("a3a6c0de6db6c85d1ec183e95f082f08");
$req->setRtkenIndex("c2607d757dcad439b94349e99fc6bab8");
$req->setUtoken("Uk/41dHvLE4DALlys7tWlJuq");
$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.captcha.send' \
-d 'partner_id=apidoc' \
-d 'sign=DB16928D553EE27F52A858823B53F848' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-03+21%3A50%3A56' \
-d 'v=2.0' \
-d 'captcha_type=1' \
-d 'extend_data=%7B%5C%22screenHeight%5C%22%3A100%2C%5C%22screenWidth%5C%22%3A100%7D' \
-d 'info_token=57a5c6ce-06c6-11e6-8ba5-a0d3c1f1fdf4' \
-d 'protocol_version=1.0' \
-d 'rsign=a3a6c0de6db6c85d1ec183e95f082f08' \
-d 'rtken_index=c2607d757dcad439b94349e99fc6bab8' \
-d 'utoken=Uk%2F41dHvLE4DALlys7tWlJuq'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaSecurityJaqCaptchaSendRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.captcha_type=1
req.extend_data="{\"screenHeight\":100,\"screenWidth\":100}"
req.info_token="57a5c6ce-06c6-11e6-8ba5-a0d3c1f1fdf4"
req.protocol_version="1.0"
req.rsign="a3a6c0de6db6c85d1ec183e95f082f08"
req.rtken_index="c2607d757dcad439b94349e99fc6bab8"
req.utoken="Uk/41dHvLE4DALlys7tWlJuq"
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.captcha.send");
add_param(pRequest,"captcha_type","1");
add_param(pRequest,"extend_data","{\"screenHeight\":100,\"screenWidth\":100}");
add_param(pRequest,"info_token","57a5c6ce-06c6-11e6-8ba5-a0d3c1f1fdf4");
add_param(pRequest,"protocol_version","1.0");
add_param(pRequest,"rsign","a3a6c0de6db6c85d1ec183e95f082f08");
add_param(pRequest,"rtken_index","c2607d757dcad439b94349e99fc6bab8");
add_param(pRequest,"utoken","Uk/41dHvLE4DALlys7tWlJuq");
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.captcha.send', {
'captcha_type':'1',
'extend_data':'{\"screenHeight\":100,\"screenWidth\":100}',
'info_token':'57a5c6ce-06c6-11e6-8ba5-a0d3c1f1fdf4',
'protocol_version':'1.0',
'rsign':'a3a6c0de6db6c85d1ec183e95f082f08',
'rtken_index':'c2607d757dcad439b94349e99fc6bab8',
'utoken':'Uk/41dHvLE4DALlys7tWlJuq'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})