Sample - Slack Web API
GET/auth.revoke

Revoke an authentication token

Revokes an authentication token. Use test to exercise the revocation flow without actually revoking the specified token.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
tokenstringrequired
Authentication token to revoke; the required scope is `none`.
testbooleanoptional
Testing-mode flag that prevents revocation when set to `1`.

2 status codes
200Returns an object with `ok` set to true and a `revoked` boolean indicating whether the token was revoked.
okbooleanrequired
Allowed:true
revokedbooleanrequired
defaultReturned when the token is not authenticated, is invalid, or the request parameters cannot be processed; the response contains `ok` set to false and an `error` value.
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:not_authedinvalid_authaccount_inactivetoken_revokedno_permissionorg_login_requiredinvalid_arg_nameinvalid_array_arginvalid_charsetinvalid_form_datainvalid_post_typemissing_post_type
okbooleanrequired
Allowed:false

Error handling

token must identify the authentication token to revoke. Set test to 1 when you want testing mode, which leaves the token active instead of revoking it.