Slack.Web.SlackLists.Access (SlackKit v1.0.0-alpha.0)

View Source

Summary

Functions

Revoke access to a List for specified entities.

Set the access level to a List for specified entities.

Functions

delete(list_id, optional_params \\ %{})

Revoke access to a List for specified entities.

API reference

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

View on docs.slack.dev ↗

Required Params

  • list_id - Encoded ID of the List. ex: F1234ABCD

Optional Params

  • channel_ids - List of channels you wish to update access for. Can only be used if user_ids is not provided. Both channel_ids and user_ids cannot be passed at the same time, but at least one of them is required. ex: ["C1234ABCD"]
  • user_ids - List of users you wish to update access for. Can only be used if channel_ids is not provided. Both channel_ids and user_ids cannot be passed at the same time, but at least one of them is required. ex: ["U1234ABCD"]

Errors the API can return:

  • channel_not_found - A channel could not be found.
  • failed_to_update_user_ids - Failed to update the specified user IDs.
  • invalid_parameters - One of user_ids or channel_ids must be defined, but not both.
  • list_not_found - The List you wish to update permissions for is not available.
  • lists_disabled_user_team - Lists is disabled on user's team.
  • restricted_action - User does not have permission to perform this action.
  • user_not_found - A user could not be found.

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

set(access_level, list_id, optional_params \\ %{})

Set the access level to a List for specified entities.

API reference

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

View on docs.slack.dev ↗

Required Params

  • access_level - Desired level of access.
  • list_id - Encoded ID of the List. ex: F1234ABCD

Optional Params

  • channel_ids - List of channels you wish to update access for. Can only be used if user_ids is not provided. Both channel_ids and user_ids cannot be passed at the same time, but at least one of them is required. ex: ["C1234ABCD"]
  • user_ids - List of users you wish to update access for. Can only be used if channel_ids is not provided. Both channel_ids and user_ids cannot be passed at the same time, but at least one of them is required. ex: ["U1234ABCD"]

Errors the API can return:

  • channel_not_found - A channel could not be found.
  • failed_to_update_user_ids - Failed to update the specified user IDs.
  • invalid_parameters - One of user_ids or channel_ids must be defined, but not both.
  • list_not_found - The List you wish to update permissions for is not available.
  • lists_disabled_user_team - Lists is disabled on user's team.
  • restricted_action - User does not have permission to perform this action.
  • user_not_found - A user could not be found.

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