Skip to main content
Olira uses two authentication mechanisms depending on the actor making the request.

API keys

API keys are created in the Olira Console and scoped to your organization. Each key can be assigned specific scopes to limit access to only the endpoints your integration requires. Send your API key as a Bearer token in the Authorization header on every request:
API keys are shown only once at creation. Store them in an environment variable or secrets manager, never in source control.

Scopes

Each API key carries one or more scopes that limit what it can do. Assign only the scopes your integration needs.

Patient tokens

A Patient Token is a short-lived JWT (15 minutes) scoped to a single patient. Use it when a patient device or client-side app needs to call Olira directly (for example, when connecting to the MCP Patient State server from a mobile app). Patients are never issued API keys. Instead, your backend mints a token on their behalf and forwards it. The token is locked to the patient server-side (the recipient cannot access any other patient’s data).
Patient Tokens expire after 15 minutes. Your backend should mint a fresh token on each session (do not cache them long-term).