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

Getting data for a group of people

Hi so far what i understand is that Fitbit allows individuals to retrieve his/her own data. is there ways to retrieve data for a group of people? i m planning a group activity using fitbit.  Thanks in advance! 

Best Answer
3 REPLIES 3

You would need all people in a group to authorize your application and then you would need to retrieve each person's data individually.

Best Answer
0 Votes

Finally what I'm looking for.

 

Can you explain this a bit more please? Would the users in the group have to authrorize before their data was pulled each time?

 

Also would I have to calculate my own stats (leaders, averages etc.)

Best Answer
0 Votes

@ClearConnector wrote:

Can you explain this a bit more please? Would the users in the group have to authrorize before their data was pulled each time?


You will need to create a website that allows a user to authorize their device on your 'FitBit' application. In order for a device to be authorized using oauth2, fitbit needs a valid request uri to send the response back to. Once user authorization is complete, you can add their access and refresh details to the database and use their details when you're gathering the groups' information.

 

The users don't need to authorize each time the data is pulled, unless they unauthorize your fitbit api application. The application should obtain a new access token using the refresh token when it tries to get new group data (if the access token > 1 hour old) so that the requests are authorized.

 

You can retrieve certain friend details from the fitbit api as mentioned, however you can also do your own leaderboard calculations if you like. The leaders/averages/friends/ etc. are based on the specific users' account, rather than all users in a group. So if you need to calculate those details to be specific amongst the users in your group, it's best if you generate your own leaderboard.

Best Answer