参数 | 类型 | 必选 | 值 | 示例 |
Authorization | string | 是 | 授权 access_token | Bearer 1798c6aadec33d1bc2f5b707f1049aefexxxx |
参数 | 类型 | 必选 | 描述 |
item_ids | array | 是 | 淘宝商品 id 数组 |
account | string | 是 | 淘宝账号 |
item_ids[0]: 607245697156 item_ids[1]: 623917802188 account: 马云
curl --location --request POST 'http://api.xxxx.com/tool/accounts/tao-guess' \ --header 'Authorization: Bearer c2c20409e5f3f34437aece02c69b9a9dxxxxxxxx' \ --header 'Cookie: PHPSESSID=9clrl8itapsmakj80smt4rr0ts; _csrf=0c6b29e5beabe9ccf9cb0379127a47b1de8c9ba43601e6414c2ce495757e671aa%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%223lkgGJ8IB0O1ywsnaB_TJ8KgMgNJ8pP7%22%3B%7D' \ --form 'item_ids[0]=607245697156' \ --form 'item_ids[1]=623917802188' \ --form 'account=马云'
<?php
$curl = curl_init();
curl_setopt_array($curl, array( CURLOPT_URL => "http://api.xxxx.com/tool/accounts/tao-guess", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => array('item_ids[0]' => '607245697156','item_ids[1]' => '623917802188','account' => '马云'), CURLOPT_HTTPHEADER => array( "Authorization: Bearer c2c20409e5f3f34437aece02c69b9a9dxxxxxxxx", "Cookie: PHPSESSID=9clrl8itapsmakj80smt4rr0ts; _csrf=0c6b29e5beabe9ccf9cb0379127a47b1de8c9ba43601e6414c2ce495757e671aa%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%223lkgGJ8IB0O1ywsnaB_TJ8KgMgNJ8pP7%22%3B%7D" ), ));
$response = curl_exec($curl);
curl_close($curl); echo $response;
OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM) .addFormDataPart("item_ids[0]", "607245697156") .addFormDataPart("item_ids[1]", "623917802188") .addFormDataPart("account", "马云") .build(); Request request = new Request.Builder() .url("http://api.xxxxxx.com/tool/accounts/tao-guess") .method("POST", body) .addHeader("Authorization", "Bearer c2c20409e5f3f34437aece02c69b9a9dxxxxxxxx") .addHeader("Cookie", "PHPSESSID=9clrl8itapsmakj80smt4rr0ts; _csrf=0c6b29e5beabe9ccf9cb0379127a47b1de8c9ba43601e6414c2ce495757e671aa%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%223lkgGJ8IB0O1ywsnaB_TJ8KgMgNJ8pP7%22%3B%7D") .build(); Response response = client.newCall(request).execute();
参数 | 类型 | 描述 |
code | int | 返回代码 |
msg | string | 返回码描述 |
msec | int | 接口执行时间 |
time | int | 接口返回时间 |
data | object | 返回数据体 |
item_id | int | 商品 id |
hit | string | 入池结果 |
expire | string | 时效 |
suggest | string | 建议 |
count | int | 出现次数 |
account | string | 淘宝账号 |
{ "code": 0, "msg": "成功", "msec": 17727, "time": 1596433783, "data": [ { "item_id": 607245697156, "hit": "未入池", "expire": "2小时", "suggest": "商品未出现在猜你喜欢中", "count": 0, "account": "马云" }, { "item_id": 623917802188, "hit": "未入池", "expire": "2小时", "suggest": "商品未出现在猜你喜欢中", "count": 0, "account": "马云" } ] }
代码 | 代码描述 | 解决方案 |
0 | 成功 | |
100 | 请求参数错误 | 检查您的请求参数是否正确 |
101 | 请求超时,请重试 | 检查您的网络情况或者联系客服解决 |
200 | 系统错误,请联系客服 | 检查您的接口地址填写是否正确,其他问题联系客服解决 |
203 | 暂不支持当前接口 | |
204 | 请求异常:无该接口权限,请前往官网开通正式接口。 | 前往官网开通该接口权限 |
204 | 请求异常:API 调用次数不足,请前往网站兑换次数。 | 前往官网充值该接口调用次数 |
401 | 身份凭证无效 | 在请求头中添加 access_token |
参数 | 类型 | 必选 | 值 | 示例 |
Authorization | string | 是 | 授权 access_token | Bearer 1798c6aadec33d1bc2f5b707f1049aefexxxx |
参数 | 类型 | 必选 | 描述 |
item_ids | array | 是 | 淘宝商品 id 数组 |
account | string | 是 | 淘宝账号 |
item_ids[0]: 607245697156 item_ids[1]: 623917802188 account: 马云
curl --location --request POST 'http://api.xxxxx.com/tool/accounts/tao-guess' \ --header 'Authorization: Bearer c2c20409e5f3f34437aece02c69b9a9dxxxxxxxx' \ --header 'Cookie: PHPSESSID=9clrl8itapsmakj80smt4rr0ts; _csrf=0c6b29e5beabe9ccf9cb0379127a47b1de8c9ba43601e6414c2ce495757e671aa%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%223lkgGJ8IB0O1ywsnaB_TJ8KgMgNJ8pP7%22%3B%7D' \ --form 'item_ids[0]=607245697156' \ --form 'item_ids[1]=623917802188' \ --form 'account=马云'
<?php
$curl = curl_init();
curl_setopt_array($curl, array( CURLOPT_URL => "http://api.xxxx.com/tool/accounts/tao-guess", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => array('item_ids[0]' => '607245697156','item_ids[1]' => '623917802188','account' => '马云'), CURLOPT_HTTPHEADER => array( "Authorization: Bearer c2c20409e5f3f34437aece02c69b9a9dxxxxxxxx", "Cookie: PHPSESSID=9clrl8itapsmakj80smt4rr0ts; _csrf=0c6b29e5beabe9ccf9cb0379127a47b1de8c9ba43601e6414c2ce495757e671aa%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%223lkgGJ8IB0O1ywsnaB_TJ8KgMgNJ8pP7%22%3B%7D" ), ));
$response = curl_exec($curl);
curl_close($curl); echo $response;
OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM) .addFormDataPart("item_ids[0]", "607245697156") .addFormDataPart("item_ids[1]", "623917802188") .addFormDataPart("account", "马云") .build(); Request request = new Request.Builder() .url("http://api.xxxxx.com/tool/accounts/tao-guess") .method("POST", body) .addHeader("Authorization", "Bearer c2c20409e5f3f34437aece02c69b9a9dxxxxxxxx") .addHeader("Cookie", "PHPSESSID=9clrl8itapsmakj80smt4rr0ts; _csrf=0c6b29e5beabe9ccf9cb0379127a47b1de8c9ba43601e6414c2ce495757e671aa%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%223lkgGJ8IB0O1ywsnaB_TJ8KgMgNJ8pP7%22%3B%7D") .build(); Response response = client.newCall(request).execute();
参数 | 类型 | 描述 |
code | int | 返回代码 |
msg | string | 返回码描述 |
msec | int | 接口执行时间 |
time | int | 接口返回时间 |
data | object | 返回数据体 |
item_id | int | 商品 id |
hit | string | 入池结果 |
expire | string | 时效 |
suggest | string | 建议 |
count | int | 出现次数 |
account | string | 淘宝账号 |
{ "code": 0, "msg": "成功", "msec": 17727, "time": 1596433783, "data": [ { "item_id": 607245697156, "hit": "未入池", "expire": "2小时", "suggest": "商品未出现在猜你喜欢中", "count": 0, "account": "马云" }, { "item_id": 623917802188, "hit": "未入池", "expire": "2小时", "suggest": "商品未出现在猜你喜欢中", "count": 0, "account": "马云" } ] }
代码 | 代码描述 | 解决方案 |
0 | 成功 | |
100 | 请求参数错误 | 检查您的请求参数是否正确 |
101 | 请求超时,请重试 | 检查您的网络情况或者联系客服解决 |
200 | 系统错误,请联系客服 | 检查您的接口地址填写是否正确,其他问题联系客服解决 |
203 | 暂不支持当前接口 | |
204 | 请求异常:无该接口权限,请前往官网开通正式接口。 | 前往官网开通该接口权限 |
204 | 请求异常:API 调用次数不足,请前往网站兑换次数。 | 前往官网充值该接口调用次数 |
401 | 身份凭证无效 | 在请求头中添加 access_token |
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!