users

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.

get/api/v4/users

Query parameters

pageinteger

The page to select.

per_pageinteger

The number of users per page. There is a maximum limit of 200 users per page.

in_teamstring

The ID of the team to get users for.

not_in_teamstring

The ID of the team to exclude users for. Must not be used with "in_team" query parameter.

in_channelstring

The ID of the channel to get users for.

not_in_channelstring

The ID of the channel to exclude users for. Must be used with "in_channel" query parameter.

in_groupstring

The ID of the group to get users for. Must have manage_system permission.

group_constrainedboolean

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.

without_teamboolean

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.

activeboolean

Whether or not to list only users that are active. This option cannot be used along with the inactive option.

inactiveboolean

Whether or not to list only users that are deactivated. This option cannot be used along with the active option.

rolestring

Returns users that have this role.

sortstring

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.

rolesstring

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

channel_rolesstring

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

team_rolesstring

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

idstring
create_atinteger

The time in milliseconds a user was created

update_atinteger

The time in milliseconds a user was last updated

delete_atinteger

The time in milliseconds a user was deleted

usernamestring
first_namestring
last_namestring
nicknamestring
emailstring
email_verifiedboolean
auth_servicestring
rolesstring
localestring
propsobject
last_password_updateinteger
last_picture_updateinteger
failed_attemptsinteger
mfa_activeboolean
terms_of_service_idstring

ID of accepted terms of service, if any. This field is not present if empty.

terms_of_service_create_atinteger

The time in milliseconds the user accepted the terms of service

Changes

No recorded changes to this endpoint across all 1 revision of this API.