POST oauth2/invalidate_token
Allows a registered application to revoke an issued OAuth 2.0 app-only Bearer Token. 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.
Endpoint URL¶
https://api.twitter.com/oauth2/invalidate_token
Authentication¶
Authentication | Basic authentication - Use your API Key as the username, and the API Secret Key as the password |
Query parameters¶
Name | Required | Description |
---|---|---|
access_token | required | The value of the Bearer Token that you would like to invalidate |
Example request
To use the following cURL request, replace $API_KEY, $API_SECRET_KEY, and $BEARER_TOKEN with credentials from your App:
curl --request POST -u$API_KEY:$API_SECRET_KEY \
--url 'https://api.twitter.com/oauth2/invalidate_token?access_token=$BEARER_TOKEN'
Example response
Status: 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 135
...
{
"access_token": "AAAA%2FAAA%3DAAAAAAAA"
}