Get users
Get a page of a list of users. Based on query string parameters, select users from a team, channel, or select users not in a specific channel.
Some basic sorting is available using the sort query parameter. Sorting is currently only supported when selecting users on a team.
Permissions
Requires an active session and (if specified) membership to the channel or team being selected from.
Query parameters
The page to select.
The number of users per page. There is a maximum limit of 200 users per page.
The ID of the team to get users for.
The ID of the team to exclude users for. Must not be used with "in_team" query parameter.
The ID of the channel to get users for.
The ID of the channel to exclude users for. Must be used with "in_channel" query parameter.
The ID of the group to get users for. Must have manage_system permission.
When used with not_in_channel or not_in_team, returns only the users that are allowed to join the channel or team based on its group constrains.
Whether or not to list users that are not on any team. This option takes precendence over in_team, in_channel, and not_in_channel.
Whether or not to list only users that are active. This option cannot be used along with the inactive option.
Whether or not to list only users that are deactivated. This option cannot be used along with the active option.
Returns users that have this role.
Sort is only available in conjunction with certain options below. The paging parameter is also always available.
in_team
Can be "", "last_activity_at" or "create_at". When left blank, sorting is done by username.
in_channel
Can be "", "status". When left blank, sorting is done by username. status will sort by User's current status (Online, Away, DND, Offline), then by Username.
Comma separated string used to filter users based on any of the specified system roles
Example: ?roles=system_admin,system_user will return users that are either system admins or system users
Comma separated string used to filter users based on any of the specified channel roles, can only be used in conjunction with in_channel
Example: ?in_channel=4eb6axxw7fg3je5iyasnfudc5y&channel_roles=channel_user will return users that are only channel users and not admins or guests
Comma separated string used to filter users based on any of the specified team roles, can only be used in conjunction with in_team
Example: ?in_team=4eb6axxw7fg3je5iyasnfudc5y&team_roles=team_user will return users that are only team users and not admins or guests
Response
User page retrieval successful
Changes
No recorded changes to this endpoint across all 1 revision of this API.