Hi, I'm making a python app for pulling in activity data.
Following the OAuth2.0 tutorial on the Fitbit dev page, I can successfully go to the consent page with Implicit Grant flow, but the same link generated by the Authorization Code Flow doesn't seem to render the same consent page. It's just a blank page instead.
This is the link for implicit grant flow: (replacing real client id with <myclientid>)
https://www.fitbit.com/oauth2/authorize?response_type=token&client_id=<myclientid>&redirect_uri=jhpro%3A%2F%2Ffinished&scope=activity%20heartrate%20location%20nutrition%20profile%20settings%20sleep%20social%20weight&expires_in=604800
This is the link for authorization code flow: (replacing real client id with <myclientid>)
https://www.fitbit.com/oauth2/authorize?response_type=code&client_id=<myclientid>&redirect_uri=jhpro%3A%2F%2Ffinished&scope=activity%20heartrate%20location%20nutrition%20profile%20settings%20sleep%20social%20weight&expires_in=604800
Since I cannot get to the consent page, I can't advance to getting the token information.
Is there a different way to get to the consent page, if I'm using code grant flow?
Answered! Go to the Best Answer.
Best AnswerSolution: redirect uri has to have an http or https header to it to get the return token string from browser, even if you don't want it on https. I wanted to have a custom header so that I can easily deep link to my Android app, but sadly Chrome browser didn't want to display the new redirect uri in the address bar since it didn't have the "https://" tag.
Best AnswerSolution: redirect uri has to have an http or https header to it to get the return token string from browser, even if you don't want it on https. I wanted to have a custom header so that I can easily deep link to my Android app, but sadly Chrome browser didn't want to display the new redirect uri in the address bar since it didn't have the "https://" tag.
Best Answer