API 参考 / api-tokens
GET /api/v1/projects/{projectId}/api-tokens · listAPITokens
列出当前用户在该项目的 API Token;具备 manage_project_settings 的项目管理员可看本项目全部 token。 仅返回 prefix 与元数据,永不回显明文。PAT 不可调用本端点。
本接口要求浏览器会话。Bearer API Token 无法调用——Token 的生命周期管理必须在网页端完成。
projectId(必填)items(必填)items[].id(必填)items[].userId(必填)items[].projectId(必填)items[].name(必填)items[].tokenPrefix(必填)items[].scopes(必填)items[].expiresAtitems[].lastUsedAtitems[].revokedAtitems[].createdAt(必填)401:Problem 错误响应403:Problem 错误响应curl -X GET "https://你的项目.workflow.games/api/v1/projects/{projectId}/api-tokens" \
-H "Authorization: Bearer wfp_…"HTTP/1.1 200
{
"items": [
{
"id": "018f3c2e-0000-7000-8000-000000000000",
"userId": "018f3c2e-0000-7000-8000-000000000000",
"projectId": "018f3c2e-0000-7000-8000-000000000000",
"name": "示例标题",
"tokenPrefix": "示例文本",
"scopes": [
"read_only"
],
"createdAt": "示例文本"
}
]
}合同真值:OpenAPI 3.1(0.1.0)。
相关:Agent 接入指南 · 使用指南 · API 参考索引