SweatStack Connect: One link to rule them all.
This is a live demo of SweatStack Connect, the onboarding flow your users go through to bring their wearable data into your app. You point them at one OAuth link and SweatStack handles the rest: wearable sign-in, account creation, and the data backfill.
Connect below and watch exactly what happens on the wire.
What this button actually does
It runs the standard OAuth2 PKCE flow for public (browser) clients. We generate a one-time code verifier, hash it into a challenge, and redirect you to SweatStack's authorize endpoint. No client secret ever touches the browser. See the authentication docs.
# building authorize URL…
Reference: SweatStack Connect · docs
Connecting…
Exchanging your authorization code for an access token…
Something interrupted the flow
You're connected!
Under the hood: the token exchange
Your browser swapped the one-time code for an access token. It is a
plain POST with no secret, proving it holds the PKCE verifier:
SweatStack responded:
Reference: OAuth2 & PKCE docs
What that one link just unlocked
/oauth/userinfo…Enough to create this user's account in your product before any data loads. scopes & userinfo ↗
/activities/latest…This is exactly how your app shows new users a live loading state instead of an empty screen. onboarding & backfill guide ↗
Every activity has the same shape regardless of source, whether Garmin, Intervals.icu, or more, so you write your code once. data model ↗
Longitudinal endpoints return data across all matching activities at once. No pipeline to maintain, and no upstream wearable rate limits to manage. activities data ↗
Schedule a structured workout and SweatStack fans it out to the athlete's connected platforms like Garmin Connect, typically within seconds. Your prescriptions land on their device. workout fanout ↗
Requires the data:write scope, which this read-only demo doesn't use.
Python SDK, CLI, an in-browser REPL, and hosted Pages. This demo is deployed on them. libraries & tools ↗
Where to go next
That whole experience, sign-in, identity, and live backfill, is one OAuth redirect and a handful of GET requests. Start building.
Build an app SweatStack Connect guide
Want to watch the first-time flow again?
You now have a SweatStack session, so reconnecting is instant (that's the point!). To replay onboarding as a brand-new user, first log out of SweatStack ↗, then disconnect here and connect again.