End-to-end guide to integrate Open Wearables with your app: create a user, connect a wearable provider via OAuth, sync data, and fetch timeseries, workouts, or sleep data.
This guide walks you through the complete flow of integrating Open Wearables with your application, from creating a user to fetching their health data.
1. Create a user in Open Wearables2. Connect user to a wearable provider (Garmin, Polar, Suunto)3. Sync data from the provider4. Fetch timeseries, workouts, or sleep data
Save the id - you’ll need it for all subsequent API calls.
Open Wearables allows duplicate email addresses. If you need uniqueness, check for existing users first using GET /api/v1/users?search=user@example.com which returns a paginated list.
After OAuth completes, an initial sync is triggered automatically. For subsequent syncs or to fetch historical data:
# Garmin - with time range (recommended)curl -X POST "http://localhost:8000/api/v1/providers/garmin/users/550e8400-e29b-41d4-a716-446655440000/sync?summary_start_time=2025-01-01T00:00:00Z&summary_end_time=2025-01-31T00:00:00Z" \ -H "X-Open-Wearables-API-Key: YOUR_API_KEY"# Suunto/Polar - no time range requiredcurl -X POST "http://localhost:8000/api/v1/providers/polar/users/550e8400-e29b-41d4-a716-446655440000/sync" \ -H "X-Open-Wearables-API-Key: YOUR_API_KEY"
For Garmin, including summary_start_time and summary_end_time is recommended to specify the date range for data retrieval.