TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AliexpressMemberOauthAuthorizeRequest req = new AliexpressMemberOauthAuthorizeRequest();
req.setResponseType("code");
req.setSnsAuthorizationCode("afjaodfjaojdfoajdfioa");
req.setSnsType("ok");
req.setAutoRegister(true);
AliexpressMemberOauthAuthorizeResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AliexpressMemberOauthAuthorizeRequest req = new AliexpressMemberOauthAuthorizeRequest();
req.ResponseType = "code";
req.SnsAuthorizationCode = "afjaodfjaojdfoajdfioa";
req.SnsType = "ok";
req.AutoRegister = true;
AliexpressMemberOauthAuthorizeResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AliexpressMemberOauthAuthorizeRequest;
$req->setResponseType("code");
$req->setSnsAuthorizationCode("afjaodfjaojdfoajdfioa");
$req->setSnsType("ok");
$req->setAutoRegister("true");
$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=aliexpress.member.oauth.authorize' \
-d 'partner_id=apidoc' \
-d 'sign=95EBC027224066981B2FEFE199B1C957' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-06-07+21%3A05%3A42' \
-d 'v=2.0' \
-d 'auto_register=true' \
-d 'response_type=code' \
-d 'sns_authorization_code=afjaodfjaojdfoajdfioa' \
-d 'sns_type=ok'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AliexpressMemberOauthAuthorizeRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.response_type="code"
req.sns_authorization_code="afjaodfjaojdfoajdfioa"
req.sns_type="ok"
req.auto_register=true
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,"aliexpress.member.oauth.authorize");
add_param(pRequest,"response_type","code");
add_param(pRequest,"sns_authorization_code","afjaodfjaojdfoajdfioa");
add_param(pRequest,"sns_type","ok");
add_param(pRequest,"auto_register","true");
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('aliexpress.member.oauth.authorize', {
'response_type':'code',
'sns_authorization_code':'afjaodfjaojdfoajdfioa',
'sns_type':'ok',
'auto_register':'true'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})