Skip to main content

Your first integration

This guide takes you from credentials to your first patient: get an access token, verify your connection, and create a patient.

Prerequisites

Before you begin, ensure you have:
  • Client credentials - a client_id and client_secret for an app client, issued by your OpenLoop partnership team
  • HTTP Client - curl, Postman, or your preferred API testing tool
  • Basic API Knowledge - Familiarity with RESTful APIs and JSON
Never commit your credentials to version control or share them publicly. Store the client_id and client_secret in environment variables.
1

Get an Access Token

The API uses the OAuth 2.0 client-credentials flow. Exchange your client_id and client_secret for a short-lived access token.
Response:
Tokens are short-lived (expires_in is in seconds). Cache the access_token and refresh it before it expires rather than requesting a new one per call.
2

Verify Your Connection

Confirm the token works with a simple authenticated read. Send the access_token as a Bearer token.
Expected Response: a 200 with the standard list envelope.
If you receive this response, your credentials are configured correctly and you’re ready to proceed.
3

Create Your First Patient

Create a patient record with all required demographic and contact information.
Save the data.id from the response. You’ll need it for subsequent operations like updates.

How Authentication Works

The Partners API authenticates every request with an OAuth 2.0 access token obtained through the client-credentials flow. There is no static API key.
  1. Exchange your client_id / client_secret at POST /v0.1/auth/token for an access_token.
  2. Send that token on every request in the Authorization header as Bearer <access_token>.
  3. Refresh the token before it expires (expires_in seconds) and reuse it across requests in the meantime.
Your credentials map to an app client provisioned by OpenLoop, which determines what your integration can access. The platform authenticates and routes each request for you.
The patient record you just created is a clinical record, not a login. If your product needs the patient to sign in as their own user, see the User Registration guide.

Next Steps

You’re ready to build your integration! Explore these resources to learn more.

Partner Cookbook

Picks up here: the five calls that prove your tenant is provisioned, then intake

API Reference

Explore all available endpoints, parameters, and response schemas

Best Practices

Learn about error handling, data validation, and optimization techniques

Contact Support

Get help from our developer support team