What a token is
When you call the Tooken API to create a token, Tooken returns a signed credential string. Any service that holds this string can present it as a Bearer token to authenticate requests. Tokens are not your Tooken dashboard API key — they are distinct credentials you manage through Tooken.The raw token string (
token field) is shown only once at creation time. Tooken does not store it in recoverable form after that. Copy it to a secure secrets manager before closing the response.Token anatomy
Every token Tooken issues is represented as a JSON object. Here is a complete example:token object
| Field | Description |
|---|---|
id | Unique, stable identifier for this token. Format: tok_xxxxxxxxxxxxxxxxxxxxxxxx. Use this ID to revoke, rotate, or look up the token later. |
name | Human-readable label you assign at creation. Helps you identify the token in dashboards and audit logs. |
token | The raw credential string the holder presents in requests. Shown once at creation and never again. |
scopes | Array of permission strings that determine what this token can do. See Token scopes and access control. |
status | Current lifecycle state: active, expired, or revoked. |
created_at | ISO 8601 timestamp of when the token was issued. |
expires_at | ISO 8601 timestamp after which the token becomes invalid. null if you did not set an expiration. |
last_used_at | Timestamp of the most recent authenticated request made with this token. Useful for detecting stale credentials. |
created_by | The user ID of the Tooken account member who created the token. |
Token vs. API key
Tooken uses two distinct credential types. Understanding the difference prevents confusion:Token
A scoped, optionally time-limited credential you create through the Tooken API or dashboard. Issue one per service or integration. Revoke or rotate individually. Format:
tok_xxxxxxxxxxxxxxxxxxxxxxxx.API key
Your personal Tooken dashboard key. Use it to authenticate calls to the Tooken management API itself — for example, to create or revoke tokens. Format:
tok_live_xxxxxxxxxxxxxxxxxxxx. Guard this carefully; do not distribute it.Token lifecycle
A token moves through a defined set of states from the moment you create it:Created
You call
POST https://api.tooken.io/v1/tokens. Tooken returns the token object including the one-time-visible token string. Status is active.Active
The token is valid. Any holder can authenticate requests within the token’s scopes. Tooken updates
last_used_at on each successful use.Token statuses
| Status | Meaning | How it happens |
|---|---|---|
active | Token is valid and can authenticate requests | Default state after creation |
expired | Token passed its expires_at timestamp | Automatic, based on the expiration you set |
revoked | Token was explicitly invalidated | You or a team member called the revoke endpoint |
revoked or expired, Tooken does not restore it. Create a new token if you need to re-issue access.
Creating a token
Authenticate with your API key
Include your Tooken API key as a Bearer token in the
Authorization header of every management request.