Sample - Slack Web API
POST/admin.users.session.invalidate

Invalidate a user session

Invalidates one session belonging to a specified user. Supply team_id and session_id to identify the workspace session you want to invalidate. The authenticated user must provide an administrative token with the required write scope.

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

1 parameter · 2 body fields
tokenstringrequired
Authentication token with the `admin.users:write` scope.

Form-encoded details identifying the user session to invalidate.

team_idstringrequired
ID of the team that the session belongs to
session_idintegerrequired
The integer identifier of the session to invalidate.

2 status codes
200Returns an object with `ok` set to true when the session is invalidated.
okbooleanrequired
Allowed:true
defaultReturns an object with `ok` set to false when the operation does not complete successfully.
okbooleanrequired
Allowed:false

Error handling

team_id and session_id are required and must identify the workspace session to invalidate. The token must be an authentication token with the admin.users:write scope.