02-26-2019 10:35
02-26-2019 10:35
I am using the web api oauth2.0 to verify user login, and then using a token to make api calls to get activity data in my ios app. I haven't made any changes in over a year, but I started getting some negative reviews from users who were unable to login/sync fitbit. Even when I use the fitbit api debug tool, I get the same page, which is essentially a 404, that is telling user "Sorry that page is following a different trail"
Here is the example of my url string
NSString *urlString = [NSString stringWithFormat:@"https://www.fitbit.com/oauth2/authorize?response_type=token&client_id=%@&redirect_uri=%@&scope=activity&expires_in=31536000", fitBitClientId, redirectUri];
I am using a safari view controller to open the log in page. I have verified the redicrectUri works.
Any ideas/fixes will be greatly appreciated. Thanks.
Answered! Go to the Best Answer.
02-26-2019 20:13
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
02-26-2019 20:13
I think your problem is the redirect/callback URL is not absolute
In the OAuth 2.0 Authorization Framework spec, section 3.1.2 states The redirection endpoint URI MUST be an absolute URI as defined by
[RFC3986] Section 4.3. The endpoint URI MAY include an
"application/x-www-form-urlencoded" formatted (per Appendix B) query
component ([RFC3986] Section 3.4), which MUST be retained when adding
additional query parameters. The endpoint URI MUST NOT include a
fragment component.
RFC3986 Section 4.3 defines the absolute URI to be
absolute-URI = scheme ":" hier-part [ "?" query ]
I've seen various errors displayed because the redirect URL being used is not absolute. Try changing your redirect URL from WalkAgainstHumanity:// to a specific entry point in your application (i.e. WalkAgainstHumanity://callback)
Best Answer02-26-2019 15:58
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
02-26-2019 15:58
Would you mind posting your redirect_uri value?
Best Answer02-26-2019 16:09
02-26-2019 16:09
WalkAgainstHumanity://
Best Answer02-26-2019 20:13
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
02-26-2019 20:13
I think your problem is the redirect/callback URL is not absolute
In the OAuth 2.0 Authorization Framework spec, section 3.1.2 states The redirection endpoint URI MUST be an absolute URI as defined by
[RFC3986] Section 4.3. The endpoint URI MAY include an
"application/x-www-form-urlencoded" formatted (per Appendix B) query
component ([RFC3986] Section 3.4), which MUST be retained when adding
additional query parameters. The endpoint URI MUST NOT include a
fragment component.
RFC3986 Section 4.3 defines the absolute URI to be
absolute-URI = scheme ":" hier-part [ "?" query ]
I've seen various errors displayed because the redirect URL being used is not absolute. Try changing your redirect URL from WalkAgainstHumanity:// to a specific entry point in your application (i.e. WalkAgainstHumanity://callback)
Best Answer02-26-2019 21:08
02-26-2019 21:08
Okay. I’ll try this and let you know how it goes. I’m the meantime, was this a change in the sdk? It has worked for over a year, but just last month or so is when I started getting feedback from users that it wasn’t working.
Best Answer06-16-2019 22:57
06-16-2019 22:57
I am facing the same issue it was working before and suddenly it's giving error "Sorry, that page is following a different trail." is there Change in there SDK? please let me know.
Best Answer06-18-2019 10:14
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
06-18-2019 10:14
At what point in the authorization process do you receive the error "Sorry, that page is following a different trail"?
Best Answer06-22-2020 20:34
06-22-2020 20:34
Why am I getting this on my screen when I type in Fitbit.com/setup
Best Answer06-22-2020 21:06
Gold Fitbit Product Experts share support knowledge on the forums and advocate for the betterment of Fitbit products and services. Learn more
06-22-2020 21:06
It seems that some country-specific versions of that page may have issues (see here).
This alternative link might get you going.