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

How Fitbit Web App access others' data.

ANSWERED

Hi,

I have a Fitbit account.

I used it to register one of the Fitbit application.

I can access the data from my own account.

I use the WEB API to download the json file successfully.

 

Ok, here is my question.

Can I use this application to access other account's data?

 

Thanks 

 

Best Answer
1 BEST ANSWER

Accepted Solutions

@WangQiang wrote:
Can I use this application to access other account's data?

Not without their permission. You need the person whose data you want to access to authorize your application. When they authorize your application using the OAuth 1.0a authorization flow, your app will get an access token and access token secret for that user. You can then make OAuth 1.0a requests to the Fitbit API to access their data on their behalf.

View best answer in original post

Best Answer
0 Votes
4 REPLIES 4

@WangQiang wrote:
Can I use this application to access other account's data?

Not without their permission. You need the person whose data you want to access to authorize your application. When they authorize your application using the OAuth 1.0a authorization flow, your app will get an access token and access token secret for that user. You can then make OAuth 1.0a requests to the Fitbit API to access their data on their behalf.

Best Answer
0 Votes

Hi Jeremiah,

Would be helpful if you specify the steps to do the same. I have registered my sample application on fitbit, wanted to get multiple user's data so on two users I have registered same application and received 2 sets of client id and client secret, both are set as server instead of personal. But no matter which set of client id and secret I use I end up with only the 1st person's data. 

Question is: How to request somebody to authorize my application?

 

Best Answer

I am investigating an application to collect people's fit bit information for a medical center, with their consent.  I believe I would gather consent using something like Aaron Coleman's C# MVC web application to authorize, prompt the user to login to fitbit, and allow access to various scopes(activity, heartrate...).  Then, during the same session, I can then access the user activity information using the OAuth2 token and such.  

My question, being new to OAuth is, what happens then?  Do I just need to configure a Subscription and associated web page to handle any updated data that is pushed to me? Does the Subscription send me FitBit data for all users who have clicked Allow on the fitbit.com auth page?  Or do I need to store each user's token and have an application loop through all users and access the API for each person we store a token for?

Best Answer
0 Votes

Uzair-infrrd wrote:...
But no matter which set of client id and secret I use I end up with only the 1st person's data. 

Question is: How to request somebody to authorize my application?

 


Did you replace '-' in the API request with the ID of the relevant user?

Peter McLennan
Gondwana Software
Best Answer