users.list
method
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 method returns a list of all users in the workspace. This includes both invited users and deleted/deactivated users.
The team_id
is only relevant when using an org-level token. This field will be ignored if the API call is sent using a workspace-level token.
Response
Returns a list of paginated user objects, in no particular order.
Profile
The profile hash contains as much information as the user has supplied
in the default profile fields: first_name
, last_name
, real_name
,
email
, skype
, and the image_*
fields. Data that has not been supplied may not be present at all, may be null or may contain an empty string (""
).
A user's custom profile fields may be discovered using users.profile.get
.
Email addresses
The [users:read.email
](/reference/scopes/users.read.email OAuth scope is now required to access the email
field in user objects returned by the users.list
and users.info
web API methods. users:read
is no longer a sufficient scope for this data field. Learn more.
Apps created after January 4th, 2017 must request both the users:read
and users:read.email
OAuth permission scopes when using the OAuth app installation flow to enable access to the email
field of user objects returned by this method.
Pagination
This method uses cursor-based pagination to make it easier to incrementally collect information. To begin pagination, specify a limit
value under 1000
. We recommend no more than 200
results at a time.
Responses will include a top-level response_metadata
attribute containing a next_cursor
value. By using this value as a cursor
parameter in a subsequent request, along with limit
, you may navigate through the collection page by virtual page.
See pagination for more information.
Presence
Retrieving a workspace's presence with this method is now deprecated. Use users.getPresence
or presence subscriptions instead.