接口使用场景等说明:多多客工具生成转盘抽免单url,不过这个URL现在微信不能分享,会被以诱导分享而屏蔽。至于什么是转盘抽免单,用过拼多多的都知道吧。
| 环境 | http 地址 | https 地址 |
|---|---|---|
| 正式环境 | http://api.veapi.cn/pdd/pdd_lotteryurl | 暂无 |
| 参数名称 | 参数类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| vekey | String | 是 | V123M56 | 公共参数,接口秘钥,请在会员中心获取 |
| pid_list | String[] | 是 | 推广位 | |
| custom_parameters | String | 是 | 自定义参数,必须是与p_id备案关联过(参备案接口),为链接打上自定义标签;参数最长限制64个字节;格式:{"uid":"11","sid":"22"},如果您只传Uid,那么也可以直接用字符串表示,如custom_parameters=11。其中 uid 必选,用户唯一标识,每个用户仅且对应一个标识; sid可选,表示上下文信息标识,例如sessionId等。该json字符串中也可以加入其他自定义的key/value对。 | |
| generate_qq_app | Boolean | 否 | 是否生成qq小程序 | |
| generate_schema_url | Boolean | 否 | 是否返回 schema URL | |
| generate_short_url | Boolean | 否 | 是否生成短链接,true-是,false-否 | |
| generate_weapp_webview | Boolean | 否 | 是否生成唤起微信客户端链接,true-是,false-否,默认false | |
| generate_we_app | Boolean | 否 | 是否生成小程序链接 | |
| multi_group | Boolean | 否 | true--生成多人团推广链接 false--生成单人团推广链接(默认false)1、单人团推广链接:用户访问单人团推广链接,可直接购买商品无需拼团。2、多人团推广链接:用户访问双人团推广链接开团,若用户分享给他人参团,则开团者和参团者的佣金均结算给推手 |
GET/POST http://api.veapi.cn/pdd/pdd_lotteryurl?vekey=xxx&&pid_list=4079456_34211517&custom_parameters=6688
$api="http://api.veapi.cn/pdd/pdd_lotteryurl?vekey=xxx&&pid_list=4079456_34211517&custom_parameters=6688"; $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/pdd/pdd_lotteryurl?vekey=xxx&&pid_list=4079456_34211517&custom_parameters=6688";
// 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/pdd/pdd_lotteryurl?vekey=xxx&&pid_list=4079456_34211517&custom_parameters=6688" # 发送请求 response = requests.get(target_url) # 获取页面内容 if response.status_code == 200: print response.text
| 参数名称 | 参数类型 | 示例值 | 描述 |
|---|---|---|---|
| total | Integer | 返回总数 | |
| multi_url_list | Object | 转盘抽免单多人团链接 | |
| └─ mobile_short_url | String | 转盘抽免单唤醒拼多多APP短链接 | |
| └─ mobile_url | String | 转盘抽免单唤醒拼多多APP长链接 | |
| └─ schema_url | String | schema的链接 | |
| └─ short_url | String | 转盘抽免单短链接 | |
| └─ url | String | 转盘抽免单长链接 | |
| └─ we_app_page_path | String | 转盘抽免单小程序链接 | |
| └─ we_app_web_view_short_url | String | 转盘抽免单唤醒微信短链接 | |
| └─ we_app_web_view_url | String | 转盘抽免单唤醒微信长链接 | |
| qq_app_info | Object | qq小程序信息 | |
| └─ app_id | String | 拼多多小程序id | |
| └─ banner_url | String | Banner图 | |
| └─ desc | String | 描述 | |
| └─ page_path | String | 小程序path值 | |
| └─ qq_app_icon_url | String | 小程序icon | |
| └─ source_display_name | String | 来源名 | |
| └─ title | String | 小程序标题 | |
| └─ user_name | String | 用户名 | |
| single_url_list | Object | 转盘抽免单单人团链接 | |
| └─ mobile_short_url | String | 转盘抽免单唤醒APP短链接 | |
| └─ mobile_url | String | 转盘抽免单唤醒APP长链接 | |
| └─ schema_url | String | schema的链接 | |
| └─ short_url | String | 转盘抽免单短链接 | |
| └─ url | String | 转盘抽免单长链接 | |
| └─ we_app_page_path | String | 转盘抽免单小程序短链接 | |
| └─ we_app_web_view_short_url | String | 转盘抽免单唤醒微信短链接 | |
| └─ we_app_web_view_url | String | 转盘抽免单唤醒微信长链接 | |
| we_app_info | Object | 小程序信息 | |
| └─ app_id | String | 小程序ID | |
| └─ banner_url | String | Banner图 | |
| └─ desc | String | 描述 | |
| └─ page_path | String | 小程序path值 | |
| └─ source_display_name | String | 来源名 | |
| └─ title | String | 小程序标题 | |
| └─ user_name | String | 用户名 | |
| └─ we_app_icon_url | String | 小程序图片 |
{ "error": "0", "msg": "成功生成转盘抽免单url", "total": "1", "data": [ { "single_url_list": { "mobile_url": "https://mobile.yangkeduo.com/duo_scratch_card.html?pid=4079456_34211517&customParameters=6688&authDuoId=2003157&cpsSign=CL_221221_4079456_34211517_fc72c8e28f0f3f759dbdca2797d9555d&_x_ddjb_act=%7B%22st%22%3A%228%22%7D&duoduo_type=2&launch_pdd=1&campaign=ddjb&cid=launch_download_roulette_", "mobile_short_url": "https://p.pinduoduo.com/DoTniqE7", "we_app_web_view_url": "https://mobile.yangkeduo.com/duo_scratch_card.html?pid=4079456_34211517&customParameters=6688&authDuoId=2003157&cpsSign=CL_221221_4079456_34211517_fc72c8e28f0f3f759dbdca2797d9555d&_x_ddjb_act=%7B%22st%22%3A%228%22%7D&duoduo_type=2", "url": "https://mobile.yangkeduo.com/duo_scratch_card.html?pid=4079456_34211517&customParameters=6688&authDuoId=2003157&cpsSign=CL_221221_4079456_34211517_fc72c8e28f0f3f759dbdca2797d9555d&_x_ddjb_act=%7B%22st%22%3A%228%22%7D&duoduo_type=2&launch_pdd=1&campaign=ddjb&cid=launch_download_roulette_", "short_url": "https://p.pinduoduo.com/DoTniqE7", "we_app_web_view_short_url": "https://p.pinduoduo.com/4deAg5kB" }, "sign": "CL_221221_4079456_34211517_fc72c8e28f0f3f759dbdca2797d9555d" } ], "request_id": "cz2gqIP" }