Slack. Web. Usergroups. Users
(SlackKit v1.0.0-alpha.0)
View Source
Summary
Functions
List all users in a User Group.
API reference
Rate limit: Tier 2: 20+ per minute
Scopes:
- Bot token:
usergroups:read - User token:
usergroups:read
Required Params
usergroup- The encoded ID of the User Group. ex:S0604QSJC
Optional Params
include_disabled- Include results for disabled User Groups. ex:trueteam_id- The user group's encoded team ID. Required if org token is used.
Errors the API can return:
invalid_cursor- Value passed forcursorwas not valid or is no longer valid.no_such_subteam- No usergroup found with the given ID.plan_upgrade_required- This workspace does not have access to User Groups, as that feature is only available on Standard and above plans.
See the Common Errors guide for errors returned by every Web API method.
Update the list of users for a user group.
API reference
Rate limit: Tier 2: 20+ per minute
Scopes:
- Bot token:
usergroups:write - User token:
usergroups:write
Required Params
usergroup- The encoded ID of the user group to update. ex:S0604QSJCusers- A comma separated string of encoded user IDs that represent the entire list of users for the user group. ex:U060R4BJ4,U060RNRCZ
Optional Params
additional_channels- A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.include_count- Include the number of users in the user group. ex:trueis_shared- Boolean to identify if the API is getting called when a shared section is getting sharedteam_id- encoded team id where the user group exists, required if org token is used
Errors the API can return:
failed_for_some_users- User(s) are not in the workspace where this usergroup existsinvalid_users- Value passed foruserswas empty or invalid.missing_argument- A required argument is missing.no_users_provided- Either theusersfield wasn't provided or an empty value was passed.permission_denied- The user does not have permission to update the list of users for a user group. Check workspace settings to confirm whether the calling user has permission.plan_upgrade_required- This workspace does not have access to user groups, as that feature is only available on Standard and above plans.subteam_max_users_exceeded- Exceeds maximum supported number of users per subteam.
See the Common Errors guide for errors returned by every Web API method.