This guide is for connecting Epic with the Backend Systems (JWT) authentication.
Your app settings are in Epic on FHIR > Build Apps. Open your app and make sure Backend Systems is selected as the application audience and Use OAuth 2.0 is checked.
Required Credentials
You will need to provide the following information:
- Client ID: Shown on your app's page in Epic on FHIR. Use the Non-Production Client ID for the Sandbox environment and the Client ID for the Production environment.
-
Private key: The private key file (.pem) whose public key is hosted at your app's JWK Set URL. Paste the whole file, including the
-----BEGIN PRIVATE KEY-----and-----END PRIVATE KEY-----lines. RSA and EC (P-384) keys are supported.
Note: Epic never stores your private key. If you don't have it, ask the person who created the key pair for your app. - Key ID: The kid value of the matching key in your JWK set. Open your JWK Set URL in a browser and copy the kid of the key that matches your private key.
-
FHIR base URL (Production only): Your organization's Epic endpoint, up to and including /interconnect-fhir-oauth.
e.g. https://your-org.epic.com/interconnect-fhir-oauth
You can find it in Epic's list of organization endpoints or ask your Epic team. If the listed URL ends in /api/FHIR/R4, leave that part out.
Before you connect
- Production only: Your organization's Epic administrator must link your app's Client ID to an Epic user account. Epic won't let the app sign in until this is done. The Sandbox doesn't need this step.
- If you just added or changed the JWK Set URL or key, wait for Epic to sync it: up to 60 minutes for the Sandbox and up to 12 hours for Production.
For more detailed instructions, visit the official Epic documentation: Epic Backend OAuth 2.0 Guide