Sample - Slack Web API
GET/usergroups.users.list

List User Group members

Lists the users who belong to a specified User Group. Supply usergroup to select the group and use include_disabled when results may involve disabled User Groups.

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

3 parameters
tokenstringrequired
Authentication token with the `usergroups:read` scope.
include_disabledbooleanoptional
Whether to allow results involving disabled User Groups.
usergroupstringrequired
The encoded ID of the User Group whose members to list.

2 status codes
200Returns an array of User IDs for the members of the specified User Group.
okbooleanrequired
Allowed:true
usersarray<UserID>required
defaultStandard failure response when used with an invalid token
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:not_authedinvalid_authaccount_inactivetoken_revokedno_permissionorg_login_requireduser_is_botuser_is_restrictedinvalid_arg_nameinvalid_array_arginvalid_charsetinvalid_form_data
okbooleanrequired
Allowed:false

Error handling

usergroup and an authentication token are required; the token must have the usergroups:read scope. User IDs in the returned users array use the format defined by the User ID pattern, beginning with U or W followed by at least two uppercase letters or digits.