Screen scraping the Garmin Connect site with powershell

Garmin does this stupid thing where they don’t share your daily step counts with other fitness sites like fitbit or mapmyfitness. Garmin has an API but sadly they charge to use it, which is dumb.

Anyways I started ripping through their user site and I found a JSON data service that I can access once I’ve logged into the site .  The following is a powershell script to login to the garmin connect site and then pull json data.

Powershell makes it so easy to use JSON data too

scrape

This is how I spend my evenings … elbows deep in other peoples code 😀

test.ps1

1 Comment

  1. Hi Bain, thank you for sharing. Are there any updates to your script? I get:
    Invoke-WebRequest : 404 Not Found: Requested route (‘failover-kcg.garmin.com’) does not exist.
    At line:15 char:9
    + $site = Invoke-WebRequest -UseBasicParsing -Uri “https://sso.garmin.com/sso/logi …

Leave a Reply

Your email address will not be published. Required fields are marked *