接口使用场景等说明:【特别公告】
抖音精选联盟官方平台于3月13日关闭,请参考 https://www.veapi.cn/gonggao/detail_84.html
做为平替,将由穿山甲接口替代,佣金直接在本站会员中心结算。
详情见穿山甲API说明 https://www.veapi.cn/apidoc/douyindouke/369
本接口用于独立抖客获取达人直播间的分享物料转链,用于推广直播间,包括直播间抖口令、二维码、deeplink和zlink,需要抖客百应授权。
环境 | http 地址 | https 地址 |
---|---|---|
正式环境 | http://api.veapi.cn/douke/institute_LiveShare | 暂无 |
参数名称 | 参数类型 | 必填 | 示例值 | 描述 |
---|---|---|---|---|
vekey | String | 是 | V123M56 | 公共参数,接口秘钥,请在会员中心获取 |
pid | String | 否 | dy_10101245197859_1726220821_2656147525 | 抖客PID |
external_info | String | 否 | 123_456 | 自定义字段,只允许 数字、字母和_,限制长度为40 |
open_id | String | 否 | 废弃字段,将下线 | 抖店用户open_id【废弃,将下线】 |
buyin_id | String | 否 | 6585943052305909 | 主播百应ID (buyinId和dy_code最少填一项) |
need_qr_code | Bool | 否 | false | 是否需要二维码(获取二维码将增加响应耗时,推荐false) |
dy_code | String | 否 | 6.9 gO:/【ceshi直播间】4.8:/ ÊÊn53CIbpa1SFr8ΨΨ,按长復製此消[转圈]夕条,哒揩ϓƗӢԂƠʮ[咖啡]搜缩 | 直播间口令或者短链接(优先级 buyin_id > open_id > dy_code)) (buyinId和dy_code最少填一项) |
product_id | Int64 | 否 | 3501844227627868700 | 直播间绑定的商品id,回流唤起对应商详页 |
platform | Int32 | 否 | 0 | 回流端标识 0:抖音 1:抖音极速版 |
get_live_items | Int32 | 否 | 1 | 是否同时获取直播间商品列表 |
GET/POST http://api.veapi.cn/douke/institute_LiveShare?vekey=xxx&need_qr_code=false&external_info=11_22&buyin_id=6937811229809508616&get_live_items=1【例子】使用直播间口令转链
http://api.veapi.cn/douke/institute_LiveShare?vekey=xxx&need_qr_code=false&external_info=11_22&dy_code=6.9%20gO:/【敬修堂黄金版香口牙膏直播间】9-:/%20-▽▽PHtLc8Y7nA7B8▽▽,长按fu此zhi条消息,扌丁ɗʘȗ傁锎ϔΊɧ索2&pid=dy_107213597798095225100_20865_2675084869
$api="http://api.veapi.cn/douke/institute_LiveShare?vekey=xxx&need_qr_code=false&external_info=11_22&buyin_id=6937811229809508616&get_live_items=1"; $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/douke/institute_LiveShare?vekey=xxx&need_qr_code=false&external_info=11_22&buyin_id=6937811229809508616&get_live_items=1"; // 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/douke/institute_LiveShare?vekey=xxx&need_qr_code=false&external_info=11_22&buyin_id=6937811229809508616&get_live_items=1" # 发送请求 response = requests.get(target_url) # 获取页面内容 if response.status_code == 200: print response.text
参数名称 | 参数类型 | 示例值 | 描述 |
---|---|---|---|
dy_password | String | 6.923405940 | 抖口令 |
qr_code | Struct | - | 二维码 |
└─ url | String | https://ssddsd.jpg | URL |
└─ width | Int32 | 200 | 宽度 |
└─ height | Int32 | 200 | 高度 |
└─ dy_deeplink | String | snssdk://live.. | Deeplink,允许外部APP直接唤起抖音直播间 |
dy_zlink | String | https://z.douyin.com/xxxxxxx | Zlink,允许外部APP直接唤起抖音直播间,未安装抖音应用用户,唤起抖音下载页,有效期60天 |
详情字段 | Struct | - | 如果添加了get_live_items=1参数,返回值字段请查看直播间商品列表接口 |
{ "error": "0", "msg": "查询成功!", "data": { "dy_deeplink": "snssdk1128://lynxview?surl=https%3A%2F%2Flf-dy-sourcecdn-tos.bytegecko.com%2Fobj%2Fbyte-gurd-source%2F1325%2Fgecko%2Fresource%2Falliance_lynx_live_room_middle_page%2Fapp%2Ftemplate.js&fallback_url=https%3A%2F%2Falliance.jinritemai.com%2Flynx%2Fpages%2Flive-room-middle-page%2Fapp%2Ftemplate%2Findex.html&hide_nav_bar=1&dynamic=2&live_room_schema=snssdk1128%3A%2F%2Fwebcast_room%3Froom_id%3D7216895126453472058%26enter_method%3Dcps_open_deeplink%26enter_from_merge%3Dcps_open_deeplink%26ecom_live_params%3D%257B%2522jump_schema%2522%253A%2522sslocal%253A%252F%252Fec_live_list%252F%253Fextra%253D%25257B%25257D%2522%252C%2522cps_track%2522%253A%2522CkIIzZupt4cDEOgIGilkeV8xMDcyMTM1OTc3OTgwOTUyMjUxMDBfMjA4NjVfMjY3NTA4NDg2OSIFMTFfMjIwADoAQgASDAi6lofMl_zjk2QQASIA%2522%252C%2522params_version%2522%253A1%257D", "dy_password": "6.9 gO:/【植护官方旗舰店直播间】6:/ ...ЯxRVeQRUC7B8ΔΔ,按长腹Tiaσ製此消xï,咑ƳǏɳ锎đơȖ索搜,看TA直播##xRVeQRUC7B8##", "dy_zlink": "https://z.douyin.com/jU7077G", "qr_code": { "height": 0, "url": "", "width": 0 } }, "request_id": "v6g492C" }