Developer Documentation

Everything you need to integrate with the Healix platform

Quick Start Guide

1. Create an account

Sign up for a HealthBridge account to get your API keys and access the developer sandbox.

2. Install the SDK

Choose your preferred language and install our SDK.

npm install @healix/sdk

3. Initialize the client

Initialize the HealthBridge client with your API key.

import { Healix } from '@healix/sdk';

const client = new Healix({
  apiKey: 'YOUR_API_KEY',
  environment: 'production'
});

4. Connect a device

Generate an authorization URL for a user to connect their device.

// Generate an authorization URL
const authUrl = await client.devices.getAuthorizationUrl({
  provider: 'fitbit',
  redirectUri: 'https://your-app.com/callback'
});

// Redirect the user to authUrl to authorize your app

// Handle the callback
app.get('/callback', async (req, res) => {
  const { code } = req.query;

  // Exchange the code for an access token
  const user = await client.devices.completeAuthorization({
    code,
    redirectUri: 'https://your-app.com/callback'
  });

  // User is now connected
  console.log('Connected user:', user.id);
});

5. Fetch health data

Retrieve health data for a connected user.

// Fetch activity data
const activityData = await client.users.getHealthData({
  userId: 'user_123',
  dataType: 'activity',
  startDate: '2023-01-01',
  endDate: '2023-01-31'
});

console.log('Activity data:', activityData);

// Fetch heart rate data
const heartRateData = await client.users.getHealthData({
  userId: 'user_123',
  dataType: 'heartRate',
  startDate: '2023-01-01',
  endDate: '2023-01-31'
});

console.log('Heart rate data:', heartRateData);

API Reference

Comprehensive documentation for all HealthBridge API endpoints.

API Endpoints

GET
/v1/users
List all users
Docs
GET
/v1/users/:id
Get a specific user
Docs
GET
/v1/users/:id/devices
List user's connected devices
Docs
GET
/v1/users/:id/health-data
Get user's health data
Docs
POST
/v1/devices/authorize
Generate device authorization URL
Docs

SDKs & Libraries

Official client libraries for popular programming languages.

Community Libraries

Libraries and integrations built by our community.

React HooksCommunity

React hooks for integrating HealthBridge into React applications.

View on GitHub
Flutter SDKCommunity

Flutter integration for cross-platform mobile apps.

View on GitHub

Need Help?

Our support team is ready to help you with any questions or issues you may have.