11-05-2020 23:33
11-05-2020 23:33
I am building an application that is retrieving daily data from users. It is created as a Client type and I have implemented OAuth 2.0 and registered my personal account in the app for all data collection permissions. I have been able to retrieve activity, user info, and heart rate, but I am not able to retrieve sleep data. I have verified that the sleep permission is enabled on my account, but I keep getting a reply of insufficient_permission API client is not authorized by the resource owner to access the resource requested. I have spent a lot of time researching and have not been able to get this to work. I am using:
GET https://api.fitbit.com/1.2/user/-/sleep/date/{date}.json
as is described in the documentation. Any help with this would be greatly appreciated.
11-06-2020 11:13
11-06-2020 11:13
Hi @Mangum87
I'm guessing the token that you're using hasn't been granted access to the sleep data. Would you please private message me the access token that you're using when querying the sleep data? I can verify the permissions for you.
Best,
Gordon