SSoma HealthFHIR API
API reference

POSTGet an access token

Exchange a signed client assertion for a 5-minute access token.

POST[base]/auth/tokenForm-encoded. Returns an access token. See Authentication for building the assertion.
Form fieldRequiredValue
grant_typeYesclient_credentials
client_assertion_typeYesurn:ietf:params:oauth:client-assertion-type:jwt-bearer
client_assertionYesYour signed JWT.
scopeYesSpace-separated system scopes, e.g. system/Appointment.rs system/Slot.rs.
client_idNoIf sent, it must match the assertion's iss.
Request
curl -X POST https://qa3.somahealth.com/api/fhir/r4/your-practice/auth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "grant_type=client_credentials" \
  --data-urlencode "scope=system/Slot.rs" \
  --data-urlencode "client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer" \
  --data-urlencode "client_assertion=$ASSERTION"
200 response
{
  "access_token": "q2ZkY3Vt…",
  "token_type": "bearer",
  "expires_in": 300,
  "scope": "system/Slot.rs"
}
400 response
{
  "error": "invalid_scope",
  "error_description": "None of the requested scopes is allowed. Ask for system/{Resource}.rs (or .read) for resources the practice gave this app."
}

Responses carry Cache-Control: no-store. Each assertion's jti can be used once.