


Restricting an app does not remove existing installations of the app, it only prevents future installation. When restricted for the enterprise, an app can not be independently approved on particular workspaces, and any existing workspace-level approvals are voided. This App Management API method denies an app install request, restricts an app for a specific workspace, or restricts an app across an entire enterprise. shortcut ( ' open_modal ', async ( if ( installation. The open_modal shortcut opens a plain old modal app. If your app needs access to a channel ID, you may use a conversations_select element within a modal. ⚠️ Note that global shortcuts do not include a channel ID. When configuring shortcuts within your app configuration, you’ll continue to append /slack/events to your request URL. Shortcuts include a trigger_id which an app can use to open a modal that confirms the action the user is taking. Shortcuts must be acknowledged with ack() to inform Slack that your app has received the request. Design your regular expressions to avoid this possibility. ⚠️ Note that if you use shortcut() multiple times with overlapping RegExp matches, all matching listeners will run. The method requires a callback_id parameter of type string or RegExp. Your app can use the shortcut() method to listen to incoming shortcut requests. Message shortcuts are available in the context menus of messages.

Global shortcuts are available from within search in Slack. Shortcuts are invokable entry points to apps. The shortcut() method supports both global shortcuts and message shortcuts. This is handy for existing applications looking to add support for org wide installations and not spend time updating all of these web-api calls. Bolt for JavaScript will attempt to infer the team_id based on incoming payloads and pass it along to client. Since the introduction of org wide app installations, some web-api methods now require team_id to indicate which workspace to act on. If the incoming request is not authorized or you’re calling a method from outside of a listener, use the top-level app.client.Ĭalling one of the WebClient’s methods will return a Promise containing the response from Slack, regardless of whether you use the top-level or listener’s client. Your Bolt app also has a top-level app.client which you can manually pass the token parameter. The built-in OAuth support handles the second case by default. This uses either the token that initialized your app or the token that is returned from the authorize function for the incoming event. You can call any Web API method using the WebClient provided to your app’s listeners as client.
