# Dedicated data source API keys

## Overview

Terra manages API Keys of data sources, meaning you can connect users without having to apply for each API Key.

For some Data Sources, you may choose to have your own access keys for different reasons:

1. **Required by the provider:** the provider **requires** it in there terms that you use dedicated access keys.
2. **Preferred by you:** you simply wish to avoid rate limits and separate your environment from the managed Terra keys.

You can find the list of providers that support this in the [**integrations table**](#integrations-list) marked as `Managed`**.** We also included their appropriate developer dashboard in the table.

***

## How to Setup Dedicated Access Keys?

### Strava

1. Log in to <https://strava.com/settings/api>
2. Create an application
3. Set the Authorization callback domain to api.tryterra.co, and save the client ID and client secret obtained
4. In your Terra dashboard, add Strava to your connections under API > Connections > Add more
5. Fill in the obtained client\_id and client secret on that connection's settings

***

### Virtuagym

* Request an API key from <https://virtuagym.com/public-api>
* In you Terra dashboard, add Virtuagym to your connections under API > Connections > Add more
* After adding Virtuagym, go the Virtuagym options
* Fill your portal name in the client id, and your API Key in the client secret

***

### Huawei

1. **Create a Huawei ID:** This can be achieved by following the [Registration & Verification guide](https://developer.huawei.com/consumer/en/doc/start/registration-and-verification-0000001053628148)

{% hint style="info" %}
**📘 Identity verification**

Through the Huawei ID Registration process, you will be asked to verify your identity.

* If you own a business, please follow the guide for [DUNS number verification](https://developer.huawei.com/consumer/en/doc/start/atpopb-0000001062836624) or the guide [using a Business License](https://developer.huawei.com/consumer/en/doc/start/mracoei-0000001062678404)
* If you are an individual developer, follow [this guide](https://developer.huawei.com/consumer/en/doc/start/ibca-0000001062388135) using your personal documents
  {% endhint %}

2. **Apply for the&#x20;*****HUAWEI ID Service***

This is separate from the Huawei ID registration - the *service* is what will allow you to then access various Huawei APIs). Follow the guide [here](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/apply-id-0000001050069756) for a step-by-step explanation on how to achieve that

* **Important parameters**

<table><thead><tr><th width="181.591796875">Name</th><th width="490.4951171875">Value</th></tr></thead><tbody><tr><td><strong>Redirect URL</strong></td><td><a href="https://api.tryterra.co/v2/auth/huawei/oauth2">https://api.tryterra.co/v2/auth/huawei/oauth2</a></td></tr><tr><td><strong>App access URL</strong></td><td><a href="https://api.tryterra.co/">https://api.tryterra.co/</a></td></tr><tr><td><strong>Callback address</strong></td><td><a href="https://api.tryterra.co/v2/auth/huawei/oauth2">https://api.tryterra.co/v2/auth/huawei/oauth2</a></td></tr></tbody></table>

3. **Apply for Huawei Health Kit access**
   1. Please follow the guide Health Kit access [here](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/apply-kitservice-0000001050071707) for an in-depth explanation of how to gain access to users' health data through Huawei Health Kit.
   2. Make sure to register for notifications (webhooks) by following [these steps](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/subscription-0000001078496860#section38652513104):

![](https://files.readme.io/c6f3b5d-image.png)

***

### Samsung Health - Direct Connection Route

As **privileged** **partners** of **Samsung** thanks to their investment in **Terra**, we have been granted access to their SDK for accessing Samsung Health directly — no Health Connect intermediary needed.

#### Why use the direct route?

The direct Samsung Health route is recommended over Health Connect for Samsung devices because:

* **More reliable** — reads data directly from Samsung Health, bypassing Health Connect platform bugs
* **No HC dependency** — does not require the Health Connect app to be installed or configured
* **Same API** — uses the same Terra SDK functions (`initConnection`, `getDaily`, etc.) — switching from Health Connect to Samsung direct is just a version bump with no code changes

#### How to get access

1. Submit your application through the [Samsung Health partnership portal](https://developer.samsung.com/SHealth/business-partner/m48wvqi1mt9w2w4c)
2. While waiting for approval, you can start development using the Health Connect route immediately
3. After approval, switch to the Samsung-tagged SDK version — see the setup guide for your framework: [Android (Kotlin)](https://docs.tryterra.co/health-and-fitness-api/mobile-only-sources/android-kotlin), [React Native](https://docs.tryterra.co/health-and-fitness-api/mobile-only-sources/react-native), or [Flutter](https://docs.tryterra.co/health-and-fitness-api/mobile-only-sources/flutter)
