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

Access friends list and there complete data

Hi,

I am working on a project where I need to fetch friends lists and their complete data through web API.

I was able to get a friends list response, from that I am taking userId and tried to get sleep data. But I am getting the 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
}.
Best Answer
0 Votes
3 REPLIES 3

Hi @tgt.androidapps ,

 

The friends scope only grants your application access to the user's friends list.  It does not grant you access to their friend's data.  Those users will need to specifically grant you access to their data using your application's Fitbit authorization flow.

 

Gordon

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

Thank you Gordon for the response, Can you please help with any document or any link to achieve that.

Best Answer
0 Votes

Hi @tgt.androidapps 

 

The information on the Get Friends endpoint is https://dev.fitbit.com/build/reference/web-api/friends/get-friends/.   It states you receive a list of the user's friends.   If you're looking for something else, please clarify for me.

 

Gordon

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