[SOLVED] Implementing Withings API device status

Hi Everyone!

I want to do some simple API calls to get my Withings devices battery level.
I don’t really need other info than that (and the 1.x binding does not support this).

Withings API is public and free to use, but you will need to register an app (which is reviewed by Withings before enabling access).
I know that the Spotify binding does something same regarding the OAuth authentication, displays a HTML page with the login and it is used as callback url.

However Withing doesn’t allow localhost/IP addresses for callback URL, you need a website, plus application logo, etc…

Does someone tried to implement this or something similar which has this kind of limitation?

If yes, how should I do this?

Thanks!

1 Like

The Withthings binding uses callback https://www.openhab.org/oauth/withings/index.html. I would guess if you use that url with your own registration it will show the data after verification with Withthings api.

The documentation on the binding describes how to use it with the binding: https://www.openhab.org/addons/bindings/withings1/#advanced-oauth-configuration.
I do not know the specifics of the Withthings (only how Spotify OAuth2 works), but I would guess if you use the default of the binding you would get the credentials you can use in your own api calls.

May I invite you to the withings re-implementation thread?

Just so we can collect your requirements as well…

Thanks, that would be much better!