0

I want to automatize the monitoring of some users of Withings products, like gathering informations (weight, heartbeats etc.) every x time.

For that purpose I tried to interact with the Withing API, using java (OAuth with a scribe class).

I tried the WithingsExample class and tried on my account. Everything goes well, I can access my data, but the problem is that I have to re-authenticate every time, which has no sense in my project since I try to automatize the data collect, my users wouldn't even access their account (I would manage it for them).

Is that possible to authenticate just one time, and then be able to retrieve data from my users several times ?

Malik
  • 207
  • 1
  • 2
  • 14

2 Answers2

0

you can make use of the subscibe function, documented here:

http://oauth.withings.com/api/doc#api-Notification-notify_subscribe

Hibbem
  • 1,491
  • 15
  • 22
0

Yes this is possible. You simply need to store the access token (http://oauth.withings.com/api received from completing step 3). This token is your key to the user's data. If you persist it somewhere, in your program before authenticating again you can check if you already have an access token for the user. If you do, just pull that token and use it instead of authenticating.

Hennessy
  • 128
  • 6