API文档中心

热门接口:产品ID找同款全量维权查询万能转链字符串ID转换 (有API需求可联系本站)

抖客红包转链

调用权限:核心接口会员卡调用
接口使用场景等说明:

【特别公告】

抖音精选联盟官方平台于3月13日关闭,请参考 https://www.veapi.cn/gonggao/detail_84.html 


做为平替,将由穿山甲接口替代,佣金直接在本站会员中心结算。

详情见穿山甲API说明 https://www.veapi.cn/apidoc/douyindouke/369 


该接口用于抖客红包转链,需要获取抖客授权

调用说明

本接口需要您在会员中心授权(如果多用户可传入sessionkey参数)

接口请求地址

环境 http 地址 https 地址
正式环境 http://api.veapi.cn/douke/shareRedpack 暂无

请求方式:GETPOST

请求参数

参数名称 参数类型 必填 示例值 描述
vekey String V123M56 公共参数,接口秘钥,请在会员中心获取
redpack_id String 123456 红包批次ID
pid String dy_1234_123_123 抖客PID
external_info String 123_456 自定义字段,只允许 数字、字母和_,限制长度为40
need_qr_code Bool false 是否需要二维码(获取二维码将增加响应耗时,推荐false)

请求示例

  • HTTP
  • PHP
  • JAVA
  • PYTHON
  1. GET/POST  http://api.veapi.cn/douke/shareRedpack?vekey=xxx&redpack_id=565956611
使用curl函数,curl不是php原生库,需要安装才能使用

  1. $api="http://api.veapi.cn/douke/shareRedpack?vekey=xxx&redpack_id=565956611";
  2.  
  3. $ch = curl_init();
  4. curl_setopt($ch, CURLOPT_URL, $api);
  5. //curl_setopt($ch, CURLOPT_POST, true); //POST方式时启用
  6. //curl_setopt($ch, CURLOPT_POSTFIELDS, $postData ); //POST方式时传参
  7.  
  8. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //如果使用https请启用
  9. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //如果使用https请启用
  10. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true ); //返回数据流,不直接输出
  11. curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); //使用gzip压缩传输让访问更快
  12. curl_setopt($ch, CURLOPT_TIMEOUT, 6); //允许执行的最长秒数。这里设定6S
  13. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
  14.  
  15. $result = curl_exec($ch);
  16. $info = curl_getinfo($ch);
  17. curl_close($ch);
  18.  
  19. echo $result; //返回值
使用okhttp3/httpclient/jsoup/hutool,以hutool为例:

  1. import cn.hutool.http.HttpResponse;
  2. import cn.hutool.http.HttpRequest;
  3.  
  4. public class testGetParam {
  5.  
  6. public static void main(String[] args) {
  7. // API网址
  8. String url = "http://api.veapi.cn/douke/shareRedpack?vekey=xxx&redpack_id=565956611";
  9. // JDK 8u111版本后,若目标页面为HTTPS协议,请启用proxy用户密码鉴权
  10. //System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
  11.  
  12. // 发送请求
  13. String result = HttpRequest.get(url)
  14. .timeout(10000)//设置超时,毫秒
  15. .execute().body();
  16. System.out.println(result);
  17. }
  18. }
推荐使用 requests,支持访问http,https网页:

  1. import requests
  2.         
  3. # 要访问的API网页
  4. target_url = "http://api.veapi.cn/douke/shareRedpack?vekey=xxx&redpack_id=565956611"
  5.  
  6. # 发送请求
  7. response = requests.get(target_url)
  8.  
  9. # 获取页面内容
  10. if response.status_code == 200:
  11.     print response.text

返回值(JSON)

参数名称 参数类型 示例值 描述
share_command String 6.923405940 抖口令
deep_link String snssdk://.. Deeplink,允许外部APP直接唤起抖音直播间
qrcode Struct - 二维码
 └─ url String https://ssddsd.jpg URL
 └─ width Int32 200 宽度
 └─ height Int32 200 高度

返回示例

【提示】推广链接通常有时效性,示例中的链接为创建文档时生成,仅用于展示返回结果使用,有可能已失效。
{
  • error: "0",
  • msg: "查询成功!",
  • data: {},
  • request_id: "w9y5bzu"
}

错误码

如果error不为0时,请点此查看错误码表格

在线
客服

会员请加QQ群交流:

微信
咨询

加微信咨询
顶部