02-04-2020 19:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-04-2020 19:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hey, i'm quite new with using web api
Recently i created an app to see user's step, and heartrate data
but when i after the user login to give permission the link doesn't redirect me to the permission page
instead it redirect me to this
this is the link i use
please help me
02-04-2020 19:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-04-2020 19:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
this is the error i got

02-06-2020 10:52 - edited 02-06-2020 10:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



02-06-2020 10:52 - edited 02-06-2020 10:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Welcome to the forums!
When attempting to go through your authorization process, I am seeing the following error:
Developer information: invalid_request - Invalid redirect_uri parameter value
Please see our common solution for troubleshooting a redirect URI here.
Hope this helps. Let me know if you have any additional questions.

02-06-2020 21:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-06-2020 21:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
hi john
i got trough this problem and i got another one
after i got the token
i don't know how to make the request
i want to get step data from the user
using this one
GET https://api.fitbit.com/1/user/-/activities/steps/date/today/1m.json
i don't know where the token is used on
i tried this
GET https://api.fitbit.com/1/user/-/profile.json Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0MzAzNDM3MzUsInNjb3BlcyI6Indwcm8gd2xvYyB3bnV0IHdzbGUgd3NldCB3aHIgd3dlaSB3YWN0IHdzb2MiLCJzdWIiOiJBQkNERUYiLCJhdWQiOiJJSktMTU4iLCJpc3MiOiJGaXRiaXQiLCJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJpYXQiOjE0MzAzNDAxMzV9.z0VHrIEzjsBnjiNMBey6wtu26yHTnSWz_qlqoEpUlpc
but the token i get is much shorter than this one
sorry i'm really new with using API

02-07-2020 11:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



02-07-2020 11:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@AxelSidharta Can you please PM me the access token you are receiving? Also, please let me know which authorization flow you are using (authorization or implicit).

02-10-2020 16:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



02-10-2020 16:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@AxelSidharta Thanks for sending me the token you are receiving. What you've sent me in PM appears to be a refresh token, not an access token. You need to enter the access_token, not the refresh_token, into your authorization header when making an API call.
After the user authenticates your application with the authorization code grant flow, you will receive an access token and a refresh token. You need to use the access token to make requests to the Fitbit API. The refresh tokens are used to obtain a new access token when they expire.
The response you receive during the access token request should look like this:
{
"access_token": "eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0MzAzNDM3MzUsInNjb3BlcyI6Indwcm8gd2xvYyB3bnV0IHdzbGUgd3NldCB3aHIgd3dlaSB3YWN0IHdzb2MiLCJzdWIiOiJBQkNERUYiLCJhdWQiOiJJSktMTU4iLCJpc3MiOiJGaXRiaXQiLCJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJpYXQiOjE0MzAzNDAxMzV9.z0VHrIEzjsBnjiNMBey6wtu26yHTnSWz_qlqoEpUlpc",
"expires_in": 3600,
"refresh_token": "c643a63c072f0f05478e9d18b991db80ef6061e4f8e6c822d83fed53e5fafdd7",
"token_type": "Bearer",
"user_id": "26FWFL"
}
I hope this clarifies any confusion. Please let me know if you have any additional questions.

02-10-2020 20:36
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-10-2020 20:36
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@JohnFitbit
i now used the access token but now i got this error
Authorization Error: Invalid authorization token type
how do i get step data after i got the access token
sorry for bothering john

02-11-2020 11:36 - edited 02-11-2020 11:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



02-11-2020 11:36 - edited 02-11-2020 11:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@AxelSidharta No worries! That's why I'm here.
I think I was able to reproduce the error you are seeing. Can you verify if this is the same error you saw?
{"errors":[{"errorType":"system","fieldName":"n/a","message":"Authorization Error: Invalid authorization token type"}],"success":false}
I remember seeing this error for a different user and it was due to them not including "Bearer" in their authorization header. Please make sure you are including this in your request.
Your request should look like this:
GET https://api.fitbit.com/1/user/-/profile.json Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0MzAzNDM3MzUsInNjb3BlcyI6Indwcm8gd2xvYyB3bnV0IHdzbGUgd3NldCB3aHIgd3dlaSB3YWN0IHdzb2MiLCJzdWIiOiJBQkNERUYiLCJhdWQiOiJJSktMTU4iLCJpc3MiOiJGaXRiaXQiLCJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJpYXQiOjE0MzAzNDAxMzV9.z0VHrIEzjsBnjiNMBey6wtu26yHTnSWz_qlqoEpUlpc
Let me know if this helps!

