A simple way to query Withings API from command line.
withings query [-v API_VERSION] -s SERVICE -p PARAM VALUE -p PARAM VALUE ... USER
pip install withings-cliRegister as a Withings developer and configure your Withings API key and secret.
withings config apikey [KEY]
withings config apisecret [SECRET]Note! Do not disclose your API secret to anyone, as per the Withings' Terms of Service, you are responsible for maintaining the secrecy and security of your keys.
Note! Keys will be stored in ~/.withings (programmatically chmod to 0600).
withings add meNote! For withings-cli to be able to access user data, the user should allow it to do so (me in this case). This call will automatically open a web browser directed to Withings account login page.
The following call should show mes details — if the above step was accomplished.
withings whois mewithings query -v1 -s measure -p action getmeas meSee how the query format corresponds to
Withings API reference: https://wbsapi.withings.net/measure?action=getmeas
withings --help
withings query --help