Skip to navigation

Create access token

Exchanges your long-lived API key for a short-lived JWT (30 minutes by default). Send the API key as Authorization: Bearer <api-key>; use the returned JWT as Authorization: Bearer <jwt> on every other endpoint.

Treat the API key like a password — keep it on a trusted backend and never ship it in a browser or mobile app.

Authentication

AuthorizationBearer

Your long-lived API key, sent as Authorization: Bearer <api-key> (format op_api_{id}_{secret}). Only valid on POST /api/v1/access-token. Every other endpoint requires a JWT.

Response

Access token created.
tokenstring

The access token. Send as Authorization: Bearer <token> on subsequent requests.

tokenTypeenum

Always Bearer.

Allowed values:
expiresIninteger
Number of seconds until the token expires.
expiresAtlong

Unix timestamp (milliseconds) when the token expires.

Errors

401
Unauthorized Error
500
Internal Server Error