06-27-2018 23:51
06-27-2018 23:51
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.
06-28-2018 02:37 - edited 06-28-2018 02:43
06-28-2018 02:37 - edited 06-28-2018 02:43
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
06-28-2018 00:25 - edited 06-28-2018 00:39
06-28-2018 00:25 - edited 06-28-2018 00:39
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.)
06-28-2018 02:22
06-28-2018 02:22
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
06-28-2018 02:37 - edited 06-28-2018 02:43
06-28-2018 02:37 - edited 06-28-2018 02:43
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
06-28-2018 06:52
06-28-2018 06:52
Thanks JeCom. It worked as expected.
-MP
06-28-2018 07:04
06-28-2018 07:04
No problem, glad to help 🙂