GarminRunerz.Workout.Connect
1.0.0
dotnet add package GarminRunerz.Workout.Connect --version 1.0.0
NuGet\Install-Package GarminRunerz.Workout.Connect -Version 1.0.0
<PackageReference Include="GarminRunerz.Workout.Connect" Version="1.0.0" />
<PackageVersion Include="GarminRunerz.Workout.Connect" Version="1.0.0" />
<PackageReference Include="GarminRunerz.Workout.Connect" />
paket add GarminRunerz.Workout.Connect --version 1.0.0
#r "nuget: GarminRunerz.Workout.Connect, 1.0.0"
#:package GarminRunerz.Workout.Connect@1.0.0
#addin nuget:?package=GarminRunerz.Workout.Connect&version=1.0.0
#tool nuget:?package=GarminRunerz.Workout.Connect&version=1.0.0
GarminRunerz.Workout.Connect
Uploads workouts built with GarminRunerz.Workout.Models / GarminRunerz.Workout.Services to a Garmin Connect account.
Authentication (Garmin SSO, MFA, token caching) is handled by the unofficial Unofficial.Garmin.Connect client; workout creation posts your serialized workout JSON directly to Garmin Connect's workout-service API — the same API the Garmin Connect web app uses.
⚠️ This relies on Garmin Connect's private web API. It is intended for personal automation with your own account. It may break without notice if Garmin changes their API, and heavy or multi-account use may violate Garmin's terms of service.
Installation
dotnet add package GarminRunerz.Workout.Connect
Usage
Registration
services.AddGarminConnectUploader(options =>
{
options.Email = Environment.GetEnvironmentVariable("GARMIN_EMAIL")!;
options.Password = Environment.GetEnvironmentVariable("GARMIN_PASSWORD")!;
options.TokenCacheFilePath = "garmin-tokens.json"; // optional: persist tokens between runs
});
Uploading a workout
var uploader = provider.GetRequiredService<IWorkoutUploadService>();
// Build the workout with GarminRunerz.Workout.Services, then:
var created = await uploader.CreateWorkoutAsync(workout);
Console.WriteLine($"Created workout {created.WorkoutId}");
// Optionally schedule it on the Garmin Connect calendar:
await uploader.ScheduleWorkoutAsync(created.WorkoutId!.Value, new DateOnly(2026, 8, 20));
Once created (and synced), the workout appears in Garmin Connect and on your watch.
MFA accounts
If your account uses multi-factor authentication, provide an IMfaCodeProvider:
options.MfaCodeProvider = new StaticMfaCode("123456");
// or implement IMfaCodeProvider to prompt/fetch the code dynamically
With TokenCacheFilePath set, the MFA prompt only happens on the first run — subsequent runs reuse the cached OAuth tokens.
API
| Method | Description |
|---|---|
CreateWorkoutAsync(workout) |
Creates the workout; returns it with the Garmin-assigned WorkoutId. |
UpdateWorkoutAsync(workout) |
Updates an existing workout (WorkoutId required). |
ScheduleWorkoutAsync(id, date) |
Schedules the workout on the Garmin Connect calendar. |
DeleteWorkoutAsync(id) |
Deletes the workout. |
The registration also exposes the full IGarminConnectClient (activities, devices, SendWorkoutToDevices, …) for anything beyond workout upload.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- GarminRunerz.Workout.Models (>= 1.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Unofficial.Garmin.Connect (>= 0.9.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 99 | 8/18/2026 |