Slack. Web. Admin. Apps
(SlackKit v1.0.0-alpha.0)
View Source
Summary
Functions
Approve an app for installation on a workspace.
Clear an app resolution
Restrict an app for installation on a workspace.
Uninstall an app from one or many workspaces, or an entire enterprise organization.
Functions
Approve an app for installation on a workspace.
API reference
Rate limit: Tier 2: 20+ per minute
Scopes:
- User token:
admin.apps:write
Optional Params
app_id- The id of the app to approve. Eitherapp_idorrequest_idis required. ex:A12345bot_scopes- Bot scopes to approve for the app. You can approve a set of scopes by providinguser_scopesorbot_scopes. ex:emoji:read,pins:readenterprise_id- The ID of the enterprise to approve the app on. Exactly one of theteam_idorenterprise_idarguments is required, not both. ex:E12345request_id- The id of the request to approve. Eitherapp_idorrequest_idis required. ex:Ar12345team_id- The ID of the workspace to approve the app on. Exactly one of theteam_idorenterprise_idarguments is required, not both. ex:T12345user_scopes- User scopes to approve for the app. You can approve a set of scopes by providinguser_scopesorbot_scopes. ex:emoji:read,pins:read
Errors the API can return:
app_management_app_not_installed_on_org- The app management app must be installed on the org.app_restricted_org_wide- The app is already restricted org wide.custom_integration_not_allowed_at_enterprise- Returned when the install request is for custom integration app.feature_not_enabled- Returned when the Admin APIs feature is not enabled for this teaminvalid_app_id- Theapp_idpassed is invalid.invalid_request_id- Therequest_idpassed is invalid.invalid_scopes- Some of the provided scopes do not existnot_an_admin- This method is only accessible by org owners and adminsorg_resolution_required- Theteam_idis in an Enterprise org whileapp_idis certified.request_already_resolved- The app request has already been resolvedrequest_id_or_app_id_is_required- Must include arequest_idorapp_idrequest_id_required_for_custom_integrations- Arequest_idis required for custom integrationsteam_not_found- Returned when team id is not found.too_many_ids_provided- Please provide onlyapp_idORrequest_idtoo_many_teams_provided- Please provide onlyteam_idORenterprise_id
See the Common Errors guide for errors returned by every Web API method.
Clear an app resolution
API reference
Rate limit: Tier 2: 20+ per minute
Scopes:
- User token:
admin.apps:write
Required Params
app_id- The id of the app whose resolution you want to clear/undo. ex:A12345
Optional Params
enterprise_id- The enterprise to clear the app resolution from. Exactly one of theteam_idorenterprise_idarguments is required, not both. ex:E12345team_id- The workspace to clear the app resolution from. Exactly one of theteam_idorenterprise_idarguments is required, not both. ex:T12345
Errors the API can return:
app_management_app_not_installed_on_org- The app management app must be installed on the org.feature_not_enabled- Returned when the Admin APIs feature is not enabled for this teaminvalid_app_id- Theapp_idpassed is invalid.no_resolution_found- No existing resolutions were found for the giventeamandapp_id.not_an_admin- This method is only accessible by org owners and adminsrestricted_action- This actor does not have access to the permissions on this resource.team_not_found- Returned when team id is not found.too_many_teams_provided- Please provide onlyteam_idORenterprise_id
See the Common Errors guide for errors returned by every Web API method.
Restrict an app for installation on a workspace.
API reference
Rate limit: Tier 2: 20+ per minute
Scopes:
- User token:
admin.apps:write
Optional Params
app_id- The id of the app to restrict. Eitherapp_idorrequest_idis required. ex:A12345enterprise_id- The ID of the enterprise to approve the app on. Exactly one of theteam_idorenterprise_idarguments is required, not both. ex:E12345request_id- The id of the request to restrict. Eitherapp_idorrequest_idis required. ex:Ar12345team_id- The ID of the workspace to approve the app on. Exactly one of theteam_idorenterprise_idarguments is required, not both. ex:T12345
Errors the API can return:
app_management_app_not_installed_on_org- The app management app must be installed on the org.custom_integration_not_allowed_at_enterprise- Returned when the install request is for custom integration app.feature_not_enabled- Returned when the Admin APIs feature is not enabled for this teaminvalid_app_id- Theapp_idpassed is invalid.invalid_request_id- Therequest_idpassed is invalid.invalid_scopes- Some of the provided scopes do not existnot_an_admin- This method is only accessible by org owners and adminsrequest_already_resolved- The app request has already been resolvedrequest_id_or_app_id_is_required- Must include arequest_idorapp_idrequest_id_required_for_custom_integrations- Arequest_idis required for custom integrationsteam_not_found- Returned when team id is not found.too_many_ids_provided- Please provide onlyapp_idORrequest_idtoo_many_teams_provided- Please provide onlyteam_idORenterprise_id
See the Common Errors guide for errors returned by every Web API method.
Uninstall an app from one or many workspaces, or an entire enterprise organization.
API reference
Rate limit: Tier 1: 1+ per minute
Scopes:
- User token:
admin.apps:write
Required Params
app_id- The ID of the app to uninstall. ex:A12345
Optional Params
enterprise_id- The enterprise to completely uninstall the application from (across all workspaces). With an org-level token, this orteam_idsis required. Exactly one of the argumentsenterprise_idorteam_idsis required to specify where the app should be removed. ex:E12345team_ids- IDs of the teams to uninstall from (max 100). With an org-level token, this orenterprise_idis required. Exactly one of the argumentsenterprise_idorteam_idsis required to specify where the app should be removed.
Errors the API can return:
app_not_found- The providedapp_idwas not found.can_not_uninstall- This application can not be uninstalled via the API.enterprise_not_found- The providedenterprise_idwas not found.feature_not_enabled- The Admin APIs feature is not enabled for this team.must_revoke_access- Organization-deployed apps cannot be uninstalled from specific workspaces using this API.permission_denied- You do not have permission to uninstall applications from the reqeusted org or workspaces.restricted_action- the user is not authorized to perform this actionspecify_enterprise_or_teams- Provide exactly one ofenterprise_idorteam_ids.teams_not_found- One or more of the providedteam_idswere not found.too_many_teams- Too many IDs are present inteam_ids.
See the Common Errors guide for errors returned by every Web API method.