Get patient token
Mints a short-lived JWT scoped to one patient (default ~15 minutes).
POST
sdk:patient-token
Use as Bearer token with the Patient State MCP server.
Parameters
Olira patient id to lock the token to.
Returns
PatientToken
JWT string.
Typically “bearer”.
Lifetime in seconds.
Granted OAuth scopes for this token.
Raises
| Exception | When |
|---|---|
AuthError | HTTP 401 or 403 — invalid API key or insufficient OAuth scope for this endpoint. |
ValidationError | HTTP 400, 404, or 422 — malformed JSON, unknown patient, or validation failure (message includes response excerpt). |
ServerError | HTTP 409 (e.g. conflicting external identifier) or repeated 5xx after retries; includes status_code when applicable. |
RateLimitError | HTTP 429 — rate limited; check retry_after (seconds). |
NetworkError | Connection timeout, DNS failure, or read error after retries. |
Previous
get_stable_dataReads stable (slow-changing) modules: demographics, condition_diagnosis, medications, user_preferences.
Next

