接口使用场景等说明:本接口支持淘宝客通过入参私域外部ID,获得待私域会员可标记的链接,会员打开该链接后,可帮助媒体自动生成会员运营id进行标记,同时自动跳转到推广落地页。
本接口可用于微信,抖音,QQ等私域场景,免去渠道RID需要授权的麻烦,实现静默授权跟单。
本接口仅适用于淘宝客商品的会员运营SID跟单。您可以直接使用本站免授权自定义跟单的万能转链接口,不需要先去转链再调用本接口,接口地址:https://www.veapi.cn/apidoc/taobaolianmeng/386
| 环境 | http 地址 | https 地址 |
|---|---|---|
| 正式环境 | http://api.veapi.cn/tbk/ridRecord | 暂无 |
| 参数名称 | 参数类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| vekey | String | 是 | V123M56 | 公共参数,接口秘钥,请在会员中心获取 |
| external_id | String | 是 | abc_113232 | 淘宝客自有私域用户自定义标记,如自有私域系统账号标记等 |
| external_type | Number | 是 | 1 | 淘宝客其他平台私域用户自定义标记,1-微信、2-微博、3-抖音、4-快手、5-QQ,0-其他 |
| op_type | Number | 是 | 1 | 授权类型,选2时可用于更新外部用户标记,默认1:1-新绑,2-更新(无法生成淘口令) |
| redirect_url | String | 是 | https://s.click.taobao.com/fMNTWfp | 您的淘客推广链接。也是会员备案自动授权后将要跳转的最终目标页地址。 |
| ucrowd_id | Number | 否 | 1 | 人群标签ID,用户备案授权后会自动添加到该人群。 |
GET/POST http://api.veapi.cn/tbk/ridRecord?vekey=xxx&external_id=sid5566&external_type=1&op_type=1&redirect_url=https://s.click.taobao.com/fMNTWfp
$api="http://api.veapi.cn/tbk/ridRecord?vekey=xxx&external_id=sid5566&external_type=1&op_type=1&redirect_url=https://s.click.taobao.com/fMNTWfp"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api); //curl_setopt($ch, CURLOPT_POST, true); //POST方式时启用 //curl_setopt($ch, CURLOPT_POSTFIELDS, $postData ); //POST方式时传参 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //如果使用https请启用 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //如果使用https请启用 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true ); //返回数据流,不直接输出 curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); //使用gzip压缩传输让访问更快 curl_setopt($ch, CURLOPT_TIMEOUT, 6); //允许执行的最长秒数。这里设定6S curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); $result = curl_exec($ch); $info = curl_getinfo($ch); curl_close($ch); echo $result; //返回值
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpRequest;
public class testGetParam {
public static void main(String[] args) {
// API网址
String url = "http://api.veapi.cn/tbk/ridRecord?vekey=xxx&external_id=sid5566&external_type=1&op_type=1&redirect_url=https://s.click.taobao.com/fMNTWfp";
// JDK 8u111版本后,若目标页面为HTTPS协议,请启用proxy用户密码鉴权
//System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
// 发送请求
String result = HttpRequest.get(url)
.timeout(10000)//设置超时,毫秒
.execute().body();
System.out.println(result);
}
}
import requests # 要访问的API网页 target_url = "http://api.veapi.cn/tbk/ridRecord?vekey=xxx&external_id=sid5566&external_type=1&op_type=1&redirect_url=https://s.click.taobao.com/fMNTWfp" # 发送请求 response = requests.get(target_url) # 获取页面内容 if response.status_code == 200: print response.text
| 参数名称 | 参数类型 | 示例值 | 描述 |
|---|---|---|---|
| url | String | https://mo.m.taobao.com/union/relation/record | 带授权的备案链接 |
{ "error": "0", "msg": "查询成功!", "data": { "url": "https://mo.m.taobao.com/union/sidmark/record?externalType=1&s=63bbdcb8f7b6ebdd23fdb437356bf9f&opType=1&externalId=sid5566&appkey=21016850&targetUrl=https%3A%2F%2Fs.click.taobao.com%2FfMNTWfp&memberId=183245" }, "request_id": "mPx4d5r" }