02-18-2020 00:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-18-2020 00:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi Team,
I am trying to integrate fitbit with my flutter app and have already tested and failed multiple approaches until now.
Using Webview to Authenticate and capturing the access Token
When using the Webviews am able to open the authentication portal but it never redirects (even after authentication) to the redirect URL. Once I log in I can only see a blank white page with access_token which is incorrect.
Using External browser to authenticate
When using external browser like chrome am able to log and it works great but I definitely need to link it back to the app using deepLink for capturing the access_token. While am not a pro with deepLink but using one is giving me this error.
"the app you are trying to connect did not provide valid information to fitbit"
Here is the current callback URL used in the app: wwy://fitbit/path/subpath
Please have a look and point me in the right direction.
Regards,
Rajdeep Barad
02-18-2020 15:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



02-18-2020 15:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @rsbthebest,
Welcome to the forums!
Please know that the use of WebView is prohibited. See Obtaining Consent for alternative options if you don't want to authenticate through a browser.
I hope this helps. Please let me know if you have any additional questions.

02-18-2020 22:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-18-2020 22:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @JohnFitbit thanks a lot for the reply!
I understand using WebView is prohibited, at the same time, as I mentioned with other option I tried am getting an error in the FitBit auth when I try using the DeepLink.
Would you please help with that!
Regards,
Rajdeep Barad

02-19-2020 17:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



02-19-2020 17:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@rsbthebest After speaking with the team, your callback URL needs to be a link that is an entry point back into your application. Your callback URL, wwy://fitbit/path/subpath, needs to have code that reads and parses the URL containing the authorization code. If you look at the blank screen of the URL, it should show the information you need to read and parse.

02-19-2020 23:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-19-2020 23:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @JohnFitbit ,
I understand I need to listen to the wwy://fitbit/path/subpath, in my app and am already doing it. However, the problem is when I click in the Authorisation link from tutorials page it gives me link is not valid error.

02-24-2020 12:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



02-24-2020 12:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @rsbthebest
If using the OAuth2 Tutorial, the callback URL needs to be publicly available. Am I correct to say that wwy://fitbit/path/subpath is not accessible via the internet, and only available by accessing it on the mobile device? If this is the case, that would explain why you're getting an error. However, check the URL of the web page containing the error to see if Fitbit provides you with the access token or authorization code.
Gordon
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

10-24-2020 02:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-24-2020 02:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi rsbthebest,
Am also having same issue, while implementing the authorization flow with fitbit. If you have resolved the issue please suggest me the solution.
Problem: How can i get back to my applicaion once authorization flow completed and how can i parse the redirect url params to use further api calls.
I am very helpful if you can help me out on this.
Thanks.

10-28-2020 12:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



10-28-2020 12:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The callbackURL will redirect the user back to your application. How to parse the URL parameters might depend on the OAuth 2.0 library or programming language that you're using. I think some libraries come with HTTP support which help you to capture the URL string so you can parse it in your code.
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

