---
title: "生成 API Playground 测试 JWT"
method: POST
path: "/tenants/{id}/api-principal-test-token"
tags: ["空间管理"]
---

# 生成 API Playground 测试 JWT

`POST /tenants/{id}/api-principal-test-token`

使用空间已保存的 HMAC 密钥签发短期外部用户 JWT（Owner）

## Path parameters

- `id` integer, required

## Request body

- InternalHandlerApiPrincipalTestTokenRequest
  - `expires_in_seconds` integer
  - `external_user_id` string

## Response `200`

短期 JWT

- object

## Other responses

- `400` — 请求参数错误
- `403` — 权限不足

---

[API](https://skmtc.net/tencentblueking/apis/weknora-api.md) · [All operations](https://skmtc.net/tencentblueking/apis/weknora-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tencentblueking/weknora-api/versions/d6921ae22ce0/schema)
