Overview
Garmin is a real device-brand client —src/health/vendor/device/garmin.cpp, registered as garmin. It’s the most instructive example of Mirobody’s “implement only what’s publicly confirmable, leave the rest an honest stub” rule, because Garmin’s data API is partner-gated and push-based.
This is a
vendor::Vendor implementing the shared authorize / fetch / webhook contract; see Vendor System for the interface.What Garmin’s API shape forces
So of the six contract operations, Garmin ships exactly one working call —
revoke — and three deliberate stubs (fetch, authorize_url, handle_webhook), with list_providers N/A (single brand). This is the intended state, recorded in the file header.
revoke — the one wired operation
revoke calls Garmin’s required account-disconnect endpoint, DELETE /wellness-api/rest/user/registration, authenticated with the user’s OAuth 2.0 access token as a bearer:
https://apis.garmin.com (override via MIROBODY_VENDOR_GARMIN_BASE_URL).
fetch — a stub that explains itself
Rather than the generic “not implemented”, Garmin’s fetch throws a message stating the reason, so a caller learns the model:
Metadata (info())
Even with most operations stubbed, the vendor’s VendorInfo is fully populated and queryable without credentials:
Configuration
Takeaways for your own vendor
- Implement what’s publicly confirmable; stub the rest with a reason. A stub that names the missing contract is better than a fabricated one.
- A stateful OAuth flow (PKCE) doesn’t fit
authorize_urlalone — Mirobody keeps such flows in a stateful connect layer (as the SMART-on-FHIR EHR connect service does), not in the URL-builder signature. VendorInfoshould be complete regardless — it powers selection / comparison without a network call.
src/health/vendor/device/fitbit.cpp), which implements fetch, authorize_url, revoke, and a signed handle_webhook.
Next steps
Vendor System
The contract Garmin implements
Provider Integration
Build your own
vendor::VendorOAuth Implementation
OAuth 2.0 / PKCE patterns in the vendor clients
Provider Overview
All shipped vendors