--- 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. ![dev-apps-empty-state.png](http://localhost/images/dev-apps-empty-state.png) ## 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. ![create-app](http://localhost/images/create-app.png) **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`. ### Get Client ID Once an app is registered, you will get your `Client ID` back. ![create-app-client-id](http://localhost/images/create-app-client-id.png) 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. ![app-integrations.png](http://localhost/images/app-integrations.png) 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). ## 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! 🙂 ![connect-ehr.png](http://localhost/images/connect-ehr.png) 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 ### 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.