Migrate from a legacy API key to an OAuth API key

Last updated: Dec 8, 2025
DEVELOPER
HCO
HEALTH TECH VENDOR

There are two ways to authenticate API requests via Redox:

  • legacy API keys
  • (Recommended) OAuth API keys

Learn more about authenticating and sending data.

If you’re currently using legacy API keys but would like to migrate to OAuth API keys, follow the instructions below. This migration can be performed with zero downtime.

Prerequisites

  • A user must be assigned to an engineer role to create or authenticate API keys. Learn about user roles.
  • Log into the same environment (development / staging / production) where your legacy API key exists.

Step 1: Create an OAuth API key

  1. Log in to the Redox dashboard.
  2. Select the correct environment (i.e., where your legacy API key exists) from the drop-down field on the top left.

Step 2: Update your code

  1. Update your application to authenticate using the new OAuth API key. 
  2. If you have more than one source, include the Redox-Source-Id header in your API requests. You can find the source ID on the Developer > Sources tab. Learn more about managing source details.
  3. Confirm that your outgoing requests are succeeding with the new API key.

Step 3: Rotate your legacy API key secret

Don’t delete your old key

The only way to delete a legacy API key is to delete its associated source. However, you shouldn’t delete a source since it’s likely tied to other backend routing configurations and would require Redoxer support.

All you need to do is rotate the secret of the old legacy API key. This prevents the old authentication method from being used.

  1. Once you fully migrate your application to the new OAuth API key, rotate the legacy API key’s secret by generating a new secret value.
  2. You can keep both your legacy API keys and OAuth API keys in your system without causing conflicts.

FHIR® is a registered trademark of Health Level Seven International (HL7) and is used with the permission of HL7. Use of this trademark does not constitute an endorsement of products/services by HL7®.