TokenCreated
The `TokenCreated` entity.
Definition
TypeScript
interface TokenCreated {
id: string;
key: string;
keyHint: string;
type: "session";
workspaceId: string;
scopes: {
operations?: Array<string> | undefined;
entityIds?: Array<string> | undefined;
};
expiresAt: string;
}Fields
| Field | Type | Notes |
|---|---|---|
id | string | readonly required |
key | string | required — Full plaintext session token value — returned only once at creation time. |
keyHint | string | required — Last few characters of the token, safe to display. |
type | "session" | required — Always 'session' for tokens. |
workspaceId | string | required — Workspace the token is scoped to. |
scopes | { operations?: Array<string> | undefined; entityIds?: Array<string> | undefined; } | required — Operation and entity scopes the token is restricted to. |
expiresAt | string | required — ISO-8601 timestamp after which the token is rejected. |