Slack. Web. Workflows. Triggers. Permissions
(SlackKit v0.25.0-alpha.0)
View Source
Summary
Functions
Allows users to run a trigger that has its permission type set to named_entities
Returns the permission type of a trigger and if applicable, includes the entities that have been granted access
Revoke an entity's access to a trigger that has its permission type set to named_entities
Set the permission type for who can run a trigger
Functions
Allows users to run a trigger that has its permission type set to named_entities
Required Params
trigger_id- Encoded ID of the trigger ex:Ft0000000001
Optional Params
channel_ids- List of encoded channel IDs ex:C0000000001,C0000000002org_ids- List of encoded organization IDs ex:E00000001,E00000002team_ids- List of encoded workspace IDs ex:T0000000001,T0000000002user_ids- List of encoded user IDs ex:U0000000001,U0000000002
Errors the API can return:
unknown_method- This method does not exist.token_revoked- Authentication token is for a deleted user or workspace or the app has been removed when using ausertoken.invalid_arg_name- The method was passed an argument whose name falls outside the bounds of accepted or expected values. This includes very long names and names with non-alphanumeric characters other than_. If you get this error, it is typically an indication that you have made a very malformed API call.two_factor_setup_required- Two factor setup is required.invalid_form_data- The method was called via aPOSTrequest withContent-Typeapplication/x-www-form-urlencodedormultipart/form-data, but the form data was either missing or syntactically invalid.invalid_post_type- The method was called via aPOSTrequest, but the specifiedContent-Typewas invalid. Valid types are:application/jsonapplication/x-www-form-urlencodedmultipart/form-datatext/plain.fatal_error- The server could not complete your operation(s) without encountering a catastrophic error. It's possible some aspect of the operation succeeded before the error was raised.deprecated_endpoint- The endpoint has been deprecated.connected_org_denied- The workspace admin does not allow connected organizations to be named_entities.too_many_named_entities- Too many named entities passed into the trigger permissions setting.ratelimited- The request has been ratelimited. Refer to theRetry-Afterheader for when to retry the request.ekm_access_denied- Administrators have suspended the ability to post a message.service_unavailable- The service is temporarily unavailableuser_not_found- One or more of the listed users could not be found.team_access_not_granted- The token used is not granted the specific workspace access required to complete this request.invalid_permission_type- This trigger requires permission_type to be set as named_entities before adding users.shared_channel_denied- The workspace admin does not allow shared channels to be named_entities.invalid_arguments- The method was called with invalid arguments.invalid_array_arg- The method was passed an array as an argument. Please only input valid strings.request_timeout- The method was called via aPOSTrequest, but thePOSTdata was either missing or truncated.team_not_found- One or more of the listed teams could not be found.account_inactive- Authentication token is for a deleted user or workspace when using abottoken.channel_not_found- One or more of the listed channels could not be found.not_authed- No authentication token provided.internal_error- The server could not complete your operation(s) without encountering an error, likely due to a transient issue on our end. It's possible some aspect of the operation succeeded before the error was raised.enterprise_is_restricted- The method cannot be called from an Enterprise.team_not_connected- One of more of the listed teams were not connected by org.no_permission- The workspace token used in this request does not have the permissions necessary to complete the request. Make sure your app is a member of the conversation it's attempting to post a message to.org_not_connected- One of more of the listed organizations were not connected.access_denied- This actor does not have access to the permissions on this resource.team_added_to_org- The workspace associated with your request is currently undergoing migration to an Enterprise Organization. Web API and other platform operations will be intermittently unavailable until the transition is complete.connected_user_denied- The workspace admin does not allow connected users to be named_entities.missing_scope- The token used is not granted the specific scope permissions required to complete this request.missing_post_type- The method was called via aPOSTrequest and included a data payload, but the request did not include aContent-Typeheader.accesslimited- Access to this method is limited on the current networktoken_expired- Authentication token has expiredtrigger_not_found- This trigger does not exist.invalid_charset- The method was called via aPOSTrequest, but thecharsetspecified in theContent-Typeheader was invalid. Valid charset names are:utf-8iso-8859-1.method_deprecated- The method has been deprecated.no_valid_named_entities- None of the provided named entities were validnot_allowed_token_type- The token type used in this request is not allowed.org_not_found- One or more of the listed organizations could not be found.connected_team_denied- The workspace admin does not allow connected teams to be named_entities.org_login_required- The workspace is undergoing an enterprise migration and will not be available until migration is complete.invalid_auth- Some aspect of authentication cannot be validated. Either the provided token is invalid or the request originates from an IP address disallowed from making the request.
Returns the permission type of a trigger and if applicable, includes the entities that have been granted access
Required Params
trigger_id- Encoded ID of the trigger ex:Ft0000000001
Errors the API can return:
access_denied- This actor does not have access to the permissions on this resource.accesslimited- Access to this method is limited on the current networkaccount_inactive- Authentication token is for a deleted user or workspace when using abottoken.deprecated_endpoint- The endpoint has been deprecated.ekm_access_denied- Administrators have suspended the ability to post a message.enterprise_is_restricted- The method cannot be called from an Enterprise.fatal_error- The server could not complete your operation(s) without encountering a catastrophic error. It's possible some aspect of the operation succeeded before the error was raised.internal_error- The server could not complete your operation(s) without encountering an error, likely due to a transient issue on our end. It's possible some aspect of the operation succeeded before the error was raised.invalid_arg_name- The method was passed an argument whose name falls outside the bounds of accepted or expected values. This includes very long names and names with non-alphanumeric characters other than_. If you get this error, it is typically an indication that you have made a very malformed API call.invalid_arguments- The method was called with invalid arguments.invalid_array_arg- The method was passed an array as an argument. Please only input valid strings.invalid_auth- Some aspect of authentication cannot be validated. Either the provided token is invalid or the request originates from an IP address disallowed from making the request.invalid_charset- The method was called via aPOSTrequest, but thecharsetspecified in theContent-Typeheader was invalid. Valid charset names are:utf-8iso-8859-1.invalid_form_data- The method was called via aPOSTrequest withContent-Typeapplication/x-www-form-urlencodedormultipart/form-data, but the form data was either missing or syntactically invalid.invalid_post_type- The method was called via aPOSTrequest, but the specifiedContent-Typewas invalid. Valid types are:application/jsonapplication/x-www-form-urlencodedmultipart/form-datatext/plain.method_deprecated- The method has been deprecated.missing_post_type- The method was called via aPOSTrequest and included a data payload, but the request did not include aContent-Typeheader.missing_scope- The token used is not granted the specific scope permissions required to complete this request.no_permission- The workspace token used in this request does not have the permissions necessary to complete the request. Make sure your app is a member of the conversation it's attempting to post a message to.not_allowed_token_type- The token type used in this request is not allowed.not_authed- No authentication token provided.org_login_required- The workspace is undergoing an enterprise migration and will not be available until migration is complete.ratelimited- The request has been ratelimited. Refer to theRetry-Afterheader for when to retry the request.request_timeout- The method was called via aPOSTrequest, but thePOSTdata was either missing or truncated.service_unavailable- The service is temporarily unavailableteam_access_not_granted- The token used is not granted the specific workspace access required to complete this request.team_added_to_org- The workspace associated with your request is currently undergoing migration to an Enterprise Organization. Web API and other platform operations will be intermittently unavailable until the transition is complete.token_expired- Authentication token has expiredtoken_revoked- Authentication token is for a deleted user or workspace or the app has been removed when using ausertoken.trigger_not_found- This trigger does not exist.two_factor_setup_required- Two factor setup is required.unknown_method- This method does not exist.
Revoke an entity's access to a trigger that has its permission type set to named_entities
Required Params
trigger_id- Encoded ID of the trigger ex:Ft0000000001
Optional Params
channel_ids- List of encoded channel IDs ex:C0000000001,C0000000002org_ids- List of encoded organization IDs ex:E00000001,E00000002team_ids- List of encoded workspace IDs ex:T0000000001,T0000000002user_ids- List of encoded user IDs ex:U0000000001,U0000000002
Errors the API can return:
unknown_method- This method does not exist.token_revoked- Authentication token is for a deleted user or workspace or the app has been removed when using ausertoken.invalid_arg_name- The method was passed an argument whose name falls outside the bounds of accepted or expected values. This includes very long names and names with non-alphanumeric characters other than_. If you get this error, it is typically an indication that you have made a very malformed API call.two_factor_setup_required- Two factor setup is required.invalid_form_data- The method was called via aPOSTrequest withContent-Typeapplication/x-www-form-urlencodedormultipart/form-data, but the form data was either missing or syntactically invalid.invalid_post_type- The method was called via aPOSTrequest, but the specifiedContent-Typewas invalid. Valid types are:application/jsonapplication/x-www-form-urlencodedmultipart/form-datatext/plain.named_entities_cannot_be_empty- There must be at least one valid named entityfatal_error- The server could not complete your operation(s) without encountering a catastrophic error. It's possible some aspect of the operation succeeded before the error was raised.deprecated_endpoint- The endpoint has been deprecated.connected_org_denied- The workspace admin does not allow connected organizations to be named_entities.too_many_named_entities- Too many named entities passed into the trigger permissions setting.ratelimited- The request has been ratelimited. Refer to theRetry-Afterheader for when to retry the request.ekm_access_denied- Administrators have suspended the ability to post a message.service_unavailable- The service is temporarily unavailableteam_access_not_granted- The token used is not granted the specific workspace access required to complete this request.invalid_permission_type- This trigger requires permission_type to be set as named_entities before adding users.shared_channel_denied- The workspace admin does not allow shared channels to be named_entities.invalid_arguments- The method was called with invalid arguments.invalid_array_arg- The method was passed an array as an argument. Please only input valid strings.request_timeout- The method was called via aPOSTrequest, but thePOSTdata was either missing or truncated.account_inactive- Authentication token is for a deleted user or workspace when using abottoken.not_authed- No authentication token provided.internal_error- The server could not complete your operation(s) without encountering an error, likely due to a transient issue on our end. It's possible some aspect of the operation succeeded before the error was raised.enterprise_is_restricted- The method cannot be called from an Enterprise.no_permission- The workspace token used in this request does not have the permissions necessary to complete the request. Make sure your app is a member of the conversation it's attempting to post a message to.org_not_connected- One of more of the listed organizations were not connected.access_denied- This actor does not have access to the permissions on this resource.team_added_to_org- The workspace associated with your request is currently undergoing migration to an Enterprise Organization. Web API and other platform operations will be intermittently unavailable until the transition is complete.connected_user_denied- The workspace admin does not allow connected users to be named_entities.missing_scope- The token used is not granted the specific scope permissions required to complete this request.missing_post_type- The method was called via aPOSTrequest and included a data payload, but the request did not include aContent-Typeheader.accesslimited- Access to this method is limited on the current networktoken_expired- Authentication token has expiredtrigger_not_found- This trigger does not exist.invalid_charset- The method was called via aPOSTrequest, but thecharsetspecified in theContent-Typeheader was invalid. Valid charset names are:utf-8iso-8859-1.method_deprecated- The method has been deprecated.not_allowed_token_type- The token type used in this request is not allowed.org_not_found- One or more of the listed organizations could not be found.connected_team_denied- The workspace admin does not allow connected teams to be named_entities.org_login_required- The workspace is undergoing an enterprise migration and will not be available until migration is complete.invalid_auth- Some aspect of authentication cannot be validated. Either the provided token is invalid or the request originates from an IP address disallowed from making the request.
Set the permission type for who can run a trigger
Required Params
permission_type- The type of permission that defines who can run a trigger
Acceptable values: everyone app_collaborators named_entities
trigger_id- Encoded ID of the trigger ex:Ft0000000001
Optional Params
channel_ids- List of encoded channel IDs ex:C0000000001,C0000000002org_ids- List of encoded organization IDs ex:E00000001,E00000002team_ids- List of encoded workspace IDs ex:T0000000001,T0000000002user_ids- List of encoded user IDs ex:U0000000001,U0000000002
Errors the API can return:
unknown_method- This method does not exist.token_revoked- Authentication token is for a deleted user or workspace or the app has been removed when using ausertoken.invalid_arg_name- The method was passed an argument whose name falls outside the bounds of accepted or expected values. This includes very long names and names with non-alphanumeric characters other than_. If you get this error, it is typically an indication that you have made a very malformed API call.two_factor_setup_required- Two factor setup is required.invalid_form_data- The method was called via aPOSTrequest withContent-Typeapplication/x-www-form-urlencodedormultipart/form-data, but the form data was either missing or syntactically invalid.invalid_post_type- The method was called via aPOSTrequest, but the specifiedContent-Typewas invalid. Valid types are:application/jsonapplication/x-www-form-urlencodedmultipart/form-datatext/plain.named_entities_cannot_be_empty- Must pass at least one valid named entity.fatal_error- The server could not complete your operation(s) without encountering a catastrophic error. It's possible some aspect of the operation succeeded before the error was raised.deprecated_endpoint- The endpoint has been deprecated.connected_org_denied- The workspace admin does not allow connected organizations to be named_entities.too_many_named_entities- Too many named_entities passed into the trigger permissions setting.ratelimited- The request has been ratelimited. Refer to theRetry-Afterheader for when to retry the request.ekm_access_denied- Administrators have suspended the ability to post a message.service_unavailable- The service is temporarily unavailableuser_not_found- One or more of the listed users could not be found.team_access_not_granted- The token used is not granted the specific workspace access required to complete this request.invalid_permission_type- This function requires permission_type to be set as named_entities before adding users.shared_channel_denied- The workspace admin does not allow shared channels to be named_entities.invalid_arguments- The method was called with invalid arguments.invalid_array_arg- The method was passed an array as an argument. Please only input valid strings.request_timeout- The method was called via aPOSTrequest, but thePOSTdata was either missing or truncated.team_not_found- One or more of the listed teams could not be found.account_inactive- Authentication token is for a deleted user or workspace when using abottoken.channel_not_found- One or more of the listed channels could not be found.not_authed- No authentication token provided.internal_error- The server could not complete your operation(s) without encountering an error, likely due to a transient issue on our end. It's possible some aspect of the operation succeeded before the error was raised.enterprise_is_restricted- The method cannot be called from an Enterprise.team_not_connected- One of more of the listed teams were not connected by org.no_permission- The workspace token used in this request does not have the permissions necessary to complete the request. Make sure your app is a member of the conversation it's attempting to post a message to.org_not_connected- One of more of the listed organizations were not connected.access_denied- This actor does not have access to the permissions on this resource.team_added_to_org- The workspace associated with your request is currently undergoing migration to an Enterprise Organization. Web API and other platform operations will be intermittently unavailable until the transition is complete.connected_user_denied- The workspace admin does not allow connected users to be named_entities.missing_scope- The token used is not granted the specific scope permissions required to complete this request.missing_post_type- The method was called via aPOSTrequest and included a data payload, but the request did not include aContent-Typeheader.accesslimited- Access to this method is limited on the current networkexternal_workspace_denied- The channel selected is not on the workflow team.token_expired- Authentication token has expiredtrigger_not_found- This trigger does not exist.invalid_charset- The method was called via aPOSTrequest, but thecharsetspecified in theContent-Typeheader was invalid. Valid charset names are:utf-8iso-8859-1.method_deprecated- The method has been deprecated.no_valid_named_entities- None of the provided named entities were validnot_allowed_token_type- The token type used in this request is not allowed.org_not_found- One or more of the listed organizations could not be found.connected_team_denied- The workspace admin does not allow connected teams to be named_entities.org_login_required- The workspace is undergoing an enterprise migration and will not be available until migration is complete.invalid_auth- Some aspect of authentication cannot be validated. Either the provided token is invalid or the request originates from an IP address disallowed from making the request.