Cyryuzu

稳定、快速、高效的数据接口服务

当前接口状态 · 正常

获取对应应用下的外链,如填写蓝奏云可返回蓝奏云下载直链
接口地址 httpss://hk2.0000721.xyz/api.php?api=getfile
返回格式 JSON
请求方式 GET
请求示例 https://cute521.cn/api.php?api=getfile&app=10000

请求参数说明

名称变量必填类型说明
接口 api 是 GET 固定填写 getfile
应用 app 是 GET 填写后台应用的 APPID
文件ID id 否 GET/POST 指定则只返回对应文件,不传则返回该应用下全部外链
时间戳 t 否 GET/POST 开启[时间差校验]时必须提交,服务端会校验与本地时间差
数据签名 sign 否 GET/POST 开启[数据签名]时必须提交,计算方式见开发文档

返回参数说明

名称类型说明
code Int 200 表示成功
msg Array 成功时返回文件列表数组
msg[].file_url String 文件下载地址(蓝奏云链接会自动解析为直链)
msg[].date String 文件添加时间
msg[].note String 文件备注说明
time Int 服务器时间戳
check String 二次校验值

返回示例

{
    "code": 200,
    "msg": [
        {
            "file_url": "https://example.com/download/app_v3.zip",
            "date": "2026-01-01 12:00:00",
            "note": "应用主程序包"
        },
        {
            "file_url": "https://example.com/download/patch.zip",
            "date": "2026-01-15 09:30:00",
            "note": "增量更新补丁"
        }
    ],
    "time": 1770000000,
    "check": "e10adc3949ba59abbe56e057f20f883e"
}

错误码格式说明

名称类型说明
101 String 应用不存在
102 String 应用已关闭
171 String 接口维护中
172 String 接口未添加或不存在
100 String 请绑定应用ID(未传 app 参数)
101 String 应用不存在
102 String 应用已关闭
104 String 签名为空
105 String 数据过期(客户端时间与服务器时间差超出限制)
106 String 签名有误
107 String 数据为空(加密模式下未提交 data)
108 String 未发现时间变量(开启时间差校验但未提交 t)
171 String 接口维护中
172 String 接口未添加或不存在
201 String 该应用下无外链

代码示例

// PHP 调用示例:获取应用外链文件
$appid  = "你的APPID";
$appkey = "你的APPKEY";
$params = [
    "api" => "getfile",
    "app" => $appid,
    "t"   => time(),
];
ksort($params);
$str = "";
foreach ($params as $k => $v) { $str .= $k . "=" . $v . "&"; }
$params["sign"] = md5($str . $appkey);

$url = "https://你的域名/api.php?" . http_build_query($params);
$res = json_decode(file_get_contents($url), true);
if ($res["code"] == 200) {
    foreach ($res["msg"] as $f) {
        echo $f["note"] . " => " . $f["file_url"] . "\n";
    }
}