Create API Key
Create新的 API Key,并只返回一次明文 Token。
/api/open/v1/keysEndpoint Overview
Create新的 API Key,并只返回一次明文 Token。
Authentication
Authorization: Bearer <token>api_keys:writeRequest Body
API Key 名称。
Create到哪个环境,默认 test。
要授予该 Key 的 scopes;不传时默认只给读取类 scopes。
Response
固定为 open_api.key.create。
新建后的 Key 信息。
API Key ID。
API Key 名称。
所属环境。
当前 Key 具备的 scopes。
Key 状态。
Token 前缀。
Token 后四位。
掩码后的 Token 展示值。
Creation time.
Updated time.
最近使用时间。
最近使用 IP。
最近使用的 User-Agent。
撤销时间。
新签发的明文 Token,只会返回一次。
Common Errors
Missing or invalid Bearer token.
The current token hit a rate limit.
当前 API Key 不存在,或已被清理。
Notes
- Create成功后请立即持久化 token。后续只能看到 maskedToken,无法再次读取明文。