Hello there,
Can fitbit app communicate with my own server via Rest API?
How to achieve this?
Thanks,
MP
Answered! Go to the Best Answer.
Yes, that's totally possible in the same way. For example, here is how it is done for the Golf GPS app:
https://github.com/pieteroskam/Fitbit-Golf-GPS/blob/master/companion/index.js
Yes, you can take a look at this example. In this example the companion (your phone) sends a GET call to the fitbit servers to retrieve some sleep data (that code is here). Then it uses messaging to communicate the received data from your phone to your watch (that code is here).
(The github page also explains how to get an OAuth ID and secret. But these might only be necessary to communicate with the fitbit web API.)
Hi JeCom,
Yes, Fitbit Web APIs are available to get/ post data from/ to fitbit.com.
But I want my own fitbit app to communicate with my server with URL such as https://<server_domain_name>/get/userid.
Is there a way to do that?
Thanks,
MP
Best AnswerYes, that's totally possible in the same way. For example, here is how it is done for the Golf GPS app:
https://github.com/pieteroskam/Fitbit-Golf-GPS/blob/master/companion/index.js
Thanks JeCom. It worked as expected.
-MP