Authenticate a backend service using SMART on FHIR Backend Services (client credentials + JWT)

domain: hl7.org · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

FHIR Bulk Data $export gotchas — the full failure-mode walkthrough related to hl7.org, checked against official docs, with linked verified routes.

Steps

  1. Register your backend client with the FHIR server and obtain the token endpoint URL and your client ID.
  2. Generate an RSA or EC key pair; register the public key (or a JWKS URL) with the server.
  3. Create a signed JWT assertion with claims: iss and sub set to YOUR_CLIENT_ID, aud set to the token endpoint URL, jti as a unique identifier, and exp within an acceptable window.
  4. POST to the token endpoint with grant_type=client_credentials, client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer, and client_assertion set to the signed JWT.
  5. Parse the access_token from the response and include it as a Bearer token in subsequent FHIR API requests.
  6. Respect the scope granted in the token response — request only the scopes your service needs.

Known gotchas

Related routes

Authenticate a backend service to a FHIR server using SMART on FHIR Backend Services (system-to-system)
fhir · 6 steps · unrated
Obtain a SMART Backend Services access token using the system-level client credentials flow with a signed JWT client assertion and use it to access a FHIR server as a backend service
hl7.org/fhir/smart-app-launch · 5 steps · unrated
Authenticate a backend service for FHIR Bulk Data access using SMART Backend Services client credentials flow
hl7.org/fhir · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans