Skip to content
Last updated

Client credentials and OAuth 2.0

1upHealth uses the OAuth 2.0 flow for users to authenticate to our FHIR servers. 1up provides a FHIR server (Patient Access) and a FHIR Bulk Export server (Provider Access & Payer-to-Payer).

For the OAuth 2.0 flow, you must have client credentials (client_id and client_secret) from 1upHealth. You provide these codes to 1up as part of the authentication request to receive a Bearer token, also known as a access token. The Bearer token is used for following requests.

The method for obtaining client credentials depends on the API you want to use.

Patient Access

In addition to client credentials (client_id and client_secret), Patient Access requires a code obtained by connecting to a demo health plan's auth application.

Review Info for third-party developers for instructions on obtaining the required parameters and requesting a Bearer token.

Electronic Prior Authorization

Contact customer-engagement@1up.health to request EPA client credentials for OAuth 2.0. You must have client credentials for either the demo or production environments.

Request a Bearer token

Placeholder

Replace the curly brackets {} and all text inside them with the client credentials provided to you.

Demo Bearer token request
curl -I -X POST 'https://gateway.1upcoreuat.com/auth/realms/epa-uat/protocol/openid-connect/token' \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -d 'client_id={your_client_id}' \
    -d 'client_secret={your_client_secret}' \
    -d 'grant_type=client_credentials'
Production Bearer token request
curl -I -X POST 'https://gateway.1upcoreprod.com/auth/realms/epa-prod/protocol/openid-connect/token' \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -d 'client_id={your_client_id}' \
    -d 'client_secret={your_client_secret}' \
    -d 'grant_type=client_credentials'

Provider Access

The required client credentials (client_id and client_secret codes) are obtained by registering an account in the 1up Dev Portal.

  1. Register on the 1up Dev Portal, complete email verification, and login.
  2. Click Create a Client.
  3. Select an Access Type.
  4. Enter a Client Name.
  5. Click Create.
  6. From Sandbox Clients, copy your new client's client_id and client_secret.
  7. Use the client_id and client_secret in the request below:
    curl -i -X GET \
        https://gateway.1up.health/auth/realms/dev-portal/protocol/openid-connect/token \
        -H 'Content-Type: application/x-www-form-urlencoded' \
        -d client_id={your-id-here} \
        -d client_secret={your-secret-here} \
        -d grant_type=client_credentials \
        -d 'scope=bulk-data|user/*.rs'
  8. Copy the access_token from the successful response.

Payer-to-Payer Data Exchange

The required client credentials (client_id and client_secret codes) are obtained by registering an account in the 1up Dev Portal.

  1. Register on the 1up Dev Portal, complete email verification, and login.
  2. Click Create a Client.
  3. Select an Access Type.
  4. Enter a Client Name.
  5. Click Create.
  6. From Sandbox Clients, copy your new client's client_id and client_secret.
  7. Use the client_id and client_secret in the request below:
    curl -i -X GET \
        https://gateway.1up.health/auth/realms/dev-portal/protocol/openid-connect/token \
        -H 'Content-Type: application/x-www-form-urlencoded' \
        -d client_id={your-id-here} \
        -d client_secret={your-secret-here} \
        -d grant_type=client_credentials \
        -d 'scope=bulk-data|user/*.rs'
  8. Copy the access_token from the successful response.