POST oauth2/invalidate_token

Allows a registered application to revoke an issued OAuth 2 Bearer Token by presenting its client credentials. Once a Bearer Token has been invalidated, new creation attempts will yield a different Bearer Token and usage of the invalidated token will no longer be allowed.

Successful responses include a JSON-structure describing the revoked Bearer Token.

Resource URL

https://api.twitter.com/1.1/oauth2/invalidate_token

Resource Information

Response formats JSON
Requires authentication? Yes - Basic auth with your API key as your username and API key secret as your password
Rate limited? Yes

Parameters

Name Required Description
access_token required The value of the bearer token that you would like to invalidate

Example request

    curl --request POST 
      --url 'https://api.twitter.com/1.1/oauth2/invalidate_token.json' 
      --header 'authorization: Basic ENCODED_BASIC_AUTH_STRING'

Example response

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    Content-Length: 127
    ...

    {"access_token":"AAAA%2FAAA%3DAAAAAAAA"}