TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TbkTextTpwdCreateRequest req = new TbkTextTpwdCreateRequest();
req.setUserId("123");
req.setText("长度大于5个字符");
req.setUrl("https://uland.taobao.com/");
req.setLogo("https://uland.taobao.com/");
req.setPasswordType("textPsd");
TbkTextTpwdCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TbkTextTpwdCreateRequest req = new TbkTextTpwdCreateRequest();
req.UserId = "123";
req.Text = "长度大于5个字符";
req.Url = "https://uland.taobao.com/";
req.Logo = "https://uland.taobao.com/";
req.PasswordType = "textPsd";
TbkTextTpwdCreateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TbkTextTpwdCreateRequest;
$req->setUserId("123");
$req->setText("长度大于5个字符");
$req->setUrl("https://uland.taobao.com/");
$req->setLogo("https://uland.taobao.com/");
$req->setPasswordType("textPsd");
$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=taobao.tbk.text.tpwd.create' \
-d 'partner_id=apidoc' \
-d 'sign=79C66FB33BAD9510BDF347064EFD569E' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-16+00%3A45%3A33' \
-d 'v=2.0' \
-d 'logo=https%3A%2F%2Fuland.taobao.com%2F' \
-d 'password_type=textPsd' \
-d 'text=%E9%95%BF%E5%BA%A6%E5%A4%A7%E4%BA%8E5%E4%B8%AA%E5%AD%97%E7%AC%A6' \
-d 'url=https%3A%2F%2Fuland.taobao.com%2F' \
-d 'user_id=123'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TbkTextTpwdCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.user_id="123"
req.text="长度大于5个字符"
req.url="https://uland.taobao.com/"
req.logo="https://uland.taobao.com/"
req.password_type="textPsd"
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,"taobao.tbk.text.tpwd.create");
add_param(pRequest,"user_id","123");
add_param(pRequest,"text","长度大于5个字符");
add_param(pRequest,"url","https://uland.taobao.com/");
add_param(pRequest,"logo","https://uland.taobao.com/");
add_param(pRequest,"password_type","textPsd");
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('taobao.tbk.text.tpwd.create', {
'user_id':'123',
'text':'长度大于5个字符',
'url':'https://uland.taobao.com/',
'logo':'https://uland.taobao.com/',
'password_type':'textPsd'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})