Users: API Tokens
🔒 Выдача персонального API-токена (PAT) для доступа агентов/интеграций от имени пользователя. Сырой токен возвращается только один раз.
Выдача персонального API-токена (PAT) для доступа агентов/интеграций от имени пользователя. Сырой токен возвращается только один раз.
Access: authorized (10 ) · Scope: write · только веб-сессия
Allows: user:ai-tokens (все обязательны; ресурс — <тип>ID / ID из запроса, user:* — userID или сам пользователь)
TypeScript (copy-paste)
POST /user/token/create
<details open><summary><b>Body</b></summary>export interface UserTokenCreateBody {
title: string
/** Day key (YYYYMMDD or internal day index) */
expDayKey?: number | null
scopes?: Array<any> | null
cID?: string | null
type?: ApiToken_type | null
}
</details>
<details open><summary><b>Response</b></summary>
export type UserTokenCreateResponse = IServerResponse<Resp_user_token_create>
export interface IServerResponse<T = any> {
code: number
data: T
srvTS: number
rkey: string
}
</details>
Полный файл типов: /docs/types · raw: /docs/api-types.ts
post/user/token/create
Request
- Base URL: http://localhost
- URL: http://localhost/user/token/create
- Auth: API key in header sid and API key in header rts and API key in header sig
Headers
devIDstring uuid required
UUID устройства клиента
tzstring required
Example:Europe/Moscow
Таймзона клиента (IANA или offset)
appstring required
Example:kosmodrom-web
Имя клиентского приложения
appVerstring required
Example:1.0.0
Версия клиента
rKeystring
Уникальный ключ запроса для логов/саппорта
Request body
Response
OK — IServerResponse<Resp_user_token_create>
Example response
{
"code": 200
}Changes
No recorded changes to this operation across all 1 revision of this API.