---
title: "Token endpoint"
method: POST
path: "/auth/realms/fhir/protocol/openid-connect/token"
tags: ["Authentication"]
---

# Token endpoint

`POST /auth/realms/fhir/protocol/openid-connect/token`

Exchange an authorization `code` for tokens, refresh a token, or obtain a `client_credentials` token. Send `client_id`/`client_secret` in the body (`client_secret_post`).

## Response `200`

Token response

- object
  - `access_token` string
  - `token_type` string
  - `expires_in` integer
  - `refresh_token` string — Present when offline_access is granted
  - `scope` string
  - `id_token` string — Present when the openid scope is requested

---

[API](https://skmtc.net/modmed/apis/ema-proprietary-api-authentication.md) · [All operations](https://skmtc.net/modmed/apis/ema-proprietary-api-authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/modmed/ema-proprietary-api-authentication/revisions/2c8b6a756f84/schema)
