Skip to main content

admin.users.session.list method

Welcome to the new home of Slack developer docs!

We're still building and not all features are available quite yet. Enjoy this peek into the future!

Not ready for the future? Return to the past at api.slack.com.

Usage info

This Admin API lists active login sessions to your Slack organization.

If no user_id and team_id are passed, you'll receive a paginated list of all sessions.

When you pass user_id and team_id (which must be used together), you'll receive a list of active sessions by that user on the workspace specified by team_id.

These sessions can be used to reset a session with the invalidate method: the user will be logged out and forced to login again. If the user has multiple sessions with multiple devices, the other sessions will be unaffected.

If you'd like to reset all sessions for a given user, use the admin.users.session.reset method instead.

Response

Inside an active_session, you'll find two objects: recent and created.

recent signifies the most recent version of the session, while created represents the original version of the session. This covers the case where the same session persists across multiple slack_client_versions (or OS versions or IPs).

If the session hasn't changed since creation, you'll only find created and not recent.

Both recent and created contain the following info:

  • device_hardware: The type of device for the session.
  • os: The operating system for the device.
  • os_version: The version of the OS.
  • slack_client_version: The version of the Slack client, if available.
  • ip: The IP address for the session.