Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to Finish oauth2 tutorial

When I get to step 1A and go to hurl.it

I get this response

 

{"errors": [{"errorType": "invalid_client","message": "Invalid authorization header format. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."}],"success": false}

Best Answer
0 Votes
4 REPLIES 4

In order for us to help you, we need to know what you tried. Specifics are necessary for troubleshooting. 🙂

 

What was the value you pasted into the Step 1A box?

 

What was the cURL command it generated?

 

Best Answer
0 Votes

this is the code i posted

8bed65de293d2d5d0c67a72bff7b4e55fb611038

 

this is the curl results

 

curl -X POST -i

-H 'Authorization: Basic MjI3Wlg0OmNkNjUzNmRkNjAwMDk2MDE2NjU1NjM3MDBjYmVlOGFm'

-H 'Content-Type: application/x-www-form-urlencoded' -d "clientId=227ZX4"

-d "grant_type=authorization_code" -d "redirect_uri=http%3A%2F%2Flocalhost%2Fisaserver%2Fappsyncs"

-d "code=8bed65de293d2d5d0c67a72bff7b4e55fb611038" https://api.fitbit.com/oauth2/token

Best Answer
0 Votes

I also have same problem of this.

Please help me to find out the error...

i double checked with ID, secret part but im still struggle in cURL part

Best Answer
0 Votes

@oauthproblem @KatieKim So what I noticed when doing the tutorial is that when trying to get the access token, the Authorization header was missing after I clicked "Send to Hurl.it", and the redirect url is still encoded.

 

Within Hurl.it, you need to re-add the Authorization header, and decode the redirect url (e.g. https%3A%2F%2Flocalhost change back to https://localhost).

 

You can see the example I have in this post here.

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes