oauth2/invalidate_token "code":99,"message":"Unable to verify your credentials"


#1

Greetings

I can’t for the life of me figure out how to get the oauth2/invalidate_token endpoint to work properly.

I’m able to obtain a bearer token and use it to pull public timelines. But when I try to invalidate it, no dice. I get code 99.

Here’s an example curl command:

 curl -X POST 
-H "User-Agent: MyFancyUserAgent/0.1" 
-H "Authorization: Basic MY_TOKEN_THAT_WORKS_TO_GET_BEARER_TOKEN" 
-H "Content-Length: 129" 
-H "Content-Type: application/x-www-form-urlencoded" 
-H "Accept: */*" 
-H "Cache-Control: no-cache" 
-d 'access_token=BEARER_TOKEN_THAT_IS_116_CHARS_LONG' 
https://api.twitter.com/oauth2/invalidate_token