Code on GitHub Slack Platform Home

Node Slack SDK

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
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.

Installation

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

Requirements

This package supports Node v8 LTS 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.

Getting Help

If you get stuck, we’re here to help. The following are the best ways to get assistance working through your issue:

  • Issue Tracker for questions, feature requests, bug reports and general discussion related to this package.
  • Email us in Slack developer support: developers@slack.com
  • Bot Developers Hangout: a Slack community for developers building all types of bots. You can find the maintainers and users of this package in #sdk-node-slack-sdk.