TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaSecurityWsgThirdjpgGenerateRequest req = new AlibabaSecurityWsgThirdjpgGenerateRequest();
req.setEncryptionInput("{ \"auth_key\":\"0000\", \"cert_rsa_base64\":\"hhhhhhhhhh\", \"os\":\"Android\", \"appkey\": { \"k1\":\"secret1\", \"k2\":\"secret2\", \"kn\":\"secretn\" }, \"security_data\": { \"s1\":\"data1\", \"s2\":\"data2\", \"sn\":\"datan\" }, \"extra_data\": { \"e1\":\"edata1\", \"e2\":\"edata2\", \"en\":\"edatan\" } }");
AlibabaSecurityWsgThirdjpgGenerateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaSecurityWsgThirdjpgGenerateRequest req = new AlibabaSecurityWsgThirdjpgGenerateRequest();
req.EncryptionInput = "{ \"auth_key\":\"0000\", \"cert_rsa_base64\":\"hhhhhhhhhh\", \"os\":\"Android\", \"appkey\": { \"k1\":\"secret1\", \"k2\":\"secret2\", \"kn\":\"secretn\" }, \"security_data\": { \"s1\":\"data1\", \"s2\":\"data2\", \"sn\":\"datan\" }, \"extra_data\": { \"e1\":\"edata1\", \"e2\":\"edata2\", \"en\":\"edatan\" } }";
AlibabaSecurityWsgThirdjpgGenerateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaSecurityWsgThirdjpgGenerateRequest;
$req->setEncryptionInput("{ \"auth_key\":\"0000\", \"cert_rsa_base64\":\"hhhhhhhhhh\", \"os\":\"Android\", \"appkey\": { \"k1\":\"secret1\", \"k2\":\"secret2\", \"kn\":\"secretn\" }, \"security_data\": { \"s1\":\"data1\", \"s2\":\"data2\", \"sn\":\"datan\" }, \"extra_data\": { \"e1\":\"edata1\", \"e2\":\"edata2\", \"en\":\"edatan\" } }");
$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.wsg.thirdjpg.generate' \
-d 'partner_id=apidoc' \
-d 'sign=EBB1FAE9960C2840FB348C7A1AAC69E3' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-04+16%3A09%3A02' \
-d 'v=2.0' \
-d 'encryption_input=%7B+%09%5C%22auth_key%5C%22%3A%5C%220000%5C%22%2C+%09%5C%22cert_rsa_base64%5C%22%3A%5C%22hhhhhhhhhh%5C%22%2C+%09%5C%22os%5C%22%3A%5C%22Android%5C%22%2C+%09%5C%22appkey%5C%22%3A+%09%09%7B+%09%09%09%5C%22k1%5C%22%3A%5C%22secret1%5C%22%2C+%09%09%09%5C%22k2%5C%22%3A%5C%22secret2%5C%22%2C+%09%09%09%5C%22kn%5C%22%3A%5C%22secretn%5C%22+%09%09%7D%2C+%09%5C%22security_data%5C%22%3A+%09%09%7B+%09%09%09%5C%22s1%5C%22%3A%5C%22data1%5C%22%2C+%09%09%09%5C%22s2%5C%22%3A%5C%22data2%5C%22%2C+%09%09%09%5C%22sn%5C%22%3A%5C%22datan%5C%22+%09%09%7D%2C+%09%5C%22extra_data%5C%22%3A+%09%09%7B+%09%09%09%5C%22e1%5C%22%3A%5C%22edata1%5C%22%2C+%09%09%09%5C%22e2%5C%22%3A%5C%22edata2%5C%22%EF%BC%8C+%09%09%09%5C%22en%5C%22%3A%5C%22edatan%5C%22++%09%09%7D+%7D'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaSecurityWsgThirdjpgGenerateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.encryption_input="{ \"auth_key\":\"0000\", \"cert_rsa_base64\":\"hhhhhhhhhh\", \"os\":\"Android\", \"appkey\": { \"k1\":\"secret1\", \"k2\":\"secret2\", \"kn\":\"secretn\" }, \"security_data\": { \"s1\":\"data1\", \"s2\":\"data2\", \"sn\":\"datan\" }, \"extra_data\": { \"e1\":\"edata1\", \"e2\":\"edata2\", \"en\":\"edatan\" } }"
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.wsg.thirdjpg.generate");
add_param(pRequest,"encryption_input","{ \"auth_key\":\"0000\", \"cert_rsa_base64\":\"hhhhhhhhhh\", \"os\":\"Android\", \"appkey\": { \"k1\":\"secret1\", \"k2\":\"secret2\", \"kn\":\"secretn\" }, \"security_data\": { \"s1\":\"data1\", \"s2\":\"data2\", \"sn\":\"datan\" }, \"extra_data\": { \"e1\":\"edata1\", \"e2\":\"edata2\", \"en\":\"edatan\" } }");
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.wsg.thirdjpg.generate', {
'encryption_input':'{ \"auth_key\":\"0000\", \"cert_rsa_base64\":\"hhhhhhhhhh\", \"os\":\"Android\", \"appkey\": { \"k1\":\"secret1\", \"k2\":\"secret2\", \"kn\":\"secretn\" }, \"security_data\": { \"s1\":\"data1\", \"s2\":\"data2\", \"sn\":\"datan\" }, \"extra_data\": { \"e1\":\"edata1\", \"e2\":\"edata2\", \"en\":\"edatan\" } }'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})