AixLnyt/skport-api-docs

GitHub: AixLnyt/skport-api-docs

一份非官方的《明日方舟:终末地》Skport/Gryphline API 接口文档,涵盖认证流程、签名算法及游戏数据、签到、Wiki 和抽卡记录等全部端点的详细说明。

Stars: 10 | Forks: 0

# Skport / Gryphline API 文件 [English](./README_EN.md) ## Domains | Domain | 用途 | |--------|------| | `as.gryphline.com` | 帐号认证、OAuth | | `ef-webview.gryphline.com` | 抽卡记录、卡池 metadata | | `web-api.skport.com` | ACCOUNT_TOKEN 刷新 | | `zonai.skport.com` | 所有游戏资料 API | | `static.skport.com` | 静态资源(图片 CDN) | | `game.skport.com` | 游戏内工具页面 | ## 认证流程 ### 0. 账号密码登录(可选) ``` POST as.gryphline.com/user/auth/v1/token_by_email_password Header: x-language: zh-tw Body: { email, password, captchaToken } → ACCOUNT_TOKEN ``` ### 0.5. 验证 ACCOUNT_TOKEN 有效性 ``` GET as.gryphline.com/user/info/v1/basic Header: Authorization: Bearer {ACCOUNT_TOKEN} → 確認 token 有效(basicUser 資料) ``` ### 1. OAuth Grant ``` POST as.gryphline.com/user/oauth2/v2/grant Body: { token: ACCOUNT_TOKEN, appCode: "6eb76d4e13aa36e6", type: 0 } → code ``` ### 2. 生成 cred ``` POST zonai.skport.com/web/v1/user/auth/generate_cred_by_code Body: { kind: 1, code } → cred ``` ### 3. 刷新取得 salt ``` GET zonai.skport.com/web/v1/auth/refresh Header: cred → salt(用於所有需要簽名的 API) ``` ## 签名算法 ### V2(主要端点用) ``` headerJson = { platform:"3", timestamp:"...", dId:"", vName:"1.0.0" } sign = MD5( HEX( HMAC-SHA256( path + body + timestamp + headerJson, salt ) ) ) ``` ### V1(轻量端点用) ``` sign = MD5( path + query + timestamp + salt ) ``` **自动选择规则**:以下 path 使用 V2,其余使用 V1: - `/api/v1/game/player/binding` - `/api/v1/game/endfield/card/detail` - `/web/v1/wiki/*` - `/web/v1/game/endfield/enums` - `/web/v1/game/endfield/attendance*` - `/web/v2/*` | 请求类型 | body 值 | |----------|---------| | GET(无 params) | 空字符串 `""` | | GET(有 query params) | query string,例如 `roleId=xxx&serverId=yyy` | | POST | JSON 字符串 | ## 标准 Headers ``` Content-Type: application/json User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 sec-ch-ua: "Google Chrome";v="145", "Not-A.Brand";v="99" sec-ch-ua-mobile: ?0 sec-ch-ua-platform: "Windows" sec-fetch-dest: empty sec-fetch-mode: cors sec-fetch-site: same-site # gryphline 域名改為 cross-site Origin: https://game.skport.com Referer: https://game.skport.com/ sk-language: zh-tw # gryphline 域名改用 x-language: zh-tw ``` ## 游戏 API(zonai.skport.com) ### 取得绑定角色列表 ``` GET zonai.skport.com/api/v1/game/player/binding 簽名: 需要(V2,body="") ``` **返回结构** ``` { "data": { "list": [ { "appCode": "endfield", "bindingList": [ { "defaultRole": { "roleId": "...", "serverId": "...", "nickname": "...", "level": 0, "serverName": "..." }, "roles": [] } ] } ] } } ``` ### 取得完整游戏资料卡 ``` GET zonai.skport.com/api/v1/game/endfield/card/detail Params: roleId, serverId(uid 可選) Header: sk-game-role = "3_{roleId}_{serverId}" 簽名: 需要(V2,body = query string) ``` **返回结构 `detail`** ``` detail ├── base ├── chars[] ├── achieve ├── spaceShip │ └── rooms[] ├── domain[] ├── dungeon ├── bpSystem ├── dailyMission ├── config └── quickaccess[] ``` **`base` 字段** | 字段 | 说明 | |------|------| | `roleId` | UID | | `name` | 玩家名称 | | `serverName` | 服务器名称 | | `level` | 权限等阶 | | `worldLevel` | 探索等级 | | `exp` | 当前经验值 | | `gender` | 主角性别(1=男 2=女) | | `avatarUrl` | 头像图片 URL | | `mainMission.description` | 使命纪事文字 | | `charNum` | 干员数量 | | `weaponNum` | 武器数量 | | `docNum` | 文档数量 | | `createTime` | 苏醒日(timestamp) | | `lastLoginTime` | 最后登录(timestamp) | | `saveTime` | 资料储存时间(timestamp) | **`dungeon` 字段** | 字段 | 说明 | |------|------| | `curStamina` | 当前理智 | | `maxStamina` | 最大理智 | | `maxTs` | 理智满溢时间点(timestamp) | **`bpSystem` 字段** | 字段 | 说明 | |------|------| | `curLevel` | 通行证当前等级 | | `maxLevel` | 通行证最大等级 | **`dailyMission` 字段** | 字段 | 说明 | |------|------| | `dailyActivation` | 每日任务当前进度 | | `maxDailyActivation` | 每日任务上限 | **`achieve` 字段** | 字段 | 说明 | |------|------| | `count` | 光荣之路数量(英译未查证,暂译 Glory Road) | **`spaceShip.rooms[]` 字段** | 字段 | 说明 | |------|------| | `type` | 房间类型(`0` = 总控中枢,英译未查证) | | `level` | 房间等级 | **`chars[]` 字段** ``` chars[] ├── charData │ ├── id │ ├── name │ ├── avatarSqUrl # 方形頭像 │ ├── avatarRtUrl # 圓形頭像 │ ├── illustrationUrl # 立繪 │ ├── rarity.key # rarity_6 / rarity_5 / rarity_4 / rarity_3 │ ├── profession.value # 官方六大職業:先鋒/近衛/重裝/術師/狙擊/醫療 │ │ # → Vanguard/Guard/Defender/Caster/Sniper/Medic │ │ # (請依實際 API 回傳字串核對) │ ├── property.value # 元素屬性 │ ├── weaponType.value # 武器類型 │ ├── skills[] │ │ ├── id, name │ │ ├── type.key # skill_type_normal_attack / normal_skill / combo_skill / ultimate_skill │ │ ├── iconUrl │ │ └── desc │ ├── labelType # label_type_up(限定)等 │ └── tags[] ├── id ├── level ├── evolvePhase # 精英化階段(0–4),官方英譯為 Promotion ├── potentialLevel # 潛能(0–5) ├── userSkills{} # { skillId: { level, maxLevel } } ├── bodyEquip # 護甲 ├── armEquip # 護手 ├── firstAccessory # 配件1 ├── secondAccessory # 配件2 ├── tacticalItem # 戰術道具 ├── weapon │ ├── weaponData{ id, name, iconUrl, rarity, type, skills[], labelType } │ ├── level │ ├── refineLevel # 武器潛能(0–5) │ ├── breakthroughLevel # 武器突破(0–4) │ └── gem{ id, icon } ├── gender └── ownTs # 獲得時間(timestamp) ``` **`domain[]` 字段** ``` domain[] ├── name # 地區名稱 ├── level # 地區等級 ├── settlements[] │ ├── name # 據點名稱 │ └── level # 據點等級 └── collections[] ├── puzzleCount # 謎質(英譯未查證,暫譯 Enigma Matter) ├── trchestCount # 儲藏箱(英譯未查證,暫譯 Storage Chest) ├── pieceCount # 維修靈感點(英譯未查證,暫譯 Repair Inspiration Point) └── blackboxCount # 黑匣子(英譯未查證,暫譯 Black Box) ``` **`quickaccess[]` 字段** | 名称 | 说明 | |------|------| | 养成建议 | `game.skport.com/tools/endfield/list?routeId=1` | | 编队推荐 | `game.skport.com/tools/endfield/list?routeId=0` | | 地图工具 | `game.skport.com/map/endfield` | ### 取得游戏枚举常数 ``` GET zonai.skport.com/web/v1/game/endfield/enums 簽名: 需要(V2,body="") ``` ### 每日签到 ``` GET zonai.skport.com/web/v1/game/endfield/attendance → 取得本月簽到日曆(已簽天數、獎勵清單) POST zonai.skport.com/web/v1/game/endfield/attendance → 執行當日簽到(body = "{}") GET zonai.skport.com/web/v1/game/endfield/attendance/records → 取得歷史簽到紀錄 ``` ### Wiki 资料库 ``` GET zonai.skport.com/web/v1/wiki/char-pool → 當前角色卡池 metadata(含 up6_name) GET zonai.skport.com/web/v1/wiki/weapon-pool → 武器卡池 metadata GET zonai.skport.com/web/v1/wiki/item/catalog → 道具資料庫(全清單) GET zonai.skport.com/web/v1/wiki/item/info?id={item_id} → 特定道具詳情 ``` ### 取得用户基本资料 ``` GET zonai.skport.com/web/v2/user 簽名: 需要(V2,body="") ``` **返回结构** ``` { user ├── basicUser │ ├── id # 平台 UID │ ├── nickname # 暱稱 │ ├── profile # 自介(可能為空字串) │ ├── avatar # 頭像 URL │ ├── avatarCode │ ├── gender # 0=未設定 │ ├── birthday # timestamp │ ├── status │ ├── identity │ ├── createdAt # 帳號建立時間 │ └── latestLoginAt # 最後登入時間 ├── pendant │ ├── id │ ├── iconUrl │ ├── title # 頭像框名稱 │ └── description └── background # 可能為 null userRts ├── follow # 追蹤數 ├── fans # 粉絲數 └── liked # 獲讚數 userSanctionList[] userInfoApply{} moderator{} } ``` ## 抽卡记录 API(ef-webview.gryphline.com) **URL 通用参数** | 参数 | 说明 | |------|------| | `token` / `u8_token` | 从游戏客户端导出的认证 token | | `server_id` / `server` | 服务器 ID(Global = `2`) | | `lang` | 语言(默认 `en-us`) | ### 取得卡池 metadata ``` GET ef-webview.gryphline.com/api/content Params: token, server_id, lang → 卡池資訊(含 up6_name、up6_item_name,可用於 featured 偵測) ``` ### 角色抽卡记录 ``` GET ef-webview.gryphline.com/api/record/char Params: token, server_id, lang, seq_id(分頁游標,首次傳 0) → 角色抽卡紀錄列表 ``` ### 武器卡池列表 ``` GET ef-webview.gryphline.com/api/record/weapon/pool Params: token, server_id, lang → 所有武器卡池清單(取得各池的 pool_id) ``` ### 武器抽卡记录 ``` GET ef-webview.gryphline.com/api/record/weapon Params: token, server_id, pool_id, lang, seq_id(分頁游標) → 指定武器卡池的抽卡紀錄 ``` **Pity 分组规则** | 类型 | Pity Group | |------|------------| | 限定 / 特别卡池 | `SpecialShared`(所有限定池共享) | | 新手卡池 | `Beginner`(独立计算) | | 常驻池 | 依 `poolId` 各自独立 | ## 游戏术语对照 | 终末地术语 | 字段 | 说明 | 上限 | |-----------|------|------|------| | 精英化(英译:Promotion) | `evolvePhase` | 干员突破 | E4 | | 潜能(英译:Potential) | `potentialLevel` | 干员命座 | 5 | | 武器潜能(英译:Weapon Potential) | `refineLevel` | 武器命座 | 5 | | 武器突破(英译:Weapon Breakthrough) | `breakthroughLevel` | 武器突破阶段 | 4 | | 技能:普攻 | `skill_type_normal_attack` | — | — | | 技能:技能 | `normal_skill` | — | — | | 技能:联合技 | `combo_skill` | — | — | | 技能:终结技 | `ultimate_skill` | — | — | | 限定干员 | `labelType: label_type_up` | — | — | **官方六大职业中英对照**(已查证): | 中文 | English | |------|---------| | 先锋 | Vanguard | | 近卫 | Guard | | 重装 | Defender | | 术师 | Caster | | 狙击 | Sniper | | 医疗 | Medic |
标签:API文档, API签名算法, OAuth认证, 明日方舟:终末地, 游戏API, 逆向分析, 鹰角网络