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

Not able to access child sleep data

ANSWERED

I've implemented aAuth for login in Android app.

I'm able to access the sleep data for the user who is logged in but I'm not able to access sleep data of child through API. I get following error.

 

{
"errors": [
{
"errorType": "insufficient_permissions",
"message": "API client is not authorized by the resource owner to access the resource requested. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."
}
],
"success": false
}

 

Any clues?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

@SushilKadu, we don't expose kids data through the Web APIs.  

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

View best answer in original post

Best Answer
0 Votes
4 REPLIES 4

I'm not sure if it is possible, but you might need to be logged into the child's account.

The error you see says that the Child has not have access to your script.

Best Answer

So I'm logged in as parent and trying to access sleep data for child thats when error is thrown. But i'm able to access steps data for child.

Best Answer
0 Votes

@SushilKadu, we don't expose kids data through the Web APIs.  

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

Why not? Either you trust your security framework or you don’t... it still requires a authenticated session. If you don’t trust it, then you shouldn’t be selling it and marketing it to kids (or adults for that matter).

Best Answer