Revoke a Token
Revoke a Token
An Access Token can be revoked at any time by either sending the Access Token or
Refresh Token the POST /oauth2/revoke
endpoint.
cURL
curl -i -X POST "https://api.box.com/oauth2/revoke" \
-H "content-type: application/x-www-form-urlencoded" \
-d "client_id=[CLIENT_ID]" \
-d "client_secret=[CLIENT_SECRET]" \
-d "token=[ACCESS_TOKEN]"
TypeScript Gen
await auth.revokeTokens();
// client's tokens have been revoked
Python Gen
client.auth.revoke_token()
.NET Gen
await auth.RevokeTokenAsync();
Swift Gen (Beta)
try await auth.revokeToken()
Java Gen (Beta)
auth.revokeToken();
// client's tokens have been revoked
Python
oauth.revoke()
Node
client.revokeTokens("<TOKEN>")
.then(() => {
// the client's access token have been revoked
});