08-23-2015 04:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-23-2015 04:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi
Can anybody help me?
I am using Charge HR device. My device STATS is showing on Fitbit Web Interface.
i am developing my own applicaion which Fetch data from Fitbit Cloud.
i have successfully authenticated and fetching data of Profile,Activites and Devices.
when i try to access data of Hear Rate API by using "https://api.fitbit.com/1/user/-/activities/heart/date/today/21d.json".
i get response : {"errors":[{"errorType":"request","fieldName":"n/a","message":"API client is not authorized to access the resource requested."}]}.
why it is that?
Answered! Go to the Best Answer.

- Labels:
-
Java
-
OAuth 1.0a
Accepted Solutions
08-23-2015 10:37
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-23-2015 10:37
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@bilal966 wrote:Hi
Can anybody help me?
I am using Charge HR device. My device STATS is showing on Fitbit Web Interface.
i am developing my own applicaion which Fetch data from Fitbit Cloud.
i have successfully authenticated and fetching data of Profile,Activites and Devices.
when i try to access data of Hear Rate API by using "https://api.fitbit.com/1/user/-/activities/heart/date/today/21d.json".
i get response : {"errors":[{"errorType":"request","fieldName":"n/a","message":"API client is not authorized to access the resource requested."}]}.
why it is that?
@bilal966 Heart rate data is only available when using oAuth 2.0, and from the labels you posted I assume you are using oAuth 1.0a.
In addition the documentation doesn't list 21d as a valid period selection, only: 1d, 7d, 30d, 1w, and 1m.

08-23-2015 23:58 - edited 08-23-2015 23:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-23-2015 23:58 - edited 08-23-2015 23:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thanks for your reply.
i agree 21d is not in documentation , it was typing mistake.
i ll try with oAuth2.0 protocol.

08-23-2015 10:37
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-23-2015 10:37
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@bilal966 wrote:Hi
Can anybody help me?
I am using Charge HR device. My device STATS is showing on Fitbit Web Interface.
i am developing my own applicaion which Fetch data from Fitbit Cloud.
i have successfully authenticated and fetching data of Profile,Activites and Devices.
when i try to access data of Hear Rate API by using "https://api.fitbit.com/1/user/-/activities/heart/date/today/21d.json".
i get response : {"errors":[{"errorType":"request","fieldName":"n/a","message":"API client is not authorized to access the resource requested."}]}.
why it is that?
@bilal966 Heart rate data is only available when using oAuth 2.0, and from the labels you posted I assume you are using oAuth 1.0a.
In addition the documentation doesn't list 21d as a valid period selection, only: 1d, 7d, 30d, 1w, and 1m.

08-23-2015 23:58 - edited 08-23-2015 23:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-23-2015 23:58 - edited 08-23-2015 23:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thanks for your reply.
i agree 21d is not in documentation , it was typing mistake.
i ll try with oAuth2.0 protocol.

