Hi guys - figure there are other people who also use Whoop in conjunction with Garmin / Strava for their fitness tracking, so I integrated into my Athlete OS and had Claude spit out some simple instructions anyone can copy/ paste into their system and integrate Whoop for recovery alongside Strava for activities! Excited this worked, and my dashboard now includes my Whoop recovery score and RHR each day - and my coach takes these factors into account in my weekly reviews. Overall, process is super easy and mirrors the Strava connection almost 1:1!
---
Connect my Whoop to this project so my recovery data (recovery score, HRV,
resting heart rate, sleep, strain) can feed my training plans. Walk me through
it like a guide, one step at a time, in plain English. I may have never done
anything like this, so go slow, explain what you're doing, and wait for me
whenever you ask me a question. Don't dump it all at once.
Here's the plan. Take it one step at a time:
Step 1 - Help me register a Whoop developer app. Tell me to sign in at
through the form: any app name works (it's just for me), use
to run there - it's just a landing spot for a code I'll copy), and select the
read-only scopes: read:recovery, read:cycles, read:sleep, read:workout,
read:profile, read:body_measurement, and offline (explain that offline is what
lets you refresh my access without me re-approving every hour). Wait for me to
come back with my Client ID and Client Secret.
Step 2 - Store my credentials safely. Save the Client ID and Secret in a .env
file in this project (create it if it doesn't exist) as WHOOP_CLIENT_ID and
WHOOP_CLIENT_SECRET. Two hard rules: never repeat my secrets back to me in
chat, and if this project uses git, make sure .env is in .gitignore before
anything else happens.
Step 3 - Do the OAuth handshake with me. Build the authorization URL
client ID, the redirect URI, the scopes, and a random state value you
generate). Give me the URL to open in my browser and tell me what to expect:
after I approve, the browser will try to load localhost:8080 and FAIL to connect - that's normal and fine. Tell me to copy the full URL from the
address bar (it contains code=...) and paste it back to you. Check the state
matches what you generated, then exchange the code for tokens (POST to
authorization_code). Save WHOOP_ACCESS_TOKEN, WHOOP_REFRESH_TOKEN, and
WHOOP_TOKEN_EXPIRES_AT to .env. Clean up any temp files that touched tokens.
Step 4 - Verify it actually works. Make a live test call to
came back. Then pull my last 7 days so I can see real data: recovery, HRV, and
resting HR from /developer/v2/recovery, sleep from /developer/v2/activity/sleep,
workouts from /developer/v2/activity/workout, and daily strain from
/developer/v1/cycle (note: recovery/sleep/workout live under v2, cycle under
v1 - don't mix them up). Walk me through what my numbers mean.
Step 5 - Make it durable. Set up the refresh pattern so I never do this again:
before any pull, check WHOOP_TOKEN_EXPIRES_AT, and if it's expired, refresh via
grant_type=refresh_token (include scope=offline) and write the new tokens back
to .env - access tokens only last an hour, so this matters. Document this
pattern wherever this project keeps its instructions (CLAUDE.md or similar) so every future session knows how to pull Whoop without me explaining it.
Step 6 - Wire it into my coaching. Update whatever skills or instructions this
project uses for training plans and reviews so they actually USE this data:
pull the last 7-10 days of recovery/HRV/RHR/sleep before planning my week, and
read trends against MY OWN baseline (a 7-day rolling average), never a single
day in isolation - a declining HRV trend plus rising resting HR is an early
fatigue flag worth acting on. Two rules as you do this: my training log
(Strava/Garmin/watch) stays the source of truth for run data - Whoop is a
recovery lens, not an override - and recovery data should inform and flag, not
silently overrule what I say I want to do.
Step 7 - Wrap it up. Tell me exactly what you built, where my tokens live, what
you changed in my project files, and give me one example of a question I can
now ask you every morning (like "how recovered am I today?") that uses my real
Whoop data.