client_credentials grant for system-to-system access.
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