列出成员 API Key

GET/enterprise/v1/sub-accounts/{subAccountId}/api-keys

仅返回推理 Key 元数据,不返回明文密钥或用量计数。单 Key 消费及剩余额度请使用该推理 Key 调用 GET /v1/key。

身份验证

MANAGEMENT / PROVISIONING Key;tenant:keys:read

Authorization: Bearer <CONTROL_KEY>

路径中的 subAccountId 必须属于当前企业;hash 是 Key 元数据标识,不能传明文密钥。

审批与重试指南

路径参数

subAccountIdstringrequired

10-digit public member ID / 10 位成员编号

响应

HTTP 200; code: 200. 以下为示例值,字段使用 camelCase。

codeinteger

200

dataarray
data.hashstring
data.namestring
data.keyDisplaystring
data.workspaceCodestring
data.statusstring
data.allowedIpsarray
data.spendLimitnumber
data.limitResetstring
data.expiresAtstring | null
data.createdAtstring

错误处理

检查 HTTP 状态和 code,失败时读取 serviceCode、msg、traceId。无效凭证无法读取数据;缺少 scope 返回 API_KEY_SCOPE_DENIED。跨企业资源不可访问。不要把 202 接受或审批待处理当作业务完成。

请求

Shell
1curl -X GET "https://api.token360.ai/enterprise/v1/sub-accounts/{subAccountId}/api-keys" \
2  -H "Authorization: Bearer $CONTROL_KEY"

响应

JSON
1{
2  "code": 200,
3  "msg": "success",
4  "data": [
5    {
6      "hash": "<KEY_HASH>",
7      "name": "service-key",
8      "keyDisplay": "sk-…",
9      "workspaceCode": "DEFAULT",
10      "status": "ACTIVE",
11      "allowedIps": [],
12      "spendLimit": 100,
13      "limitReset": "monthly",
14      "expiresAt": null,
15      "createdAt": "2026-11-03T00:00:00Z"
16    }
17  ]
18}
此页面对您有帮助吗?
列出成员 API Key · Token360