02-08-2018 11:03
02-08-2018 11:03
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.
What am I doing wrong?
Thank you
02-08-2018 15:25
02-08-2018 15:25
@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.
02-09-2018 00:58 - edited 02-09-2018 08:56
02-09-2018 00:58 - edited 02-09-2018 08:56
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
02-09-2018 10:59
02-09-2018 10:59
@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.
02-09-2018 11:19
02-09-2018 11:19
Ok, understood.
I answer you when I know something
thank you very much