Tokens
Mint a user token
POST
Returns an opaque ohs_ut_ token for one active user, shown only in this response
(Cache-Control: no-store). Lifetime: one hour by default, at most 24 hours; a token
whose only scope is read may live up to 30 days (2592000 s), for a person's own AI
agent configuration (MCP). Idempotency-Key is ignored here.
tenantKeyheader
AuthorizationBearer <token>Tenant API key, ohs_sk_ + 43 base62 characters.
id*stringFormat
uuidapplication/json- body
scopes*array<>Items
1 <= itemsttl_seconds?integerLifetime in seconds. 0 or absent means 3600. At most 86400, or 2592000 (30 days) when read is the only scope.
Range
0 <= value <= 2592000Minted.
application/json- response
token*stringohs_ut_ token. Shown only once.
expires_at*stringFormat
date-timescopes*array<>curl -X POST 'http://localhost:8080/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/tokens' \ -H 'Authorization: Bearer ohs_sk_...' \ -H 'Content-Type: application/json' \ -d '{ "scopes": [ "upload" ]}'{ "token": "string", "expires_at": "2019-08-24T14:15:22Z", "scopes": [ "upload" ]}