Authorization Code + PKCE flows (SMART App Launch and OIDC).
Authorization endpoint (redirect)
Browser redirect endpoint for the Authorization Code + PKCE flow. This is
not a callable API endpoint; the user-agent is redirected here and
ultimately returned to your redirect_uri with a code. For SMART launches,
include aud (FHIR base URL) and, for EHR launches, launch.
query Parameters
response_typeclient_idredirect_uriscopestatecode_challengecode_challenge_methodaudFHIR base URL (SMART). Sent as the audience of the resulting token.
launchLaunch context id from POST /oauth/smart/launch (EHR launch only).
Authorization endpoint (redirect) › Responses
Redirect back to redirect_uri with code and state.
Token endpoint
Exchanges credentials for an access token. Supports three grants:
authorization_code(App Launch / OIDC) with PKCEcode_verifierrefresh_tokenclient_credentials(Backend Services; requirestenant_idfor anysystem/*scope, andaudset to the FHIR base URL for the token to be accepted by the FHIR API)
Confidential clients authenticate with client_secret_post or client_secret_basic.
Rate limited per client IP: 15 requests/second and 60 requests/minute.
Exceeding either limit returns 429 Too Many Requests until the rate drops.
A well-behaved client that caches tokens for their lifetime stays far below
these limits.
Token endpoint › Request Body
grant_typecodeauthorization_code grant
redirect_uriauthorization_code grant
code_verifierPKCE (authorization_code grant)
refresh_tokenrefresh_token grant
client_idclient_secretConfidential clients (client_secret_post)
scopeclient_credentials grant; system/* scopes
tenant_idRequired for any system/* scope (client_credentials)
audclient_credentials grant: the FHIR base URL (e.g. https://au.fhir.innowell.org/fhir/R4). Without it the token's audience is your client_id and the FHIR API rejects it with 401.
Token endpoint › Responses
Token response
access_tokenRS256 JWT
token_typeexpires_inSeconds. ~900 for user tokens, ~120 for system tokens.
scoperefresh_tokenid_tokenOIDC / SMART App Launch only
patientFHIR patient id, when a launch context is attached
Mint a SMART launch context (EHR launch)
Creates a short-lived (5 min) launch context bound to a patient, the
bearer-authenticated user, and the user's current tenant. patient_id is the
Innowell role id of the patient (a Role with role_type=INDIVIDUAL), not the
FHIR resource id. Pass the returned launch_id as the launch parameter to
/oauth/authorize. When the OAuth application has a registered launch_uri,
a fully-formed launch_url is also returned.
Only clinicians and lead clinicians may mint a launch context — sharing a
patient's clinical record with a partner is a clinical judgement. Callers
holding only manager, administrator, or owner roles receive
403 insufficient_role.
Mint a SMART launch context (EHR launch) › Request Body
patient_idInnowell role id of the patient.
Mint a SMART launch context (EHR launch) › Responses
Launch context created