Once registered in Developer Portal, you will be able to access your own Applications view.
From that point, you can either explore our documentation, using our app bar navigation, or proceed directly with application registration.

Press "Add new application" button and provide:
App name can be any name you want, for example "Leyr Integrations". For client secret, you can use any strong random string or use "Generate" button there.

Application is a core element for Leyr, allowing you to have multiple entry points to our API. Because of integration nature of our system, we base our logic on Machine-to-Machine authentication, implementing Client Credentials Flow.
Client Credentials Flow out there, one example being Auth0 article.Once an app is registered, you will get your Client ID back.

Your Client ID is used in x-leyr-client-id request header. Your Client Secret is your encryption key and is later used in x-leyr-client-secret request header.
You can always find your Client ID in Developer Apps on Leyr portal.
You can find a full list of available EHRs inside your App page, under the "Integrations" section.

Click the "View integration" link on the EHR card you're interested in to see more details:
code later used in the integrationYou can also find a comprehensive table with all our supported EHRs here - Supported Services.
Configure EHRs you would like to connect to by either clicking on a toggle on the EHR card or from "View integration" view.
When adding a new EHR, you will be requested to provide your EHR credentials, depending on which credentials flow is used by that specific EHR. It may be a combination of Client ID and Secret, Access Token, API Key, etc.
If EHR is configured with your own credentials (not Smart Mock / Leyr Credentials mode), you also need to provide the same encryption key (client secret) that you entered when creating the app.
You will see an option to generate a strong key with GENERATE button, but you are free to use any other key. The most important thing - you do have to keep it somewhere to be able to call our API endpoint for that EHR! 🙂

You can also see that "Use Leyr's credentials in the test mode" switch on top - feel free to use it, while we are in Sandbox. You don't have to worry EHR credentials then - we will use our for Sandbox and you can directly proceed with testing the integrations 🙂
Once you have received Client ID and connected EHRs with your app Client Secret (encryption key), you are good to go with our APIs! 🥳
Your credentials are used to authenticate all API requests. Here's how to use them:
Every API request must include these headers:
x-leyr-client-id - Your application's Client IDx-leyr-client-secret - Your encryption key (Client Secret)Content-Type - Set to application/jsonimport requests
headers = {
"x-leyr-client-id": "your-client-id",
"x-leyr-client-secret": "your-encryption-key",
"Content-Type": "application/json"
}
response = requests.get(
"https://api.leyr.io/api/emrs",
headers=headers
)
print(response.json())
When you enable "Use Leyr's credentials in the test mode" during EHR configuration, you don't need to provide your own EHR credentials. Leyr will use our sandbox credentials automatically.
In this mode, you don't need to provide EHR encryption key during EHR setup.
You still need to provide:
x-leyr-client-idx-leyr-client-secret (encryption key)This is perfect for testing without setting up accounts with each EHR vendor.
Ready to start integrating? Check out our quickstart guides:
Quickstart GuidesOr explore the full API reference:
API Reference