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.
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.
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 Answer
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.
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.
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 AnswerOkay. 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 AnswerI 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 Answer
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.
At what point in the authorization process do you receive the error "Sorry, that page is following a different trail"?
Best AnswerIt seems that some country-specific versions of that page may have issues (see here).
This alternative link might get you going.