# 长链转短链
# 接口名称
taobao.tbk.spread.get
# 调用方法
https://api.taobaokeapi.com/?usertoken=[usertoken]&method=taobao.tbk.spread.get
# 请求参数
名称 | 类型 | 必须 | 示例值 | 描述 |
---|---|---|---|---|
url | String | true | http://temai.taobao.com | 原始url, 只支持uland.taobao.com,s.click.taobao.com, ai.taobao.com,temai.taobao.com的域名转换,否则判错 |
encodeurls | String | false | %5b%22http%3a%2f%2ftemai.taobao.com%2f1%22%2c%22http%3a%2f%2ftemai.taobao.com%2f2%22%5d | 批量查询 和 url二选一encodeurl后的url数组,如["http://temai.taobao.com/1","http://temai.taobao.com/2"]的encodeurl结果 |
# 响应参数
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
results | TbkSpread [] | 传播形式对象列表 | |
content | String | http://s.click.taobao.com/H4zazPx | 传播形式, 目前只支持短链接 |
err_msg | String | OK | 调用错误信息;由于是批量接口,请重点关注每条请求返回的结果,如果非OK,则说明该结果对应的content不正常,请酌情处理; |
total_results | Number | 10 | totalResults |
# 响应示例
{
"tbk_spread_get_response":{
"results":{
"tbk_spread":[
{
"content":"http:\/\/s.click.taobao.com\/H4zazPx",
"err_msg":"OK"
}
]
},
"total_results":10
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
# 异常示例
{
"error_response":{
"sub_msg":"非法参数",
"code":50,
"sub_code":"isv.invalid-parameter",
"msg":"Remote service error"
}
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# 错误码解释
错误码 | 错误消息 | 解决方案 |
---|---|---|
isp.dependency-error | 依赖服务暂时不可用 | 稍后重试 |
isp.tbkapi-service-unavailable | 内部服务不可用 | 稍后重试 |
isv.not-support-param-type | 输入参数非法 | 参考文档 |