Quickstart
Learn how to receive data events in just 3 steps
Last updated
Was this helpful?
Learn how to receive data events in just 3 steps
Last updated
Was this helpful?
Follow this short tutorial to set up event-based health data delivery via Webhooks. Learn how Terra manages user authentication and can automatically send new user data, simplifying your integration. (Other methods, like requesting historical data, are covered in the detailed guides.
First you need to select your data sources on your Terra dashboard. This determines:
(a) What data sources are available for end-users to chose on the Terra auth widget.
What data sources are automatically synced to your data destination via events.
The Health & Fitness API is event-based, so the Data Destinations are where you will receive payload events:
(a) New health data updates
(b) Authentication events, de-auth events, etc.
Webhook.site
Copy Your unique URL that is automatically generated when you enter the site.
Your own Webhook endpoint on your local machine
First create a web server that runs locally on your computer (see code block).
If you are using ngrok, running ngrok http {PORT_NUMBER}
will expose your server to the internet and return its URL.
Next you need to authenticate a user via the API to a data source (e.g. to Oura, Fitbit, Withings).
Terra simplifies this by allowing you to generate a pre-built authentication widget session (by running the following code).
Copy/Paste the widget session url
into web browser. To test the authentication flow, you can choose a data sources (e.g. Fitbit), and complete the flow.
Now that you understand the basics, move onto onto our guides for detailed documentation on the Health & Fitness API
Using you can generate a temporary webhook destinations for testing.
Then, expose your server to the internet with a tool such as and start receiving payloads.