User authentication
Securely connect your users' health data sources to your application via Terra.
Last updated
Was this helpful?
Securely connect your users' health data sources to your application via Terra.
Last updated
Was this helpful?
User authentication allows Terra to accessing your users' health and fitness data and is essential to using the Health & Fitness API.
Authentication allows your end-users to grant your application permission to retrieve data from their wearables or fitness platforms (like Fitbit, Garmin, Oura, etc.). Once a user is successfully authenticated, Terra automatically pushes their health data events to your configured destination.
Get an overview of the user authentication process, from the initial user action in your app to receiving their Terra User ID.
The quickest way to get started. Learn how to integrate Terra's pre-built, customisable UI to handle the provider selection and authentication process with a single API call.
Understand the different types of authentication events Terra sends (success, failure, deauthorisation) and how to process their payloads effectively.
Learn how to customise the success or failure screen that users see after they complete the authentication flow but before they are redirected back to your app.
For maximum control over the user experience. This guide details how to build your own device connection screen and use Terra's API to authenticate users with specific providers.
API:
Credentials: Did you find your Terra API Keys and Dev-ID in your Terra Dashboard?
Endpoint: Did you make a successful request from your backend to one of the /auth endpoints?
POST
/auth/generateWidgetSession
POST
/auth/authenticateUser?resource=oura
Response: Did you get a 200 response and parse the authentication url? Either:
"url"
: the widget screen (via the widget endpoint)
"auth_url"
: the provider's login screen (via the authenticateUser endpoint)
End-user: Was your end-user redirected to an Auth Success Screen?
Event: Did you receive an Success "Authentication Event" to your destination?
Database: Did you save this user in your Database using user_id
?