Back to Oh My Posh

Withings

website/docs/segments/health/withings.mdx

29.13.02.7 KB
Original Source

import WithingsConnect from "/img/withings.svg";

What

The Withings health ecosystem of connected devices & apps is designed to improve daily wellbeing and long-term health.

Accessing your Withings data

To allow Oh My Posh access your Withings data you need to grant access to read your public activities. This will give you an access and a refresh token. Paste the tokens into your Withings segment configuration.

Click the following link to connect with Withings:

<a href="https://account.withings.com/oauth2_user/authorize2?client_id=93675962e88ddfe53f83c0c900558f72174e0ac70ccfb57e48053530c7e6e494&response_type=code&redirect_uri=https://ohmyposh.dev/api/auth&scope=user.activity,user.metrics&state=withings" className="withings"

<WithingsConnect /> </a>

Sample Configuration

import Config from "@site/src/components/Config.js";

<Config data={{ type: "withings", style: "powerline", powerline_symbol: "\uE0B0", foreground: "#ffffff", background: "#000000", template: "{{ if gt .Weight 0.0 }} {{ round .Weight 2 }}kg {{ end }}", options: { access_token: "11111111111111111", refresh_token: "1111111111111111", http_timeout: 1500, }, }} />

Options

NameTypeDefaultDescription
access_tokentemplatetoken from Withings login, see login link in section above.
refresh_tokentemplatetoken from Withings login, see login link in section above.
expires_inint0the default timeout of the token from the Withings login
http_timeoutint20how long do you want to wait before you want to see your prompt more than your Withings data?

Template (info)

:::note default template

template
{{ if gt .Weight 0.0 }} {{ round .Weight 2 }}kg {{ end }}

:::

Properties

NameTypeDescription
.Weightfloatyour last measured weight
.SleepHoursstringyour last measured sleep SleepHours
.Stepsintyour last measured steps

Now, go out and be active!