withings-to-intervals-icu
Copy your Withings weight and body fat measurements into Intervals.icu wellness.
- Fills only empty fields by default. A day that already has a weight in Intervals.icu keeps it, but still gets body fat if that's missing. Use
--overwriteto replace existing values. - Takes one reading per day: the earliest weigh-in, which is usually the morning one.
- Skips Withings readings the scale couldn't confidently assign to you (for example on a shared scale), and skips days you've locked in Intervals.icu.
uvx withings-to-intervals-icu # last 30 days
uvx withings-to-intervals-icu --all # full history
uvx withings-to-intervals-icu --start 2024-01-01 --end 2024-12-31
uvx withings-to-intervals-icu --all --dry-run # preview, write nothing
uvx withings-to-intervals-icu --all --overwrite
Setup
1. Intervals.icu API key
In Intervals.icu go to Settings → Developer Settings and generate an API key.
2. Withings developer app
Withings only offers OAuth2, so you need your own (free) developer app:
-
Sign in at the Withings Developer Dashboard and create a Public API application.
-
Set the Callback URL to
https://example.com, exactly as written, with no path. Withings rejectslocalhostand IP addresses and only accepts a publichttps://URL that answers aHEADrequest with200. The example.com homepage passes that check, and the page doesn't need to do anything because you'll copy the code out of the browser's address bar. The code is useless without your client secret and expires after 30 seconds.If Withings won't accept example.com, use any page you control instead and pass it with
--withings-redirect-uri. -
Note the Client ID and Client Secret.
3. Credentials
Pass each value as a command-line option, set the matching environment variable, or put it in a .env file in the directory you run the command from. Options win over environment variables, which win over .env.
| Option | Environment variable | Required | |
|---|---|---|---|
--withings-client-id |
WITHINGS_CLIENT_ID |
yes | From the Withings app |
--withings-client-secret |
WITHINGS_CLIENT_SECRET |
yes | From the Withings app |
--withings-redirect-uri |
WITHINGS_REDIRECT_URI |
no | Defaults to https://example.com; must match the registered callback URL exactly |
--intervals-icu-api-key |
INTERVALS_ICU_API_KEY |
yes | From Intervals.icu settings |
--intervals-icu-athlete-id |
INTERVALS_ICU_ATHLETE_ID |
no | Defaults to 0, meaning the owner of the API key |
uvx withings-to-intervals-icu --all \
--withings-client-id ... --withings-client-secret ... \
--intervals-icu-api-key ...
Secrets passed as options end up in your shell history and are visible in ps, so prefer environment variables for scheduled runs.
4. First run
The first run opens a browser so you can approve access. After you approve, Withings redirects you to your callback URL with a ?code=... in the address bar. Copy the whole URL and paste it into the terminal within 30 seconds, because that's how long Withings codes stay valid.
The resulting token is saved to ~/.config/withings-to-intervals-icu/withings-token.json and refreshed automatically, so later runs (including cron) don't need a browser. If the token ever stops working, run again with --reauth.
Development
uv run pytest
uv run withings-to-intervals-icu --help
Releasing
Pushing a version tag publishes to PyPI from GitHub Actions using Trusted Publishing, so no API token is stored anywhere. The workflow runs the tests first and refuses to publish if the tag doesn't match version in pyproject.toml.
# bump version in pyproject.toml, commit, then:
git tag v0.1.0 && git push --tags
One-time setup before the first release: on PyPI, add a pending publisher (Account → Publishing) for project withings-to-intervals-icu, owner bartTC, repository withings-to-intervals-icu, workflow publish.yml, environment pypi.
Metadata
Release files for withings-to-intervals-icu 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| withings_to_intervals_icu-0.1.0.tar.gz | 22.5 kB | With provenance | Details for withings_to_intervals_icu-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| withings_to_intervals_icu-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for withings_to_intervals_icu-0.1.0-py3-none-any.whl |
Total release size: 34.9 kB
Release files / withings_to_intervals_icu-0.1.0.tar.gz
| Download URL | withings_to_intervals_icu-0.1.0.tar.gz |
|---|---|
| Size | 22.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
110ff975461ef26d64049b1682d500eff7940727a191f1f607d531eb27c0ed4c
|
|
BLAKE2b-256 checksum How to use checksums |
219bb5113c6b9342189cd8881a7782803678c75871b4217203bf1797bf32fc44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / withings_to_intervals_icu-0.1.0-py3-none-any.whl
| Download URL | withings_to_intervals_icu-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0d03b4a95ff9772cdd288b63dc95f6b12bbf48865c343bbad0d6884cc996687
|
|
BLAKE2b-256 checksum How to use checksums |
485e49ab8ce3dee3f1272794f412d475833411d32cc087062d9b85482dff6fbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logSecurity for withings-to-intervals-icu 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for withings_to_intervals_icu-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.