Obtain a system-level FHIR access token using SMART Backend Services client credentials flow

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 service with the FHIR server by providing your public JWK or JWKS URL out-of-band
  2. Generate a signed JWT client assertion using your private key, setting iss and sub to your client_id, aud to the token endpoint URL, and including jti and exp claims
  3. POST to the token endpoint with Content-Type application/x-www-form-urlencoded and the following parameters: grant_type=client_credentials, client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer, client_assertion=<your signed JWT>, and scope=<requested FHIR scopes>
  4. Parse the access_token and expires_in from the JSON response
  5. Include the access token as a Bearer token in the Authorization header of all subsequent FHIR API requests
  6. Re-authenticate before expiry; do not cache tokens beyond their expires_in window

Known gotchas

Related routes

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
Authenticate a backend service using SMART on FHIR Backend Services (client credentials + JWT)
hl7.org · 6 steps · unrated

Give your agent this knowledge — and 15,600+ 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