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

Multiple device syncing, integrating oath2 using javascript

Hi all,

I am a dev and I am trying to have a way of getting data from multiple Fitbit watches.

I registered an app https://dev.fitbit.com/apps/new and put OAuth 2.0 Application Type * as a server.
I have also created a node js server. I am wondering how I would link the watches to this server.
I am having trouble understanding the documentation. I was wondering if someone could help me figure out the next steps.

Best Answer
0 Votes
3 REPLIES 3

Hi @jatieko 

 

Your application will not connect directly to the Fitbit device.   Instead, the user will pair the Fitbit device to their Fitbit account, then consent to share their data stored in their account with your application.  The data from all devices paired to the same account are reconciled together.  When the data is pulled through the API, we will provide you with the reconciled data.   It will not show the data comes from one device vs the other.

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Thanks for the detailed reply.

I have some follow-up questions:

1. If users authenticate their devices to the application I created, can I be able to use Javascript to hit the APIs endpoints that can allow me access to their data.

2. My application will not be creating an application for the fitbit watch but will be a website that gets data from the fitbit watches. Do you mind pointing me in the right direction on how to set it up.

Thank you

Best Answer
0 Votes

Technically, the devices are not authenticated to your application.   It's their Fitbit account which is authenticated to your application.

 

1. Yes, you can use javascript to retrieve the user's data through the Web API.

2. Sounds like your application is going to use the Web API to retrieve the user's data.   The link to our Getting Started guide is here: https://dev.fitbit.com/build/reference/web-api/developer-guide/getting-started/

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes