Error when trying to invalidate Bearer Token


#1

Aloha,

I am getting an error when I try to invalidate the bearer token:

/ERROR/
{“errors”:[{“label”:“authenticity_token_error”,“code”:99,“message”:“Unable to verify your credentials”}]}

/FIDDLER HEADER/
POST https://api.twitter.com/oauth2/invalidate_token/ HTTP/1.1
User-Agent: 127.0.0.1
Host: api.twitter.com
Accept: /
Authorization: Basic ( base64encoded(urlencoded(key):urlencoded(secret)) )
Content-Length: 119
Content-Type: application/x-www-form-urlencoded

access_token= (the access token)

I have recreated the application without pressing the ‘create my access token’ button and invalidating the token is suddenly working.
Why is invalidate_token not working when you have created the access tokens with the ‘create my access token’ button in http://dev.twitter.com. All the other application-only request (requesting bearer token and user_timeline) didn’t get the error.


#2

I’ve got the same problem, and I see nobody has any answers. This appears to be a common problem. Perhaps it is broken or not documented properly?

https://dev.twitter.com/discussions/19556


#3

access_token received from https://api.twitter.com/oauth2/token is already urlencoded, in case of python requests this can be achieved with urllib.unquote(access_token)