Skip to content

获取访问码

GET/web/v1/workspaces/{workspaceId}/institutions/{institutionBizId}/portals/portal-types/{portalType}/access-codeWEB

获取指定 Portal 类型的当前访问码。访问码以脱敏格式返回。

鉴权

需要有效的 JWT token。网关验证:enableJwtToken=trueenableTurnstile=false

请求参数

路径参数

NameTypeRequiredInDescription
workspaceIdstringYespath工作空间业务 ID
institutionBizIdstringYespath机构业务 ID
portalTypeintegerYespathPortal 类型代码(例如:10010101=system、10010102=tenant)

成功响应

成功200
{
  "code": "2000",
  "message": "SUCCESS",
  "data": {
    "accessCode": "pac_****abcd",
    "institutionBizId": "inst_abc123",
    "portalType": 10010102,
    "expiresAt": "2026-06-21T00:00:00Z",
    "rotatingCode": null,
    "rotatingCodeExpiresAt": null
  }
}

错误响应

错误码描述
4010未授权(无效或缺少 JWT token)
4040Portal 或访问码未找到

说明

  • 出于安全考虑,访问码已脱敏。仅显示前 4 位和后 4 位字符。
  • rotatingCode 字段在访问码轮转过渡期间填充。

内部文档