---
title: "Samsung Health API Integration Guide for Android Developers"
description: "Integrate Samsung Health API without managing the SDK lifecycle. Open Wearables Android SDK handles permissions, WorkManager sync, and data normalization."
canonical_url: "https://openwearables.io/blog/samsung-health-api-integration-guide-android-developers"
---

# Samsung Health API integration guide for Android developers

[All posts](https://openwearables.io/blog)

[Samsung Health](https://openwearables.io/blog/category/samsung-health)

Open Wearables Team · Jun 6, 2026 · 4 min read

## Key Takeaways

- The Samsung Health API is not a cloud REST API. It is a device-side SDK that reads data stored locally on Samsung devices.
- Samsung Health and Health Connect solve similar problems but cover different device populations. Use Samsung Health (`"samsung"`) for Samsung-specific deployments, and Health Connect (`"google"`) for broader Android 10+ coverage.
- Open Wearables Android SDK handles the Samsung Health SDK connection, permission flow, background sync scheduling, token management, and data normalization.
- Samsung Health coverage includes 20+ data types: steps, heart rate, HRV, SpO2, blood pressure, blood glucose, energy expenditure, body composition, temperature, workouts, and sleep.
- Background sync is WorkManager-backed, surviving app restarts and respecting battery optimization.
- Samsung Health is only available on Samsung devices. For non-Samsung Android devices, use the Health Connect provider.
- The SDK requires Android 10 (API 29+), compile SDK 36, Kotlin 2.1.0+.

## The Core Problem: Samsung Health Is Not a Cloud API

When developers first look for a Samsung Health API, they often expect something similar to other health platforms: an OAuth flow, a set of REST endpoints, a way to pull data server-side. Samsung Health does not work that way.

Samsung Health stores data locally on the device. Access happens through the Samsung Health SDK, which communicates with the Samsung Health app via a local IPC connection. There is no cloud endpoint you can call. Your code needs to run on the device, with the user's explicit permission, and the Samsung Health app must be installed.

This creates a specific integration pattern: you ship native Android code, that code syncs data to your backend, your backend reads the normalized data through your API. Every piece of complexity lives in step one. Open Wearables handles that entire step.

## Samsung Health vs Health Connect: Which One to Use

**Health Connect** works on any Android 10+ device and covers 30+ data types. Provider ID in Open Wearables: `"google"`.

**Samsung Health** works on Samsung devices only, covers 20+ data types. Provider ID: `"samsung"`.

For most apps targeting a broad Android audience, Health Connect is the more practical starting point. Samsung Health makes sense when your user base is Samsung-specific. Open Wearables supports both through a unified interface.

## What Open Wearables Android SDK Does for You

Without Open Wearables, Samsung Health API integration involves: adding the Samsung Health SDK, setting up the connection, handling connection state, building per-type permission flows, writing WorkManager background sync, normalizing Samsung-specific formats, implementing token refresh, and storing credentials securely.

With Open Wearables, you add one dependency, generate a backend token, and call three SDK methods.

## Backend Setup: Generating a User Token

```
POST /api/v1/users/{user_id}/token
X-Open-Wearables-API-Key: your_api_key
```

Returns `access_token` and `refresh_token`. Pass these to the Android client. Never embed `app_id` or `app_secret` in the mobile app.

## Android SDK: Installation and Setup

**Add the dependency:**

```
// settings.gradle.kts
maven { url = uri("https://jitpack.io") }

// build.gradle.kts
implementation("com.github.the-momentum:open-wearables-android-sdk:0.5.0")
```

Requirements: `minSdk = 29`, `compileSdk = 36`, Kotlin 2.1.0+.

**Initialize in Application class:**

```
OpenWearables.init(context = this, baseUrl = "https://your-backend.com")
```

**Sign in and request Samsung Health permissions:**

```
sdk.signIn(accessToken = accessToken, refreshToken = refreshToken, userId = "user_123")

sdk.requestAuthorization(
    activity = this,
    provider = "samsung",
    dataTypes = listOf("steps", "heart_rate", "hrv", "oxygen_saturation", "workout", "sleep")
)
```

**Start background sync:**

```
sdk.startBackgroundSync(provider = "samsung", syncDaysBack = 7)
```

## Reading Data From Your Backend

```
GET /api/v1/users/{user_id}/timeseries
GET /api/v1/users/{user_id}/events/workouts
GET /api/v1/users/{user_id}/events/sleep
```

All timestamps are UTC. Units are canonical. Data from Samsung Health and Health Connect look identical in the response.

## Limitations

Samsung Health is Samsung devices only. The SDK will not connect to Samsung Health on non-Samsung Android devices.

The Samsung Health app must be installed and up to date. Older versions expose fewer data types.

## Quickstart

```
git clone https://github.com/the-momentum/open-wearables
cd open-wearables
docker compose up -d
```

API at `http://localhost:8000`. Auth via `X-Open-Wearables-API-Key`. MIT license, $0 per user.

Note: Samsung Health requires a physical Samsung device. The SDK does not work on emulators.

## See Related Articles

- [How to connect Samsung Health to your app](https://openwearables.io/blog/how-to-connect-samsung-health-to-your-app)
- [How to access Google Health Connect data in your backend](https://openwearables.io/blog/how-to-access-google-health-connect-data-in-your-backend)
- [How to integrate Apple Health data into your app](https://openwearables.io/blog/how-to-integrate-apple-health-data-into-your-app)
- [How to sync wearable data from multiple devices](https://openwearables.io/blog/how-to-sync-wearable-data-from-multiple-devices)
- [How to normalize wearable data across providers](https://openwearables.io/blog/how-to-normalize-wearable-data-across-providers)

## FAQ

**Is there an official Samsung Health REST API I can call from my server?**

No. Samsung Health does not expose a cloud API for third-party developers. Data access goes through the Samsung Health SDK on the device.

**What happens if the user has both Samsung Health and Health Connect installed?**

You can request authorization from both providers independently. The SDK treats `"samsung"` and `"google"` as separate data sources. If the user connects both, your backend may receive overlapping data for the same time window.

**Does Open Wearables work on non-Samsung Android devices?**

The Open Wearables Android SDK works on any Android 10+ device. Samsung Health specifically requires a Samsung device. On non-Samsung devices, use the `"google"` provider for Health Connect.

**How does automatic token refresh work?**

The SDK catches 401 responses, uses the stored refresh token to call the token endpoint, updates EncryptedSharedPreferences with the new token pair, and retries the failed request. This happens transparently.

**How far back can I backfill Samsung Health data?**

The `syncDaysBack` parameter in `startBackgroundSync()` controls the historical backfill depth. A value between 7 and 30 days is a reasonable starting point.

## Keep reading

Samsung Health · May 6, 2026 · 6 min read

### How to connect Samsung Health to your app

The Samsung Health integration pipeline covers developer program application, OAuth 2.0, token management, data querying and normalization before you ship a single product feature.

Samsung Health · May 6, 2026 · 5 min read

### Samsung Health API: Galaxy Watch data for developers

Samsung Health Platform provides server-side API access to Galaxy Watch data including heart rate, sleep stages, workouts, stress score, SpO2, HRV and body composition.

Releases · Nov 3, 2026 · 11 min read

### Open Wearables 0.11.0: daily aggregates and faster summaries

Open Wearables 0.11.0 moves day and session values into their own aggregate tables, adds day, week and month time series, computes missing workout statistics and cuts the heaviest summary from seconds to 25 ms. Contains breaking changes.

## Run it in your own cloud

Open Wearables is open source and self-hosted. Start from the repository, or bring us in to stand it up in your account.

[Get started](https://openwearables.io/docs/quickstart) [Book a demo](https://openwearables.io/book)
