GET /api-token
Get Api Token
GET
/api-token
Issue a long-lived API token for the calling user.
Creates a new JWT with context API scoped to the caller's permissions,
stores the token signature in the Token collection, and returns the
signed token in an AuthAPIResponse. The token's expiry is set to
token_expiration. Useful for server-to-server integrations and automation
scripts that cannot perform interactive login.
Emits: (direct transaction — no event class)
Required scope: org:api-token:create
Authorizations
OAuth2PasswordBearer
password Flow
Token URL
"/api/auth"Scopes:
"admin"User can access and edit users and system settings"library"User can access and edit products"production"User can access and edit production plans"operator"User can access the operator panel and make production declarations
Parameters
Query Parameters
token_description*
Type
Requiredstring
token_expiration*
Type
Requiredstring
Format
"date-time"Responses
Successful Response
application/json
JSON "status": 200, "message": "string", "detail": "string", "access_token": "string", "token_type": "string"
{
}