I try to connect Fitbit App to Make (in order to have sleep data).
On this purpose (the Fitbit doc here : Authorization) :
I need to generate a PKCE code and a base64url-encoded SHA-256 transformation of this code. → with make it seems there is no base64url .
→ any solution to generate that code ? (I do not know Javascript)
then : when I make the authentification, I need to retrieve a code (that I will exchange for access token) and this code is stored in the redirect URI when I load Fitbit authorization page (like https://next.integromat.com/oauth/cb/oauth2?code=XXXXX#_=_) and I do not understand how I can retrieve it.
Any idea on how we capture the parameters after the redirect URL ?
Make handles the OAuth 2.0 authorisation model for you. Make will send the commands and store the tokens for you. The best place to start is by adding an HTTP “Make an OAuth 2.0 request” module to your scenario, and then clicking the “Create a connection” button. Make will then ask you for the URI, Scopes, Client IDs and other details specified in the Fitbit developer pages.
I recommend you try it without the PKCE code challenge first, because this is shown as optional in the Fitbit help pages.
Just one other tip: Do enable the “Show advanced settings” at the bottom of that window, because you will need to change the “Scope separator” to Space to separate the Fitbit scopes.
Let us know how you get on! If you run into any problems, try to screenshot them, post them here, and I’m sure the community here will help out.
Hi Terry,
I facing the following issue right now trying to connect my service to FitBit:
{"message":"The request failed due to failure of a previous request.","code":"SC424","suberrors":[{"message":"{\"errors\":[{\"errorType\":\"invalid_client\",\"message\":\"Invalid authorization header format. The header was not recognized to be a valid header for any of known implementations or a client_id was not specified in case of a public client Received header = null. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process.\"}],\"success\":false}","name":"Error"}]}
@Terry_Hopper@Nicolas3@Marion
I found a solution for you guys:
Firstly as @Terry_Hopper mentioned: PKCE is optimal in the FitBit Case so dont worry about that.
Secondly: You need to generate your Basic Authenfitication from your Client ID and Client Secret and put it into the custom header section.
I achieved my first successful call with FitBit right now!