Endpoint
Overview
Start the OAuth authentication flow to connect a user’s health device account. This endpoint returns an authorization URL that the user must visit to grant permissions.Request
The provider slug (e.g.,
theta_garmin, theta_whoop)The unique identifier for the user linking their account
Optional URL to redirect to after successful linking
Response
Response Fields
OAuth authorization URL that the user should visit in their browser to grant permissions
OAuth Flow
1
Call the link endpoint
Your application calls this endpoint with the user’s ID
2
Redirect user to authorization URL
Redirect the user to the
link_web_url in their browser3
User grants permissions
User logs in to their health device account and authorizes access
4
Callback processed
Provider redirects back to Mirobody Health, which processes the callback and saves credentials
5
Link complete
User can now sync their health data
Example Implementation
Error Responses
The authorization URL is time-limited (typically 15 minutes). If the user doesn’t complete authorization within this time, they’ll need to request a new link.