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

Get data from unlogged account

Hi,

I'm creating an app for a non-profit organisation that owns several fitbit's and wants to import data (such as steps, km and so on) from each account into a database (for statistics and comparison). 

I've created a valid project and gave two different accounts the permission to share information with that said project.

 

It works when I use the /1/user/-/activities/steps/date/2017-03-01/2017-04-01.json, but when I try to use an actual user ID instead of the '-', the error 'insufficient_permissions - API client is not authorized by the resource owner to access the resource requested' is displayed. It only works when I'm currently logged in the account with that has that specific user ID that I'm trying to use.

 

Is there any way of getting data from several accounts without having to login into each one and load the page in order to catch info for each account? Or am I doing anything wrong?

 

Thanks

Best Answer
0 Votes
2 REPLIES 2

@Nor267 That's because you need an access token per user, you can't use a single access token across multiple users. Each individual user would have to authorize your app so that you can make requests on their behalf.

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes

Hi

At this point I'm not really sure if I know what you mean by access token O.o

I'm testing my app with 2 users and both of them authorised the said app. I can get the data from both of them if I use 'user/-/' and if I'm logged in that account specific, but not if I'm logged in one account and try to get data from the user using 'user/xxx/'. How can I get the access token from one account while logged in another?

Best Answer
0 Votes