接口使用场景等说明:当您购买维易淘客接口卡后,可以调用余量查询接口(remain)来查询自己接口用量。避免会员卡和授权过期未及时处理,影响业务。
正常情况下,我站会在接口卡和授权即将过期时,短信提醒用户,以免影响使用。但有时受手机可用性和政策影响,会导致无法发送短信或您未及时收到短信。所以建议您调用本接口,及时查看会员卡和授权的状态。
【2025-04特别说明】
因受工信部严管短信及阿里云重新备案短信签名的影响(已重新备案,但每个通道的进度不可控),因此网站的会员卡到期和授权过期提醒短信受到影响,建议大家自行拉取余量接口,获取会员卡和授权有效期状态。谢谢!
环境 | http 地址 | https 地址 |
---|---|---|
正式环境 | http://api.veapi.cn/tbk/remain | 暂无 |
参数名称 | 参数类型 | 必填 | 示例值 | 描述 |
---|---|---|---|---|
vekey | String | 是 | V123M56 | 公共参数,接口秘钥,请在会员中心获取 |
GET/POST http://api.veapi.cn/tbk/remain?vekey=xxx
$api="http://api.veapi.cn/tbk/remain?vekey=xxx"; $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/remain?vekey=xxx"; // 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/remain?vekey=xxx" # 发送请求 response = requests.get(target_url) # 获取页面内容 if response.status_code == 200: print response.text
参数名称 | 参数类型 | 示例值 | 描述 |
---|---|---|---|
last_auth_date | String | 2022-12-10 | (已废弃)最后授权日期 |
pid | String | mm_1_2_3 | (已废弃)推广位 |
hasValid | Number | 1 | 表示卡是否仍有效,值为1或0 |
card | Array | 会员卡信息 | |
└─ card | String | 淘宝查询卡 | 会员卡名称 |
└─ global | String | 365天 | 有效天数或点数 |
└─ remain | String | 261天 | 剩余天数或点数 |
auths | Array | 会员卡信息 | |
└─ sessionkey | String | 745551212... | 授权TOKEN |
└─ pid | String | mm_123123 | 你设置的授权联盟号的推广位 |
└─ rid | String | 4565666122 | 你设置的渠道ID,一般只有淘宝联盟才有 |
└─ userid | String | 2323211 | 授权的联盟号的UID |
└─ userNick | String | 2323211 | 授权的联盟号的帐号昵称,不一定有该值 |
└─ expire_time | Int | 86400 | 有效期,秒数 |
└─ platname | String | 淘宝 | 授权的联盟平台名称,比如淘宝,京东等 |
{ "last_auth_date": "2022-12-10", "pid": "", "hasValid": 1, "card": [ { "card": "店铺优惠券查询点卡", "api": "shopcoupon", "startdate": "2021-02-05", "global": "210000 点", "remain": "209986 点", "status": "ok" } ], "auth": [ { "sessionkey": "70002120f3b79b1235f725fdce8f751fc3b623fa7735d12642119751694", "pid": "mm_18723245_321450063_9619600002", "rid": "20555386", "userid": "22191694", "userNick": "tb2099", "lastAuthDate": "2025-02-27 16:02:19", "expire_time": 0, "platname": "淘宝" } ], }