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

Invalidate all sessions for a user

Invalidates all valid sessions for a specified user across all devices. Supply user_id and optionally limit invalidation to mobile or web sessions with mobile_only or web_only. The authenticated user must provide an administrative token with the required write scope.

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

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

Form-encoded options for invalidating a user's active sessions.

user_idstringrequired
The ID of the user to wipe sessions for
mobile_onlybooleanoptional
Only expire mobile sessions (default: false)
web_onlybooleanoptional
Only expire web sessions (default: false)

2 status codes
200Returns an object with `ok` set to true when the user's sessions are invalidated.
okbooleanrequired
Allowed:true
defaultReturns an object with `ok` set to false when the operation does not complete successfully.
okbooleanrequired
Allowed:false

Error handling

user_id is required and must identify the user whose sessions you want to invalidate. The mobile_only and web_only flags limit the operation to one session type, and the token must have the admin.users:write scope.