获取 Turnstile 配置
GET
/web/v1/system/workspaces/{workspaceId}/institutions/{institutionBizId}/portals/turnstile WEB获取指定机构的 Cloudflare Turnstile 配置。
鉴权
需要有效的 JWT token 并拥有 platform:institution:read 权限。网关验证:enableJwtToken=true,enableTurnstile=false。
请求参数
路径参数
| Name | Type | Required | In | Description |
|---|---|---|---|---|
workspaceId | string | Required | path | 工作空间业务 ID |
institutionBizId | string | Required | path | 机构业务 ID |
成功响应
成功 200
{
"success": true,
"code": "2000",
"message": "SUCCESS",
"data": {
"id": 1,
"institutionBizId": "INST_ACME_001",
"turnstileSiteKey": "0x4AAAAAAABkMYinukE8nMDQ",
"turnstileSecretKey": "****nMDQ",
"enabled": true,
"remark": "生产环境 Turnstile",
"createdAt": "2026-03-21T00:00:00Z",
"updatedAt": "2026-03-21T00:00:00Z"
}
}响应字段
| 字段 | 类型 | 描述 |
|---|---|---|
id | number | 内部记录 ID |
institutionBizId | string | 机构业务 ID |
turnstileSiteKey | string | Cloudflare Turnstile 站点密钥(完整值) |
turnstileSecretKey | string | 脱敏后的私密密钥(仅显示最后 4 位,如 ****nMDQ) |
enabled | boolean | Turnstile 验证是否已启用 |
remark | string|null | 配置备注 |
createdAt | string | ISO 8601 创建时间 |
updatedAt | string | ISO 8601 最后更新时间 |
错误响应
| 错误码 | 描述 |
|---|---|
4010 | 未授权(无效或缺少 JWT token) |
4040 | 机构或 Turnstile 配置未找到 |
说明
- 出于安全考虑,
turnstileSecretKey在响应中已脱敏。仅显示最后 4 位字符(格式:****xxxx)。 enabled字段表示 Turnstile 是否正在强制执行。使用启用 Turnstile / 禁用 Turnstile 接口进行切换。