11-18-2022 15:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-18-2022 15:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello,
Is there any recent tutorial that describes how to authorize my backend application with fitbit API.
I created application in "manage my apps" on fitbit. I have client secret, and clienId.
When I try to use it in (postman/insomnia) using grantType: AuthorizationFlow It pop-ups window with fitbitLogin.
I can use "tutorial" on fitbit page that describes how to use API, but it also involves clicking URL in browser. How Can I fully automate that?
Is there any step by step tutorial, few lines in python/java, or few invocations or curl, or httpie, whatever. How to get data from "https://api.fitbit.com/1/user/-/profile.json"
having: "OAuth 2.0 Client ID", "Client Secret", and without clicking in web-browser
11-21-2022 12:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



11-21-2022 12:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @Emiliani
We have several tutorials available. The Developer Guide section Authorization and the OAuth2 Tutorial demonstrate the steps of the authorization flow. There is sample code available in our documentation which might provide you with the python/java sample you need. I know there are a lot more sample available in github which you can find through internet searches. Search for oauth2 and your programming language.
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

01-08-2023 11:56 - edited 01-08-2023 11:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-08-2023 11:56 - edited 01-08-2023 11:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Ok I saw tutorial before, but which authorization flow is intended to be used for backend synchronization ?
Does this python code from https://github.com/orcasgit/python-fitbit still in working state ? Repository seem to be not updated I wasn't able to make it run.

01-09-2023 09:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



01-09-2023 09:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @Emiliani
We recommend the authorization code grant flow with or without PKCE. The Developer Guide gives the steps for Authorization Code Grant Flow with PKCE. Fitbit doesn't support the sample code provided in our documentation. These samples were suggested by our developer community. I know the python sample from ocrasgit is a popular one to use. I would recommend contacting the developer to get assistance with their code, unless someone else in the community has some python sample code they recommend.
Gordon
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

