{"id":25611459,"url":"https://github.com/sealbro/dotnet.garmin.connect","last_synced_at":"2026-01-04T19:20:18.444Z","repository":{"id":39801373,"uuid":"425591135","full_name":"sealbro/dotnet.garmin.connect","owner":"sealbro","description":"Unofficial garmin connect client","archived":false,"fork":false,"pushed_at":"2025-03-26T06:26:40.000Z","size":323,"stargazers_count":25,"open_issues_count":2,"forks_count":8,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-30T22:12:00.410Z","etag":null,"topics":["client","dotnet","dotnet-core","garmin"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sealbro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-07T19:02:10.000Z","updated_at":"2025-03-26T06:21:47.000Z","dependencies_parsed_at":"2024-01-17T12:31:01.120Z","dependency_job_id":"350200c8-7618-40e0-8a18-8416fee61884","html_url":"https://github.com/sealbro/dotnet.garmin.connect","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sealbro%2Fdotnet.garmin.connect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sealbro%2Fdotnet.garmin.connect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sealbro%2Fdotnet.garmin.connect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sealbro%2Fdotnet.garmin.connect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sealbro","download_url":"https://codeload.github.com/sealbro/dotnet.garmin.connect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595335,"owners_count":20963943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","dotnet","dotnet-core","garmin"],"created_at":"2025-02-21T23:19:44.638Z","updated_at":"2026-01-04T19:20:13.424Z","avatar_url":"https://github.com/sealbro.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Garmin.Connect\n\nUnofficial dotnet garmin connect client\n\n[![Build](https://github.com/pachman/dotnet.garmin.connect/actions/workflows/build.yml/badge.svg)](https://github.com/pachman/dotnet.garmin.connect/actions/workflows/build.yml)\n[![NuGet Version](http://img.shields.io/nuget/v/Unofficial.Garmin.Connect.svg)](https://www.nuget.org/packages/Unofficial.Garmin.Connect/)\n[![NuGet Downloads](http://img.shields.io/nuget/dt/Unofficial.Garmin.Connect.svg)](https://www.nuget.org/packages/Unofficial.Garmin.Connect/)\n\n## About\n\nThis package allows you to request your device, activity and health data from your Garmin Connect account.\n\n**WARNING!** Use the library only for personal automation without too many accounts. For other needs [request access](https://developer.garmin.com/gc-developer-program/overview/) to the developer program.\n\n## Installation\n\n```bash\ndotnet add package Unofficial.Garmin.Connect\n```\n\n## Using\n\n### Default authentication\n\n```dotnet\nvar login = \"\u003cgarmin login\u003e\";\nvar password = \"\u003cgarmin password\u003e\";\nvar authParameters = new BasicAuthParameters(login, password);\n\nvar client = new GarminConnectClient(new GarminConnectContext(new HttpClient(), authParameters));\n```\n\n### Authentication with MFA (multi-factor auth) codes\n\n```dotnet\nvar login = \"\u003cgarmin login\u003e\";\nvar password = \"\u003cgarmin password\u003e\";\nvar authParameters = new BasicAuthParameters(login, password);\n\nvar mfaCode = new StaticMfaCode();\n\nvar client = new GarminConnectClient(new GarminConnectContext(new HttpClient(), authParameters, mfaCode));\n```\n\nExample `IMfaCodeProvider` implementation\n\n```dotnet\npublic class StaticMfaCode: IMfaCodeProvider\n{\n    public Task\u003cstring\u003e GetMfaCodeAsync()\n    {\n        // 1. static code\n        var code = \"123456\";\n        \n        // 2.  wait input code from console\n        // var code = Console.ReadLine().Trim();\n        \n        // 3. any other approach how to wait and get the code from the user\n        // like read from file, variable, form input, etc.\n        \n        return Task.FromResult(code);\n    }\n}\n```\n\n## Build and publish\n\n- build `./pack.sh`\n- pack `./publish.sh`\n\n## Tests\n\n- set environment variables `GARMIN_LOGIN` and `GARMIN_PASSWORD`\n  - JetBrains Rider `File | Settings | Build, Execution, Deployment | Unit Testing | Test Runner`\n\n## Thanks\n\n- The first vision from [cyberjunky/python-garminconnect](https://github.com/cyberjunky/python-garminconnect)\n- Icons made by [Freepik](https://www.freepik.com) from [www.flaticon.com](https://www.flaticon.com/)\n- Converter JSON to C# [app.quicktype.io](https://app.quicktype.io/)\n- and [Garmin](https://connect.garmin.com) for the best devices\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsealbro%2Fdotnet.garmin.connect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsealbro%2Fdotnet.garmin.connect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsealbro%2Fdotnet.garmin.connect/lists"}