06-13-2017 08:37
06-13-2017 08:37
I am unable to get daily activity summary of friends on my fitbit account. I am using the end point as
https://api.fitbit.com/1/user/[userID]/activities/date/[date].json., this works perfect for me. But, when i try to get my friends summary, i get an exception (API client is not authorized by the resource owner to access the resource requested). From the earlier posts in the forum, i understand that for the Intraday summary, i have to request permissions.
Are there any special permissions/access to be requested for accessing friends daily summary through web API?
06-14-2017 10:50
06-14-2017 10:50
I also have the same issue and last 2 days activity summary not being populated correctly.
API: https://api.fitbit.com/1/user/<user_id>/activities/date/today.json
06-20-2017 08:10
06-20-2017 08:10
@SunsetRunner You can't access other users' data, they have to give permission by authorizing your app. Once they authorize, then you can make requests on their behalf.
06-20-2017 08:26
06-20-2017 08:26
This is working again! For few days it didn't work and now back again.
Anything going on with the API services?
06-20-2017 08:32
06-20-2017 08:32
@gajen.sunthara It doesn't look like there's been any recent incidents: http://www.fitbitstatus.com/
06-27-2017 18:47 - edited 06-27-2017 19:04
06-27-2017 18:47 - edited 06-27-2017 19:04
A little late here, but I'm also having the same problem. Requests for my own data (https://api.fitbit.com/1/user/-/activities/steps/date/today/1w.json) work fine, but requesting data for any of my Fitbit friends (https://api.fitbit.com/1/user/123456/activities/steps/date/today/1w.json) does not work and returns a 403 "API client is not authorized by the resource owner...".
The users have authorized my app and according to the other posts here it should work after that. Though I'm curious about specifically what "on their behalf" actually means? Any ideas would be very helpful.
For more context, what I'm trying to do is within my app, compare the logged in user's step data with any of their friends who have authorized the app. They click on their friends name and it shows their step data side by side along with their friends.
07-06-2017 14:43
07-06-2017 14:43
@SunsetRunner were you able to get this working? I am still not able to.
07-07-2017 07:53
07-07-2017 07:53
@solidsnake If they have authorized your app (and allowed whatever scopes you need), then it's likely that you're using the incorrect access token when requesting their data. Each user authorization creates a unique access token, which can then be used to make requests.
07-07-2017 18:33 - edited 07-07-2017 18:34
07-07-2017 18:33 - edited 07-07-2017 18:34
@AndrewFitbit Thanks for your reply! I think I may not be understanding something here. So in a situation where I am authorized, is it possible for me to view my stats alongside my friends, who has also authorized the same application?
When you say "each user authorization creates a unique access token..." it sounds like a user can access only their own data using the access token that they get after authorizing? Is that true?
07-25-2017 18:18
07-25-2017 18:18
@AndrewFitbit not sure if you saw my reply but any help here would be greatly appreciated!
07-31-2017 07:24
07-31-2017 07:24
@solidsnake You can't access other users' accounts with your own token because that token is specifically for the account that authorized the app (yours), you need to use their access token (or another user's access token) if you want to access data other than your own. Access tokens are obtained when a user authorizes your app.
08-05-2017 06:43
08-05-2017 06:43
@AndrewFitbit thanks for your reply.
08-15-2017 10:57
08-15-2017 10:57
Hello, I believe Im having a related issue. I am able to complete a request with the access token, but the activity values for today and all previous days are empty when the fitbit is in fact working. Similarly heart rate and other activity details are all zeros.
Here's my request and output
curl -X GET 'https://api.fitbit.com/1/user/{user_id}/activities/date/today.json' -H 'Authorization: Bearer eyJhbGciOiJ.....'
{"activities":[],"goals":{"activeMinutes":30,"caloriesOut":2865,"distance":8.05,"floors":10,"steps":10000},"summary":{"activeScore":-1,"activityCalories":0,"caloriesBMR":1007,"caloriesOut":1007,"distances":[{"activity":"total","distance":0},{"activity":"tracker","distance":0},{"activity":"loggedActivities","distance":0},{"activity":"veryActive","distance":0},{"activity":"moderatelyActive","distance":0},{"activity":"lightlyActive","distance":0},{"activity":"sedentaryActive","distance":0}],"elevation":0,"fairlyActiveMinutes":0,"floors":0,"lightlyActiveMinutes":0,"marginalCalories":0,"sedentaryMinutes":826,"steps":0,"veryActiveMinutes":0}}