---
title: "Test in Sandbox"
description: "Once registered in Developer Portal, you will be able to access your own Applications view."
canonical_url: "http://localhost/product/fundamentals/test-in-sandbox"
---
# Test in Sandbox
Once registered in [Developer Portal](https://leyr.io/developers), 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.

## Register application
Press "Add new application" button and provide:
- app name
- client secret (encryption key)
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`.
If interested, there are multiple good materials on `Client Credentials Flow` out there, one example being [Auth0 article](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow).
### Get Client ID
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.
## Available EHRs
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:
- supported functionalities
- markets where the EHR is present
- EHR `code` later used in the integration
- official information about vendor
You can also find a comprehensive table with all our supported EHRs here - [Supported Services](https://docs.leyr.io/product/fundamentals/emr-vendors#supported-services).
**Can't find an EHR you are looking for?** Press the "Request new EHR" button in the top right corner of "Integrations" section and give us a name - we'll add it for you!
## Configure EHR
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! 🙂
That key is never stored, meaning even we at Leyr don't know it and cannot see your data. A full read on our approach to double encryption - [What is a double encryption?](https://www.linkedin.com/feed/update/urn:li:ugcPost:7173226653073039361)

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 🙂
## Connect to Sandbox
Once you have received `Client ID` and connected EHRs with your app `Client Secret` (encryption key), you are good to go with our APIs! 🥳
## Using Your Credentials
Your credentials are used to authenticate all API requests. Here's how to use them:
### Required Headers
Every API request must include these headers:
- `x-leyr-client-id` - Your application's Client ID
- `x-leyr-client-secret` - Your encryption key (Client Secret)
- `Content-Type` - Set to `application/json`
### Example Request
```python
import 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())
```
```javascript
const headers = {
"x-leyr-client-id": "your-client-id",
"x-leyr-client-secret": "your-encryption-key",
"Content-Type": "application/json"
};
const response = await fetch(
"https://api.leyr.io/api/emrs",
{ headers }
);
const data = await response.json();
console.log(data);
```
```bash
curl -X GET "https://api.leyr.io/api/emrs" \
-H "x-leyr-client-id: your-client-id" \
-H "x-leyr-client-secret: your-encryption-key" \
-H "Content-Type: application/json"
```
**Security Note:** Never commit your Client Secret to version control. Use environment variables or secure configuration management.
### Using Leyr Test Credentials
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:
- Your `x-leyr-client-id`
- Your `x-leyr-client-secret` (encryption key)
This is perfect for testing without setting up accounts with each EHR vendor.
## Start Building
Ready to start integrating? Check out our quickstart guides:
Quickstart Guides
Or explore the full API reference:
API Reference
## Sitemap
See the full [sitemap](http://localhost/sitemap.md) for all pages.