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

Revoke Missing token parameter

I am having problems to revoke users from our application.
I followed these steps (https://dev.fitbit.com/build/reference/web-api/oauth2/#revoking-access-tokens) but it does not work.

The header is already working correctly, but it tells me that Missing token parameter, if I'm sending it in the body.

 

Sin_t_tulo

What am I doing wrong?
Thank you

Best Answer
0 Votes
4 REPLIES 4

@foundation29 seems like you're sending the token in JSON format.

I'd suggest you try curling. something like:

curl -X POST -H "Authorization: Basic YOUR_BASIC_TOKEN" -d "token=ACCESS_TOKEN" https://api.fitbit.com/oauth/revoke

Let me know if this curl above works for you or not.

Best Answer
0 Votes

I do not know, I have never used curl, and in javascript I do not know if it can be used.
I am using angular 5. I tried to pass to string, but it seems that nothing changes:

var paramssend = {token: credentials.access_token};
this.http.post ('https://api.fitbit.com/oauth2/revoke',JSON.stringify (paramssend))

 

Thank you

Best Answer
0 Votes

@foundation29 the curl is just a unix app that you can use from your command line to verify that Fitbit API is working as expected and to understand in what format parameters should be passed. 
You won't be able to use from javascript app how ever, you can play with curl and see raw responses which will help you to understand how to modify your requests.

Please try to execute curl command that I listed above in you terminal/bash and see if it works of not.

Best Answer
0 Votes

Ok, understood.
I answer you when I know something


thank you very much

Best Answer
0 Votes