QQ音乐 - 刷新登录Cookie
35435
领酷API接口大全
接口地址
https://api.ilingku.com/int/v1/qqmusic_ck
返回格式
json
请求方式
get/post
请求示例
https://api.ilingku.com/int/v1/qqmusic_ck?uin=1234***&key=Q_H_L_6*****
参数说明
名称 | 必填 | 类型 | 说明 |
---|---|---|---|
uin | 是 | string | 会员账号的uin,即为qq,微信登录即为微信的wxuin |
key | 是 | string | QQ音乐登录后 Cookie中qm_keyst参数 带有Q_H_L_或W_X_的字符串 |
act | 否 | string | 功能类型(get=读取数据、update=更新数据、add或留空=入库数据) |
code | 否 | string | act参数=get、update必填 属于领酷api网站中 key 参数 |
返回数据
{
"code": 200,
"msg": "解析成功!",
"key": "96e*********41",
"req1": {
"code": 0,
"data": {
"openid": "8B6F********ADD3",
"refresh_token": "",
"access_token": "F316C7******DA6A",
"expired_at": 172***74,
"musicid": 1234***,
"musickey": "Q_H_L_6*****",
"musickeyCreateTime": 1720756419,
"first_login": 0,
"errMsg": "",
"sessionKey": "",
"unionid": "",
"str_musicid": "2975835460",
"errtip": "",
"nick": "",
"logo": "",
"feedbackURL": "",
"encryptUin": "owE****Kvson**",
"userip": "2*.*5.*9.*1",
"lastLoginTime": 0,
"keyExpiresIn": 259200,
"refresh_key": "",
"loginType": 2,
"prompt2bind": 0,
"logoffStatus": 0,
"otherAccounts": [],
"otherPhoneNo": "",
"token": "",
"isPrized": -1,
"isShowDevManage": 1,
"errTip2": "",
"tip3": "",
"encryptedPhoneNo": "",
"phoneNo": "",
"bindAccountType": 2,
"needRefreshKeyIn": 0
}
}
}
示例代码
1、第一次加入Cookie
访问一次:https://api.ilingku.com/int/v1/qqmusic_ck?uin=1234***&key=Q_H_L_6*****
2、刷新Cookie
宝塔 -> 计划任务 -> 添加计划任务 -> 任务类型(访问URL) -> URL地址:https://api.ilingku.com/int/v1/qqmusic_ck?act=update&uin= uin参数&code=站内第一次产生的key参数
3、读取Cookie
<?php
$uin= $_GET['uin'];//第一次加入的 uin 参数
$code= $_GET['code'];//领酷api网站中 key 参数
$api = 'https://api.ilingku.com/int/v1/qqmusic_ck?act=get&uin='.$uin.'&code='.$code;
$json = file_get_contents($api);
$data = json_decode($json,true);
$cookie = "Cookie:uin=".$data['uin'].";qm_keyst=".$data['qm_keyst'].";";
exit($cookie);
?>