06-26-2015 06:05
06-26-2015 06:05
Hi there,
I am having issue with my callback url. I have mentioned the same URL in fitbit app and for my application.
Here is the code snippet...
return this.oauth2.getAuthorizeUrl({
response_type : 'code',
scope : 'heartrate',
redirect_uri : 'https://example.com/gettoken'
});
But it always gives me error after user authentication on Fitbit.
LOG:
{"statusCode":400,"data":"{"errors":[{"errorType":"oauth","fieldName":"redirect_uri","message":"Redirect_uri mismatch: null"}],"success":false}"}
I am unable to figure out the issue. Please help.
Thanks
Answered! Go to the Best Answer.
07-23-2017 20:41 - edited 07-23-2017 20:54
07-23-2017 20:41 - edited 07-23-2017 20:54
redirect_uri should like "http://example.com/auth"
instead of "http%3A%2F%2Fexample.com%2Fauth"
06-26-2015 10:51
06-26-2015 10:51
Does your redirect_uri value match a URI specified in your app settings on https://dev.fitbit.com ?
06-27-2015 00:05
06-27-2015 00:05
Hi Jeremiah,
I have cross checked it several times and for sure i have exactly same vaules for redirect_uri and URI specified in my app settings.
06-28-2015 08:33
06-28-2015 08:33
Currently having the same problem. The uri is the same (even copy pasted to make sure)
06-28-2015 22:30
06-28-2015 22:30
Hi TEvashkevich,
Did you find the solution?
It is getting tough for me and I really need multiple callback URL for the App, but it is not working for the single one.
If i leave the redirect_uri parameter, it works fine. Is it same in your case?
06-29-2015 04:03
06-29-2015 04:03
I haven't found a solution yet no.
By leaving do you mean not having it in? Just leaving that part empty? I by all means will give it a try
06-29-2015 04:09
06-29-2015 04:09
If you do not pass the redirect_uri parameter, you will get the access_token after fitbit auth.
see the difference
With uri parameter:
Without uri parameter
https://api.fitbit.com/oauth2/authorize?response_type=code&scope=heartrate&client_id=xxxxxxxx
Hope it will help you.
06-29-2015 09:48 - edited 06-29-2015 15:32
06-29-2015 09:48 - edited 06-29-2015 15:32
Ah, I was getting the redirect_uri Mismatch in the Authorization step, where we have to POST to
https://api.fitbit.com/oauth2/token
06-09-2016 22:17
06-09-2016 22:17
What was the solution here?
06-10-2016 11:47
06-10-2016 11:47
For the setup of the general OAuth2 stuff (Disregard the Unity Plugin I suggested here as it is not allowed anymore and I described how to do it without the plugin in the other post I link below.)
http://technicalartistry.blogspot.ca/2015/07/oauth2-unity-and-month-of-cursing.html
To change to native (which is needed now)
http://technicalartistry.blogspot.com/2016/01/fitbit-unity-oauth-2-and-native.html
07-23-2017 20:41 - edited 07-23-2017 20:54
07-23-2017 20:41 - edited 07-23-2017 20:54
redirect_uri should like "http://example.com/auth"
instead of "http%3A%2F%2Fexample.com%2Fauth"
05-21-2020 05:56
05-21-2020 05:56