Strava Integration¶
Cadence connects to Strava via OAuth2 to pull activities, athlete stats, and training zones.
Setup¶
1. Create a Strava API App¶
- Go to Strava API Settings
- Create a new application
- Set the authorization callback domain to your server:
- Local development:
localhost - Production: your domain
- Local development:
2. Configure Environment Variables¶
STRAVA_CLIENT_ID=your-client-id
STRAVA_CLIENT_SECRET=your-client-secret
STRAVA_REDIRECT_URI=http://localhost:8000/auth/strava/callback
3. Authorize¶
Navigate to http://localhost:8000/auth/strava in your browser. You'll be redirected to Strava to authorize, then back to your server.
Available Data¶
Activities¶
| Data | Tool | Description |
|---|---|---|
| Recent activities | strava_get_activities |
Runs, rides, swims with distance, pace, HR, suffer score |
| Activity detail | strava_get_activity_detail |
Splits, laps, HR zones, elevation |
Athlete Stats¶
| Data | Tool | Description |
|---|---|---|
| Stats | strava_get_stats |
All-time, year-to-date, and recent totals for run/ride/swim |
| Training zones | strava_get_zones |
HR and power zone boundaries from your Strava profile |
Cross-Platform Behavior¶
When both Strava and Garmin are connected:
- Activities: The unified
get_activitiestool merges data from both sources with duplicate detection - Running volume:
get_running_volumetries Garmin first, falls back to Strava - Athlete stats:
get_athlete_statsis Strava-only (Garmin doesn't expose equivalent totals) - Training zones:
get_training_zonespulls from Strava's zone configuration