Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Device API without Companion API ?

Hi,

We are planning to get information from patients for a medical study.

In order to do that, we are planning to have our own database with data colected from fitbit and some other sources.

 

My question is, is it possible to use only Device API without Companion API to collect data? 

To put it another way, Device API and device itself is cabaple of communicating with an external server (over REST etc) through Wifi etc?

 

As far as i understand, the only way is, 

 

Send fitbit data from Device API -> Companian API (app on a mobile device) -> and then from mobile app to our own server (backend)

 

I dont want to use Web API due to its restrictions for calls. 

I would like to collect data directly from device and send it to our database.

 

 

Thanks

Best Answer
0 Votes
5 REPLIES 5

You need to pass your data through the Companion, because the Device (Fitbit Ionic, Versa etc.) can't communicate over the Internet -although they have WiFi hardware-.

But it would be nice to be able to do it just through WiFi...

Best Answer
0 Votes

It is really a big restriction that i have to develop mobile app just to pass information. 

Best Answer
0 Votes

You don't need to develop a mobile app, the Companion API is a second JavaScript component of your Fitbit app. 

 

Take a look at the messaging API which is used to send messages between the device and its companion.

https://dev.fitbit.com/build/guides/communications/messaging/

 

Also take a look at the app and companion folders in this sample app https://github.com/Fitbit/sdk-oauth

Best Answer
0 Votes

Hi Jon,

 

Thanks for the reply. Still I am trying to understand structure of the applications such that what is running where.

 

- Device API should run on fitbit device itself. I am clear about it. So that it runs on Fitbot OS which is installed on fitbit device.  In addition, it can communicate with Companion API which can also access other services & servers via internet.

 

However, I am not sure about where the application using Companion API runs. It seems that, it runs on the mobile device , however as you say, it does not need to be a seperate mobile application but it runs inside official Fitbot app (IOS & Android -  https://www.fitbit.com/app) Is that correct?

 

As per documentation it says:

 

"/companion/  Code in this folder has access to the Companion API and is capable of making direct requests to the internet, and communicating with the application."

 

So Companion API should have alredy be installed on mobile device right? Is it again a part of the official Fitbit app ? ( https://www.fitbit.com/app)

 

If it is correct, then how we integrate our custom Companion API with the offical fitbit App. It is something like plug-in or add-on?

 

I have also checked the documentation and code samples however i still couldnt get what kind of environment or application it runs in.

 

Many thanks,

 

Best Answer

Hello levye,

 

I'd like to know, did you figure out at the end how everything works? 
I'm too a bit confused, this is not clear to me.

 

Thanks a lot for your answer.

Best Answer
0 Votes