Modern .NET SDK for Withings generated from the provider's OpenAPI definition with AutoSDK.
Built from a manually-crafted OpenAPI spec covering Withings's Health API so the SDK stays close to the upstream API surface.
Designed for fast regeneration and low-friction updates when the upstream API changes without breaking compatibility.
Targets current .NET practices including nullability, trimming, NativeAOT awareness, and source-generated serialization.
using Withings;
// Pass your OAuth2 access token (see Authentication below)
using var client = new WithingsClient(accessToken);Withings uses OAuth 2.0 Authorization Code flow. This SDK handles API calls with a Bearer token — you are responsible for obtaining the access token via OAuth2.
Register at the Withings Partner Hub to get your client_id and client_secret.
https://account.withings.com/oauth2_user/authorize2
?response_type=code
&client_id=YOUR_CLIENT_ID
&state=RANDOM_STATE
&scope=user.info,user.metrics,user.activity
&redirect_uri=YOUR_CALLBACK_URL
Available scopes: user.info, user.metrics, user.activity, user.sleepevents
POST https://wbsapi.withings.net/v2/oauth2
Content-Type: application/x-www-form-urlencoded
action=requesttoken
&grant_type=authorization_code
&client_id=YOUR_CLIENT_ID
&client_secret=YOUR_CLIENT_SECRET
&code=AUTH_CODE_FROM_CALLBACK
&redirect_uri=YOUR_CALLBACK_URLThe response contains access_token (valid ~3 hours) and refresh_token (valid ~1 year).
using var client = new WithingsClient(accessToken);
// Get body measurements (weight, BP, SpO2, etc.)
var measurements = await client.Measure.MeasureGetmeasAsync(...);
// Get sleep summary
var sleep = await client.Sleep.Sleepv2GetsummaryAsync(...);
// Get daily activity (steps, calories)
var activity = await client.Activity.Measurev2GetactivityAsync(...);POST https://wbsapi.withings.net/v2/oauth2
Content-Type: application/x-www-form-urlencoded
action=requesttoken
&grant_type=refresh_token
&client_id=YOUR_CLIENT_ID
&client_secret=YOUR_CLIENT_SECRET
&refresh_token=YOUR_REFRESH_TOKENOpen an issue in tryAGI/Withings.
Use GitHub Discussions for design questions and usage help.
Join the tryAGI Discord for broader discussion across SDKs.
This project is supported by JetBrains through the Open Source Support Program.
