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

View Source

Summary

Functions

Grant users access to a custom slack function if its permission_type is set to named_entities

List the access type of a custom slack function and include the users, team or org ids with access if its permission_type is set to named_entities

Revoke user access to a custom slack function if permission_type set to named_entities

Set the access type of a custom slack function and define the users, team or org ids to be granted access if permission_type is set to named_entities

Functions

add(optional_params \\ %{})

Grant users access to a custom slack function if its permission_type is set to named_entities

API reference

Rate limit: Tier 3: 50+ per minute
Scopes: No scopes required

View on docs.slack.dev ↗

Optional Params

  • function_app_id - The encoded ID of the app ex: A12345
  • function_callback_id - The callback ID defined in the function's definition file ex: my_function
  • function_id - The encoded ID of the function ex: Fn12345
  • user_ids - List of encoded user IDs ex: U1234,U2345,U3456

Errors the API can return:

  • app_not_found - This app does not exist.
  • function_not_found - This function does not exist.
  • invalid_permission_type - This function requires permission_type to be set as named_entities before adding users.
  • unknown_method - This method does not exist.
  • user_not_found - One or more of the named entities was not found.

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

list(optional_params \\ %{})

List the access type of a custom slack function and include the users, team or org ids with access if its permission_type is set to named_entities

API reference

Rate limit: Tier 3: 50+ per minute
Scopes: No scopes required

View on docs.slack.dev ↗

Optional Params

  • function_app_id - The encoded ID of the app ex: A12345
  • function_callback_id - The callback ID defined in the function's definition file ex: my_function
  • function_id - The encoded ID of the function ex: Fn12345

Errors the API can return:

  • app_not_found - This app does not exist.
  • function_not_found - This function does not exist.
  • unknown_method - This method does not exist.
  • user_not_found - One or more of the named entities was not found.

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

remove(optional_params \\ %{})

Revoke user access to a custom slack function if permission_type set to named_entities

API reference

Rate limit: Tier 3: 50+ per minute
Scopes: No scopes required

View on docs.slack.dev ↗

Optional Params

  • function_app_id - The encoded ID of the app. ex: A12345
  • function_callback_id - The callback ID defined in the function's definition file ex: my_function
  • function_id - The encoded ID of the function ex: Fn12345
  • user_ids - List of encoded user IDs ex: U1234,U2345,U3456

Errors the API can return:

  • app_not_found - This app does not exist.
  • function_not_found - This function does not exist.
  • invalid_permission_type - This function requires permission_type to be set as named_entities before adding users.
  • unknown_method - This method does not exist.
  • user_not_found - One or more of the named entities was not found.

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

set(optional_params \\ %{})

Set the access type of a custom slack function and define the users, team or org ids to be granted access if permission_type is set to named_entities

API reference

Rate limit: Tier 3: 50+ per minute
Scopes: No scopes required

View on docs.slack.dev ↗

Optional Params

  • function_app_id - The encoded ID of the app ex: A12345
  • function_callback_id - The callback ID defined in the function's definition file ex: my_function
  • function_id - The encoded ID of the function ex: Fn12345
  • org_ids - List of org IDs to allow for named_entities permission ex: E00000001,E00000002,E00000003
  • permission_type - The type of permission that defines how the function can be distributed Acceptable values: everyone app_collaborators named_entities system
  • team_ids - List of team IDs to allow for named_entities permission ex: T00000001,T00000002,T00000003
  • user_ids - List of encoded user IDs ex: U1234,U2345,U3456

Errors the API can return:

  • app_not_found - This app does not exist.
  • function_not_found - This function does not exist.
  • invalid_named_entities - One or more of the named entities was not found
  • invalid_permission_type - This function requires permission_type to be set as named_entities before adding users.
  • permission_type_required - permission_type is a required input.
  • unknown_method - This method does not exist.
  • user_not_found - One or more of the named entities was not found.

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