The Two Paths for Integrating with Sahha - API or SDK.

The Two Paths for Integrating with Sahha

  1. Use the Sahha SDK

Primary Difference:

  • The Sahha SDK is a third-party library that you include within your mobile app. It automatically handles all necessary permissions and background data collection from Apple HealthKit or Android Health Connect.
  • The Sahha REST API is a more flexible option when you want to build your own data integration processes. You capture or already have the health data and then send it to Sahha’s platform via API endpoints.

Both approaches ultimately serve the same purpose: enabling you to leverage Sahha’s behavioral, lifestyle and health data insights to improve your products and your users’ health. However, each method has unique benefits and considerations—especially when it comes to compliance, user experience, and store submission processes.


1. Sahha SDK

How It Works

The Sahha SDK is embedded into your iOS or Android application. It automatically manages:

  1. Permissions & Data Collection: Interacts with Apple HealthKit or Android Health Connect to request user permissions for retrieving health data.
  2. Device-Level Integrations: Tracks sensor data from the user’s smartphone (e.g., step count, heart rate, sleep data) according to your chosen analytics.
  3. Background Services: Continues working in the background (with user consent) to capture consistent, real-time data.

Key Advantages

  1. Faster Implementation
    • The SDK drastically simplifies the coding effort. Rather than rebuilding data pipelines and managing separate modules for each mobile platform, you rely on Sahha’s time-tested technology for data ingestion and analysis.
  2. Managed Permissions
    • Apple HealthKit and Android Health Connect have nuanced permission flows. By using the Sahha SDK, you benefit from code that’s already in place to handle these complexities, saving engineering hours and potential headaches.
  3. Standardized Data Pipeline
    • Because Sahha designed and maintains the SDK, it’s always updated to reflect the latest best practices, ensuring a reliable, secure data flow into your Sahha account.

Concerns and Considerations

  1. Third-Party SDK Integration
    • Some companies are cautious about third-party dependencies in their mobile apps. Each SDK adds overhead, can impact performance, and may raise concerns during your company’s security and compliance reviews.
  2. App Store Submission Requirements
    • Including a third-party SDK can result in extra steps or scrutiny during the submission process. For an overview of how to handle app store requirements effectively, consult Sahha’s best practices on app store submissions for both Apple and Google/Android.
  3. Limited Customization
    • While flexible, the Sahha SDK is still a pre-built solution, meaning you might have to adapt your app’s logic to Sahha’s data structures. Some companies want more control over the user experience or data handling than an out-of-the-box integration can provide.

When the Sahha SDK Is Ideal

  • You want an easier, turn-key solution: If your team needs a rapid path to a production-ready app, the SDK handles health permissions and data collection for you.
  • You do not already have a health data pipeline: If you are starting from scratch, the Sahha SDK is a great jumping-off point.
  • You can accommodate a third-party library in your app: If your risk and compliance team is comfortable with an additional dependency, the SDK is a straightforward solution.

2. Sahha REST API

How It Works

The Sahha REST API allows you to send health or activity data to Sahha without embedding Sahha’s code in your application. Typically, you would:

  1. Build or Leverage Existing Data Collection: Your mobile or web app collects user health data directly or your backend ingests it from another third-party source (like Apple HealthKit or Android Health Connect, but through your own integrations).
  2. POST Data to Sahha’s API: You authenticate and send user data to Sahha’s platform via REST endpoints for further processing and analytics.

Key Advantages

  1. Full Control Over Data Flow
    • You decide exactly how data is collected and stored within your internal systems. This can be crucial if you have special compliance requirements, custom data processing needs, or integration with proprietary systems.
  2. No Third-Party SDK in Your App
    • If your organization’s policies frown upon including third-party code in a mobile app, this method circumvents that concern. It can also simplify your app store submission process, since there’s no external SDK code to explain or permission flows to manage from a third-party library.
  3. Customization & Flexibility
    • You can fine-tune the user journey for granting permissions (if needed) and add custom logic around data storage or transformations. This way, you maintain a unique experience aligned with your brand and technical ecosystem.

Concerns and Considerations

  1. Complex Implementation
    • You must handle your own integrations for collecting user health data. This can be time-intensive and requires a deeper understanding of iOS, Android, and potentially cross-platform permission handling.
  2. Ongoing Maintenance
    • As platforms like iOS and Android evolve, you must keep your data integration up to date. By not relying on Sahha’s SDK for these updates, your engineering team is responsible for ongoing compliance with changes to HealthKit, Health Connect, or any other data source.
  3. Potential Delays
    • Because you’re building everything in-house, the path to your minimum viable product (MVP) might be longer. For smaller teams, this can be a barrier to entry, whereas bigger organizations may have the bandwidth to invest in a highly customized approach.

When the Sahha REST API Is Ideal

  • You already collect health data from user devices: If you already have your own pipelines built to interact with HealthKit or Health Connect, you can cut out the need for an additional SDK.
  • You need deeper customization: If your product has unique user flows or you operate in a strict compliance environment that restricts external libraries, controlling the entire integration can offer peace of mind.
  • You want to avoid extra scrutiny in app store submissions: With no third-party SDK included in your app, your review process may be simpler.

Making the Right Choice

Ultimately, your decision depends on:

  • Time to Market: If speed is a priority, using the Sahha SDK is often the quickest route to deployment.
  • Control & Customization: If you want granular control over data collection and a custom user experience, building out your own pipeline and using the Sahha REST API is a strong option.
  • Compliance & Risk Profile: Some organizations are cautious about adding third-party libraries. If your compliance and security processes are rigorous, the REST API may be more straightforward. Otherwise, the Sahha SDK can accelerate everything by providing tested and maintained permission management.
  • Future Roadmap: Consider your long-term product goals. Do you plan to expand data sources beyond Apple HealthKit and Android Health Connect? Will you eventually need custom analytics or user journeys? The broader your plans, the more beneficial it might be to handle data in-house and leverage Sahha strictly as a backend.

Sahha’s Role in your product’s potential

Regardless of which path you choose, Sahha provides powerful behavioral health analytics to help you better understand your users’ well-being. Our platform translates raw user data into actionable and engaging health, lifestyle and behavioral insights, ensuring your project can not only retain user engagement longer but also deliver meaningful interventions, personalized health recommendations, or even use the data for research and innovation.

Have questions about which path is best for you? Feel free to reach out to our team. We’re happy to help guide your technical, compliance, and product decisions so you can seamlessly integrate Sahha data and accelerate your mission.

Next Steps

  • Explore the Sahha SDK: Check out our developer docs to see how easy it can be to integrate permissions, collect data, and gain insights through pre-built modules.
  • Dive into the Sahha REST API: If a more flexible solution suits your team, our API documentation provides all the tools you need to integrate your existing pipelines.
  • Read Our App Store Submission Guidelines: For SDK-based implementations, we’ve outlined best practices to ensure minimal friction when submitting your app to Apple or Google Play.

Choosing whether to integrate Sahha via the SDK or REST API ultimately hinges on your organization’s technical resources, compliance landscape, and strategic vision. If you want a fast, out-of-the-box solution to collect health data, the Sahha SDK is your best friend. If your team demands granular control and is already building or has a data pipeline, the Sahha REST API might be more appropriate.

In both cases, Sahha stands ready to enhance your application’s potential considerably - empowering it with lifestyle, health and behavioral insights that enable engaging features to be built.

Get started today, visit our docs.