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
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
@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 AnswerI 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
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
@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 AnswerOk, understood.
I answer you when I know something
thank you very much
Best Answer