Terra Docs
Dashboard
  • Docs
  • API Reference
  • Changelog
  • Getting Started
    • What is Terra API?
    • Account setup and API keys
    • Core concepts
  • Health & Fitness API
    • Overview
    • Quickstart
    • Integration setup
      • Understanding sources and destinations
      • Setting up data sources
      • Setting up data destinations
        • Webhooks
        • SQL database (Postgres, MySQL)
        • Supabase
        • Cloud storage (S3, GCP)
        • Queuing services (SQS, Kafka)
      • Customising data types
      • Dedicated data source API keys
      • Understanding Terra environments
    • User authentication
      • Authentication flow
      • Implementation (Terra widget)
      • Implementation (Custom UI)
      • Handling authentication events
      • Customising authentication redirects
    • Managing user health data
      • Receiving health data updates (events)
      • Requesting historical health data (REST API requests)
      • Writing data
    • Mobile-only sources
      • iOS (Swift)
      • Android (Kotlin)
      • React Native
      • Flutter
    • Troubleshooting
    • Pricing
  • User Engagement
    • Health Scores
  • Streaming API
    • Overview
    • Wearable -> Your app
      • iOS (Swift)
      • Android
    • Your app -> Terra
      • iOS (Swift)
      • Android
    • Terra -> Your backend
  • Teams API
  • Biomarkers API - Upcoming
Powered by GitBook
On this page
  • 1. User has logged in with the wrong account
  • FreestyleLibre
  • Fitbit
  • MyFitnessPal
  • 2. User needs to follow additional steps
  • Garmin
  • Apple Health
  • Google Fit
  • 3. Mobile SDK Known Issues
  • Google Fit (SDK), Samsung Health: Health Connect (HC)-based integrations

Was this helpful?

  1. Health & Fitness API

Troubleshooting

PreviousFlutterNextPricing

Last updated 1 month ago

Was this helpful?

Some users may inquire about missing data, and you may not be sure what's going on.

Here are a few common issues & debugging steps.

No Data Events: Common Reasons

Terra sends data automatically as soon as it is available on a data source's cloud. Here are a few potential reasons why you're not receiving Data Events:

  1. If the user has connected to the wrong account.

  2. If the wearable hasn't synced to the respective app on the end user's phone, or if the app has not synced to the cloud, Terra will be unable to retrieve that data.

  3. If you have not completed additional destination configurations (e.g. to ).

  4. If your Destination is incorrectly configured. If this is the case, you can see 400 or 500 errors on your .

No Data EVENTS: Possible Solutions

  • Wait a bit longer to rule out regular data delays from the data sources.

  • Try to force a sync (using a "pull down to sync" feature or equivalent available in most apps)

  • In order to verify if the data has synced to the respective cloud, you may instruct the user to go on their web dashboard for their device using a browser to verify the data is present.

  • Submit a Support Ticket via your Terra Dashboard if you are unsure.

1. User has logged in with the wrong account

(This happens more often than you'd think)

Some users may have logged in with the wrong account. In order to verify the account that they're using matches with the Terra user ID that they've generated, you may follow the following procedure for the integrations below.

Getting the account's user ID on the provider's end

FreestyleLibre

Often enough, users will have logged into an account with little data, really old data, or no data at all by mistake, without realizing it. You can then share a screenshot of that view with your user in order to help them log into the correct account instead.

Fitbit

Launch your Fitbit app (make sure you're using the latest Fitbit app version), click your Fitbit avatar in the top left corner, then click your Fitbit display name to view your profile. Then Click "Personal" and go to the next page, your Fitbit User ID is located at the bottom.

MyFitnessPal

1. Invalid username

Seeing a page like this:

indicates that the username entered by the end user is invalid. In the case above, the user accidentally entered their email instead of their username. Have them log in once more, following the "how-to" guide presented in the login screen

2. Disabled diary sharing

The page below:

Indicates the user failed to enable diary sharing/disabled it since they authenticated through Terra. In order to remediate this, have the user re-enable diary sharing with the same password used during initial authentication, or have them re-authenticate after having enabled diary sharing as per the "how-to" guide in the login screen

2. User needs to follow additional steps

In those cases the first step is always to ensure that the data is showing up in the partner app (e.g. Garmin Connect, Fitbit, etc..).

Next would be to check if the data is correctly synchronized with the partner cloud, by using their web portal.

Garmin

Apple Health

The most likely culprit would be background app refresh being turned on/background updates not working as expected. In order to verify this, first request a backfill (requires TerraiOS >= 1.6.12) through your Terra Dashboard, in Tools > Debug > Users for that specific user_id.

If data does come through, this means that background delivery is not operating as expected. To Troubleshoot, follow the steps below.

Culprit 1: Battery saving mode is on

For this, have the user go to Settings > Battery, and make sure "Low Power Mode" is turned OFF

Culprit 2: Background app refresh is turned off for your app

For this, have the user visit Settings > General > Background App Refresh, and verify that your app is toggled on

Google Fit

Go inside the Google Fit app, and ensure that your data is up to date on the display. Thereafter, pull down from the top of the screen to synchronize with the cloud. Please note that even after that, there can be some delay for Google to make the data available through their API. You should be able to see that data after at most 30-60 minutes in most cases.

iOS-specific

Ensure background app refresh is turned on for Google Fit

3. Mobile SDK Known Issues

Google Fit (SDK), Samsung Health: Health Connect (HC)-based integrations

Currently these integrations go through the newly developed Health Connect platform, which is an on-device storage system developed by Google. This platform however is still in its infancy, and comes with a number of issues.

Health connect known issues

We have seen numerous cases of apps not being able to sync into Health Connect due to bugs in the Health Connect platform itself. This could be, for example, Samsung Health not being able to send steps into HC.

We've also seen cases where HC data simply could not be accessed, for no apparent reason, leading to limited or no syncing of data possible.

In the form, you will need to specify which data types you intend to read from Health Connect.

Terra always provides a user_id for each connection. To get the user ID that the provider (e.g. Garmin, Fitbit etc) uses, you can use the endpoint in order to retrieve that, which will be under the field provider_user_id. Once you have obtained that, follow the guidelines below for each provider.

To get the user ID that the provider (e.g. Garmin, Fitbit etc) uses, you can use the endpoint in order to retrieve that, which will be under the field provider_user_id. Once you have obtained that, follow the guidelines below for each provider.

For FreestyleLibre, a user's profile URL takes the form: .

If we have connected your users to your own LibreView practice, you may simply substitute provider_user_id with the one retrieved from the endpoint and visit the link above. You'll then be able to see the user's account email, name, and data present on their account, by clicking on the "Glucose History" tab.

Check to make sure your user's Fitbit user ID matches the one retrieved by the endpoint

Using the provider_user_id obtained above, navigate to .

Ensure that the data is showing up in . If not, then pull down from the top in the Garmin connect mobile app, and hit the circle arrow until everything refreshes. If the data shows up in the web dashboard for Garmin Connect, but not through the API after 1-2 minutes, please contact support.

Before going LIVE (release), you will ALSO need to apply for permissions to access the Health Connect API with Google. Use .

integrations requiring dedicated credentials
Terra Dashboard > Payload History
https://www.libreview.com/patient/{provider_user_id}/profile
https://www.myfitnesspal.com/food/diary/{provider_user_id}
the Garmin connect web dashboard
this application form
REST API Endpoints
REST API Endpoints
REST API Endpoints
REST API Endpoints