To setup your Epic app in Cobalt for OAuth, you will need the following credentials from your Epic Developer account:

  • Client ID
  • Client Secret
  • Scopes

Pre-requisites

  1. Epic Developer account. You can create one here.
If you haven’t already created an app in Epic, you’d need to create one.

Creating an app in Epic

To create a Epic app and aquire the above mentioned credentials, please follow the steps mentioned below:

  1. Log in to your Epic Developer account.
  2. Select the Build Apps tab in the top nav bar and click on Create button.
  1. Enter the unique Application Name and select Clinicians or Administrative Users as Application Audience.
  2. Go to your Apps catalog in Cobalt > Search for Epic > Settings > Use your credentials > Callback Url > Copy it. Paste the Callback URL under Redirect URI in the app.
  3. Checkmark the Is Confidential Client and Requires Persistent Access boxes.
  4. Select the required scopes in the Available section.
  1. Copy the Non-Production Client ID. Click on Generate Secret, copy the Client Secret generated and click on Store Hash button.

Save the Client Secret displayed as it will be shown only once.

Configuring credentials in Cobalt

App settings page lets you configure the authentication settings for an OAuth 2.0 based application. For your customers to provide you authorization to access their data, they would first need to install your application. This page lets you set up your application credentials.

Cobalt lets you use pre-configured applications to play around. You can do so by selecting Use our credentials. However, if you wish to use your own application, select Use your own credentials. Provide the aquired Client Id and Client secret and save it.

Configuring Scopes

Cobalt lets you configure what permissions to ask from your users while they install your application. The scopes can be added or removed from the App settings page, under Permissions & Scopes section.

For some applications Cobalt sets mandatory scopes which cannot be removed. Additional scopes can be selected from the drop down. Cobalt also has the provision to add any custom scopes supported by the respective platform.

All the scopes listed are R4 version Scopes in Cobalt.

Once the scopes has been added to the application in Cobalt, go to your Epic Developer Account and update the scopes as added on Cobalt.

Epic usually takes around 30 mins for any changes in the OAuth app to work.

Select the OAuth App created for Cobalt > Add the scopes under Available as added in Cobalt > Click on Save and Ready for Sandbox.

If you are facing scopes missing or invalid scope error. Make sure you are not passing any custom scope not supported by the platform.

Actions and triggers

Once the above setup is completed, you can create orchestrations of your use-cases using Epic actions and triggers. Following are the set of Epic actions and triggers supported by Cobalt.