This walkthrough guide takes you from “Connect health records” to your first successful API request.
It’s written so that:
Recommended: If you haven’t read the prerequisites guide on What you Need Before you Start, please do so.
You should have:
You will be working with these base URLs:
https://app.consolidate.health/connect/api/v1/authorizehttps://app.consolidate.health/connect/api/v1/tokenhttps://app.consolidate.health/connect/api/v1Access tokens expire (the current guide indicates 6 hours). Use the refresh token to obtain a new access token.
curl -X POST <https://app.consolidate.health/connect/api/v1/token> \\
-u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \\
-H "Content-Type: application/x-www-form-urlencoded" \\
--data-urlencode "grant_type=refresh_token" \\
--data-urlencode "refresh_token=YOUR_REFRESH_TOKEN"
Recommended behavior:
401 Unauthorized, refresh the token and retry once.If the redirect_uri you send does not match exactly what was preregistered, authorization will fail. Keep a single source of truth for the redirect URI string.
If you don’t validate state, you risk accepting forged callbacks. Always validate.
This will fail due to security constraints and may surface as CORS issues. Always exchange the code on the backend.
Authorization codes are time-limited. If a user restarts the flow or token exchange takes too long, restart at Step 1.
First Successful API Call
A short page focused on confirming success, understanding what the patient_id represents, and expanding from one endpoint to the rest.