Access COROS data through a dual-channel integration: use mobile API for daily health metrics like sleep stages, sleep heart rate, and wellness-style daily stats; use COROS Training Hub web API for activities, activity details, training plans, workout programs, training schedule, HRV, recovery, threshold metrics, and training analysis. Use when the user asks about COROS, sleep, REM, deep sleep, resting heart rate, HRV, training load, activities, runs, rides, workouts, training plans, or schedule data.
Use the bundled script at {baseDir}/scripts/coros_data.py.
mobile endpoints for daily health and sleep-oriented questions.web endpoints for activity, training, and analysis-oriented questions.{baseDir}/.coros.env when present.COROS_WEB_TOKEN.COROS_MOBILE_TOKEN or COROS_MOBILE_EMAIL + COROS_MOBILE_PASSWORD.auth-mobile to mint a mobile token manually when needed.COROS_WEB_TOKEN is obtained via Playwright browser login (see below).The web API (COROS_WEB_TOKEN) cannot be obtained via mobile API login. Use the Playwright script:
cd {baseDir}/scripts
node coros_web_login.js [email] [password]
This prints the token to stdout. To save it:
cd {baseDir}/scripts
TOKEN=$(node coros_web_login.js)
sed -i "s/export COROS_WEB_TOKEN='.*'/export COROS_WEB_TOKEN='$TOKEN'/" ../.coros.env
The script:
CPL-coros-token cookie (the web API access token)../.coros_web_session for potential reuseNote: The privacy policy checkbox must be checked — it is visually hidden and rejects programmatic clicks. The script uses evaluate() to check it directly via JavaScript.
set -a && . {baseDir}/.coros.env && set +a
# Get web token (Playwright — needed for activity/schedule/HRV data)
node {baseDir}/scripts/coros_web_login.js
# Mint mobile token (for sleep / daily health)
python3 {baseDir}/scripts/coros_data.py auth-mobile --email <email> --password <password>
# Activities (uses COROS_WEB_TOKEN)
python3 {baseDir}/scripts/coros_data.py activities --size 10
# Activity detail
python3 {baseDir}/scripts/coros_data.py activity-detail --label-id <id>
# Training schedule
python3 {baseDir}/scripts/coros_data.py schedule --start 20260328 --end 20260410
# HRV
python3 {baseDir}/scripts/coros_data.py hrv
# Sleep (uses COROS_MOBILE_TOKEN)
python3 {baseDir}/scripts/coros_data.py sleep --start 20260321 --end 20260406
When the user asks for analysis instead of raw data, organize the answer around these blocks.
Focus on recovery quality, not just time in bed.
Use this block to judge whether recovery is real, partial, or clearly insufficient.
Separate performance, cost, and mechanics.
Use this block to answer whether the run was efficient, forced, drifting, or mechanically unstable.
Look for trends and coupling, not isolated values.
Use this block to judge whether fitness is improving, stagnating, or being masked by fatigue.
Combine sleep and training.
Use this block to judge readiness, overload risk, and whether intensity should be raised or reduced.
Prefer combined interpretations over single metrics.
{baseDir}/references/coros-workout-field-notes.md first.