Beginner Taobaoke API from entry to abandonment

The first step to understand

First of all, you have to understand what Taobao guest is and what is the relationship between Taobao guest and us.

 

       Post an encyclopedia:

       Taobaoke is a promotion model that is billed by transaction. It also refers to a type of people who earn money through promotion. As long as Taobaoke gets the product code from the Taobaoke promotion area , any buyer (including yourself) will go through your promotion. ( Links , personal websites , blogs or posts from the community) After entering the Taobao seller's store and completing the purchase , you can get a commission paid by the seller ; simply put, a Taobao guest refers to a person who helps sellers promote their products and earn commissions.

 

To put it simply, let us idle people help businesses promote and extract business commissions. Specifically, you can use Taobao Alliance to view it on WEB and mobile terminals. On the page, log in to your account, select the product you want to recommend to others, and get your unique referral code. Others can use your coupon code to get discounts or coupons to get discounts. If He buys it, and you earn it.

In theory, this is a white wolf with empty gloves, but there must be some expenses necessary to make it bigger.

 

 The second step

 So what does this have to do with the Taobaoke API? There is, of course, something that is bound to emerge driven by demand. Personalized store.

Try to imagine that if the products on the Taobao homepage are all your recommended products, then the commission. . . Whoops, yes that's the demand, when the single product promotion is too cumbersome, lazy wisdom will ask us to change.

In order to enter this world, it took about 4 or 5 hours to read relevant materials and understand. First of all, we can get the relevant API access from Alimama, but we don’t have to go to her, after all, Alibaba is the father.

Portal: Taobao Open Platform Here is how to get the official SDK tutorial  ;

Here I will talk about the problems I encountered during the acquisition process:

 First log in to Taobao open platform , click on personal to enter the control background, application management -> application list -> create application



 

 Then pay attention to choose: Hand Amoy Wireless--->>Baichuan Wireless Application---->>Click to create an application, here will enter Ali Baichuan, don't ask, it becomes this again, the result of Ali's business subdivision

 Then create a name classification description, and the application you just created appears in the creation discovery list. If you are happy to download the SDK at this time, you are wrong.

First of all, Ali has made strict permissions for the API. The SDK you use needs to be generated on-site, which means that if you have insufficient permissions, no interface in your SDK will be given to you.

So what is needed here, the above interface document says.

Baichuan Basic Capability (New) and Wireless Open Baichuan Taoke Package

The application of Taoke News requires primary e-commerce capabilities, so let's apply too, anyway, no review is required. Here I went to download the SDK and the test failed, but I still missed one.

 

 

I have to enter the backend of my product to open the service of this Baichuan e-commerce SDK. Then you can go to the SDK to download the SDK package you need.

 The third step code first experience

Simply write a Demo for api testing

public class test {

//*****

 

String url = "http://gw.api.taobao.com/router/rest";

String appkey = "********";

String secret = "*********";

TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);

//Query according to conditions - get the list of Taobao guest products

public TbkItemGetResponse getTBKlistFor(){

TbkItemGetResponse rsp = null;

TbkItemGetRequest req = new TbkItemGetRequest();

req.setFields("num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url,seller_id,volume,nick");

req.setQ("Aromatherapy bottle");

 

/*req.setQ("Women's clothing");

req.setCat("16,18");

req.setItemloc("Hangzhou");

req.setSort("tk_rate_des");

req.setIsTmall(false);

req.setIsOverseas(false);

req.setStartPrice(10L);

req.setEndPrice(10L);

req.setStartTkRate(123L);

req.setEndTkRate(123L);

req.setPlatform(1L);

req.setPageNo(123L);

req.setPageSize(20L);*/

 

try {

rsp = client.execute(req);

} catch (ApiException e) {

// TODO Auto-generated catch block

e.printStackTrace ();

}

return rsp;

}

public TbkItemRecommendGetResponse tbkGoodLinkSerch(){

TbkItemRecommendGetRequest req = new TbkItemRecommendGetRequest();

req.setFields("num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url");

req.setNumIid(24337872166L);

req.setCount(20L);

req.setPlatform(1L);

TbkItemRecommendGetResponse rsp =null;

try {

rsp = client.execute(req);

} catch (ApiException e) {

// TODO Auto-generated catch block

e.printStackTrace ();

}

return rsp;

 

}

public static void main(String[] args) {

// TODO Auto-generated method stub

test t = new test();

System.out.println(t.getTBKlistFor().getBody());

System.out.println(t.tbkGoodLinkSerch().getBody());

}

 

}

The above is the only test result that I can test in the afternoon.

On the Taobao open platform, the first three APIs can be used, and the rest are all GG. Why are the permissions insufficient? And most importantly:

 the most important thing is

 

taobao.tbk.item.coupon.get single product plus volume retrieval api

 

This is exactly what I need, pass in the parameters: the ID of the selected item + your value in Alimama: mm_111123_223_22 Similar to this, you can generate your personal volume information, a string ASJSKFSKWASD, which is probably similar to this. That basic development process is over. But why can't it be used.

After checking the reasons, due to the rapid iteration of time, Taobaoke API has been updated a lot. As a result, some API excuse information on the Internet is basically wrong or wrong. Those have been eliminated, and many interfaces have been eliminated after API 2.0. Said to be eliminated, in fact, is closed off the assembly line, not allowed to use. However, those who applied for it before this time can continue to use it, but those who apply later will not be able to obtain this permission.

So what should I do, I have no choice, I haven't found a solution, and the relevant knowledge on the Internet is wrong or crashed.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326506836&siteId=291194637