Providers
Test data

This feature is currently available for the following providers:

  • Apple Health Kit
  • Fitbit
  • Oura
  • Freestyle Libre

The others will be coming soon. If there is a particular provider you would like us to add please do not hesitate to contact us at support@tryvital.io!

When integrating with Vital, you may not own a physical device for each provider you’re planning to support. For this, we provide demo users with test data so you can build and test the whole integration without touching a real device.

A demo user gives you the same experience as using a real one, the only difference is that you won’t go through the Vital Link flow.

Demo users have certain limitations to keep in mind:

  • Only available in sandbox.
  • A demo user cannot have connections to a real device. If you already have a user with real data, you need to create a new one to connect a demo account.
  • There is no limitation on the number of demo users you can create, but they do count towards the overall users limit in sandbox. Up to date limits can be found on this page.
  • Demo users expire after 7 days, meaning the user and its data will be deleted.

Usage

First, you need a Vital user. You can create one either through the dashboard or through the API.

After creating the user, the Users page of your dashboard will look like this:

Now you can create a demo connection for the Vital user you just created, in this case 150db84c-537c-4cad-a6e9-24dc589d7fa2. You can directly hit the API endpoint or using one of our client libraries, as shown below:

curl --request POST \
     --url https://api.sandbox.tryvital.io/v2/link/connect/demo \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'x-vital-api-key: <your_api_key>' \
     --data '{"user_id": "<user_id>", "provider": "<provider>"}'

After the demo connection is created, a Fitbit logo will appear beside your user.

From here, everything works exactly the same as if you connected a real device. This means you will receive the following webhook updates:

  • Connection created, as soon as the connection is created.
  • Historical webhooks. We simulate historical data for the demo device and send the corresponding webhook updates, as in the real-world scenario.
  • Daily webhooks. We also simulate updates to the device data every couple of hours so you can test receiving the data when a user recorded a workout or other activity.
  • Refresh user data. You can also instantaneously refresh a user’s data through this endpoint.

Backfill Data

For demo connections there will be 30 days of historic data backfilled. This is in contrast with data backfill for non demo providers, where the number of days data backfilled varies according to the provider. You can find out more here

Data Format

When connecting to the live Vital client, there are three data response structures available for data. Raw, Stream and Summary

When connecting to the demo Vital client data is only available in the Summary structure.

Summary restructures provider data fields, to have a consistent response structure across all providers. This is the easiest way to use provider data across an application which connects to multiple providers.