@slack/events-api
and @slack/interactive-messages
officially reached EOL on May 31st, 2021. Development has fully stopped for these packages and all remaining open issues and pull requests have been closed.
At this time, we recommend migrating to Bolt for JavaScript, a framework that offers all of the functionality available in those packages (and more). To help with that process, we’ve provided some migration samples for those looking to convert their existing apps.
The Slack platform offers several APIs to build apps. Each Slack API delivers part of the capabilities from the platform, so that you can pick just those that fit for your needs. This SDK offers a corresponding package for each of Slack’s APIs. They are small and powerful when used independently, and work seamlessly when used together, too.
Just starting out? The Getting Started tutorial will walk you through building your first Slack app using Node.js.
Slack API | What its for | NPM Package |
---|---|---|
Web API | Send data to or query data from Slack using any of over 130 methods. | @slack/web-api |
Events API | Listen for incoming messages and many other events happening in Slack, using a URL. | @slack/events-api |
Interactive Messages | Respond to button clicks, dialogs, and other interactions with messages. | @slack/interactive-messages |
OAuth | Setup the authentication flow using V2 OAuth for Slack apps as well as V1 OAuth for classic Slack apps. | @slack/oauth |
RTM API | Listen for incoming messages and a limited set of events happening in Slack, using websockets. | @slack/rtm-api |
Incoming Webhooks | Send notifications to a single channel which the user picks on installation. | @slack/webhook |
Not sure about which APIs are right for your app? Read our blog post that explains the options. If you’re still not sure, reach out for help and our community can guide you.
If you’re looking for an all-in-one solution that hides the underlying Slack APIs, but simplifies building a bot-style app inside Slack, try the Hubot Slack adapter. Hubot is a popular framework for internal apps that automate workflows, perform ChatOps, or just generate silly memes.
Use your favorite package manager to install any of the packages and save to your package.json
:
$ npm install @slack/web-api @slack/events-api
# Or, if you prefer yarn
$ yarn add @slack/web-api @slack/events-api
This package supports Node v14 and higher. It’s highly recommended to use the latest LTS version of node, and the documentation is written using syntax and features from that version.
If you get stuck, we’re here to help. The following are the best ways to get assistance working through your issue:
developers@slack.com