Slack.Web.Admin.Functions.Permissions (SlackKit v1.0.0-alpha.0)

View Source

Summary

Functions

Lookup the visibility of multiple Slack functions and include the users if it is limited to particular named entities.

Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities.

Functions

lookup(function_ids, optional_params \\ %{})

Lookup the visibility of multiple Slack functions and include the users if it is limited to particular named entities.

API reference

Rate limit: Tier 3: 50+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • function_ids - An array of function IDs to get permissions for

Errors the API can return:

  • restricted_action - User does not have access to this API.

See the Common Errors guide for errors returned by every Web API method.

set(function_id, optional_params \\ %{})

Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities.

API reference

Rate limit: Tier 3: 50+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • function_id - The function ID to set permissions for.

Optional Params

  • permissions - Array of permissions for the function.
  • user_ids - List of user IDs to allow for named_entities visibility. ex: ['U00000001', 'U00000002', 'U00000003']
  • visibility - The function visibility. Acceptable values: everyone app_collaborators named_entities no_one

Errors the API can return:

  • function_not_found - The referenced function does not exist.
  • invalid_permission - Invalid value for permission
  • invalid_permission_type - Invalid value for permission type.
  • invalid_setting - The app_collaborators setting is not allowed for apps not owned by your team/org.
  • invalid_visibility - Invalid value for visibility.
  • restricted_action - This actor does not have access to the permissions on this resource.
  • unknown_method - This method does not exist.

See the Common Errors guide for errors returned by every Web API method.