how can i invalidate a bearer token from twitter with rauth?(https://dev.twitter.com/docs/api/1.1/post/oauth2/invalidate_token)
I tried to do it via a oauth2 session but it doesn't work. By the way, is there a way to see the complete request which will be send/which is created by rauth? This could be very helpful for debugging and to understand what rauth produces.
Here is my code so far:
session = rauth.OAuth2Session(client_id=c_key,
client_secret=c_secret,
access_token=o_bearer_token)
bearer_raw = session.post('https://api.twitter.com/oauth2/invalidate_token',
params={ 'Host': 'api.twitter.com',
'User-Agent': '',
'Accept': '*/*',
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': str(len(o_bearer_token)),
'access_token':str(o_bearer_token)})