Configure Access with OAuth 2.0

You can use any standard FHIR® API server with OAuth 2.0 for authorization to secure your API endpoints and make them accessible to consumer applications. To get started, you'll need to create a 1upHealth developer account, create a new application, and get the tokens for your new application. After you complete these steps, you can pull clinical data from electronic health record (EHR) systems.

Set Up & Registration

For the FHIR Server that you want to connect to, you must have a client_id and client_secret. If you want OAuth client keys to the 1upHealth API, you must first create an account, and then go to the 1up Developer Console and create a new application. For more information about this process, see Register & Create an Application.

After you complete the initial setup and registration steps, you can use the following code to connect to the FHIR Server.

client_id = 'clientidclientidclientid' 
client_secret = 'clientsecretclientsecret'
 
token_url = https://auth.1up.health/oauth2/token 
api_url = https://api.1up.health/
scope = user/*.*

Get Access to User Data

You can enable your application to access data on behalf of a patient or user with credentials that only grant you access to that user's data. For each user whose data you want to consume, you must make a separate request for access to that user's data. You can then use the 1upHealth User Management API to control user permissions. You can use Postman and the 1upHealth Postman collection to test this process.

Get Clinical Data From EHRs

You can use the Electronic Health Record (EHR) Data Connect API to get existing data for patients that are included in the health systems we support using FHIR.