Skip to content

kblomqvist/withings-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Withings CLI

PyPI Number of downloads during the last month

A simple way to query Withings API from command line.

withings query [-v API_VERSION] -s SERVICE -p PARAM VALUE -p PARAM VALUE ... USER

Installation

pip install withings-cli

Set your API key and secret

Register 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).

Add user

withings add me

Note! 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.

Check who am I

The following call should show mes details — if the above step was accomplished.

withings whois me

Query mes body measures

withings query -v1 -s measure -p action getmeas me

See how the query format corresponds to Withings API reference: https://wbsapi.withings.net/measure?action=getmeas

Read help for more commands and options

withings --help
withings query --help