Skip to content

Contains scripts for downloading activities from your Garmin Connect account.

Notifications You must be signed in to change notification settings

mvaneijken/GarminConnect

Repository files navigation

Garmin Connect Activity Export

Description

This script lets you backup your activities stored in Garmin Connect. It supports backups in de the following formats:

  • FIT (default)
  • GPX
  • TCX
  • KML

It supports two download options:

  • Delta, exporting only new activities (default)
  • Full, exporting all activities available.

The scripts does the following:

  • Downloads activity files from garmin in FIT, TCX, GPX or KML format.
  • Supports delta download

Commandline options

The following commandline options are available:

  • ActivityFileType (Optional) - Choose the activitiy file type to export in. FIT is the default value.
    • FIT (default)
    • TCX
    • GPX
    • KML
  • DownloadOption (Optional) - Choose to download only new activities or all activities. At the first time all activities are downloaded. Depends on a cookie file placed in the destination folder.
    • New (Default)
    • All
  • Destination (Mandatory) - The location on your device where the files need to be exported to.
  • Username (Mandatory) - Your Garmin Connect username.
  • Password (Mandatory) - Your Garmin Connect account password.
  • Overwrite (Optional) - Overwrite existing files in the destination location.
    • Yes
    • No (Default)

You can change the default options the following XML file:

  • GCUserSettings: Containing specific settings for your situation;

Examples

Download only new activities in the FIT format:
& C:\Scripts\GCActivityExport.ps1 -Destination "c:\GarminActivities" -UserName "<Your Garmin Connect Username>" -Password "<Your Garmin Connect Password>"

Download all activities in TCX format overwriting all files in the destination:
& C:\Scripts\GCActivityExport.ps1 -Destination "c:\GarminActivities" -UserName "<Your Garmin Connect Username>" -Password "<Your Garmin Connect Password>" -ActivityFileType TCX -DownloadOption All -Overwrite Yes

Version history

1.0 - Initial version
1.1 - Fix: Garmin now expects parameters in the SSO url
Update: Added settings support in separate XML files
1.2 - Update support for new Garmin activity feed
1.3 - Update to support the new Garmin Signin URL
1.3.1 - Fix due error 402 Payment required error when retrieving activity list
1.3.2 - Remove default destination folder, because it causes to ignore the GCUserSettings.xml destination
Remove empty strings for Username and Password
Format layout
1.4 - Update authentication process to use an OAuth token (thanks to @ShiveringPenguin)
Add support for KML files
Updated user-agent
Remove Garmin Connect Actvity Export -Program Settings.xml dependency
Layout and output improvements
Report when rate limited (or any other error from Garmin)

Credits

Credits to Kyle Krafka (https://github.com/kjkjava/) for delivering a great example for this script.

About

Contains scripts for downloading activities from your Garmin Connect account.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published