Skip to main content
Short-lived API tokens are JWTs issued from your static API key. They have an expiration time and an optional request limit. Use them when you need to give a time-bound credential to a client (e.g. server issuing tokens for a frontend or worker) without sharing your main API key.
Always use Bearer. When calling any Mobula API with a short-lived token, send it in the header as Authorization: Bearer <token>. Do not use the x-api-key header for short-lived tokens.
All endpoints below require your static API key in the request (e.g. Authorization: YOUR_API_KEY or x-api-key: YOUR_API_KEY). Short-lived tokens are available on Startup, Growth, and Enterprise plans.

Create tokens

POST /api/2/auth/tokens Creates one or more short-lived tokens. Each token is returned once; store it securely.

Request body

You must provide at least one of the following fields.

Example

Response

The token value is returned only once. Store it securely; you cannot retrieve it again.
Use the token value in subsequent API calls as:
Rate limit: Up to 5 token-creation requests per minute per API key.

List tokens

GET /api/2/auth/tokens Returns all active short-lived tokens for your API key. The token secret is not returned.

Example

Response


Inspect one token

GET /api/2/auth/token?token=<jwt> Returns metadata for a single short-lived token by its JWT string. Requires your static API key and the token query parameter set to the full JWT.

Query parameters

Example

Response


Revoke a token

DELETE /api/2/auth/tokens/:id Revokes a short-lived token by its id. The token stops working immediately.

Path parameters

Example

Response


Using a short-lived token on other endpoints

After creating a token, use it for any Mobula API call by sending it only in the Bearer header:
Do not send the short-lived token in x-api-key. Use Authorization: Bearer <token> only.

Authentication overview

Back to API key and short-lived token overview