{"id":13479465,"url":"https://github.com/slackapi/node-slack-sdk","last_synced_at":"2026-03-13T02:16:45.900Z","repository":{"id":15386407,"uuid":"18117991","full_name":"slackapi/node-slack-sdk","owner":"slackapi","description":"Slack Developer Kit for Node.js","archived":false,"fork":false,"pushed_at":"2025-05-06T16:51:48.000Z","size":16871,"stargazers_count":3311,"open_issues_count":45,"forks_count":674,"subscribers_count":121,"default_branch":"main","last_synced_at":"2025-05-09T02:44:56.833Z","etag":null,"topics":["slack","slackapi","socket-mode","typescript","websocket","websocket-client","websockets"],"latest_commit_sha":null,"homepage":"https://tools.slack.dev/node-slack-sdk/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slackapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-03-25T21:56:50.000Z","updated_at":"2025-05-08T10:24:31.000Z","dependencies_parsed_at":"2023-11-07T18:44:49.948Z","dependency_job_id":"5437cd69-cf6a-4375-8680-d023b63ff5e1","html_url":"https://github.com/slackapi/node-slack-sdk","commit_stats":{"total_commits":2067,"total_committers":193,"mean_commits":"10.709844559585493","dds":0.7508466376390904,"last_synced_commit":"332e38f9151769d748ee9e81902473f2ef7f6c99"},"previous_names":["slackhq/node-slack-client","slackhq/node-slack-sdk"],"tags_count":351,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fnode-slack-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fnode-slack-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fnode-slack-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slackapi%2Fnode-slack-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slackapi","download_url":"https://codeload.github.com/slackapi/node-slack-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253273342,"owners_count":21881967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["slack","slackapi","socket-mode","typescript","websocket","websocket-client","websockets"],"created_at":"2024-07-31T16:02:16.842Z","updated_at":"2026-03-13T02:16:45.892Z","avatar_url":"https://github.com/slackapi.png","language":"TypeScript","readme":"# Node Slack SDK\n\n[![build-ci](https://github.com/slackapi/node-slack-sdk/actions/workflows/ci-build.yml/badge.svg)](https://github.com/slackapi/node-slack-sdk/actions/workflows/ci-build.yml)\n\u003c!-- TODO: npm versions with scoped packages: https://github.com/rvagg/nodei.co/issues/24 --\u003e\n___\n\n## Getting Started\n\nVisit the [documentation site](https://docs.slack.dev/tools/node-slack-sdk/) for all the lovely details.\n\n_This SDK is a collection of single-purpose packages. The packages are aimed at making building Slack apps\neasy, performant, secure, and scalable. They can help with just about anything in the Slack platform, from dropping\nnotifications in channels to fully interactive bots._\n\nThe Slack platform offers several APIs to build apps. Each Slack API delivers part of the capabilities from the\nplatform, so that you can pick just those that fit for your needs. This SDK offers a corresponding package for each of\nSlack's APIs. They are small and powerful when used independently, and work seamlessly when used together, too.\n\n**Just starting out?** The [Getting Started tutorial](https://docs.slack.dev/tools/node-slack-sdk/getting-started) will\nwalk you through building your first Slack app using Node.js.\n\n| Slack API    | Use | NPM Package      |\n|--------------|--------------|-------------------|\n| Web API      | Send data to or query data from Slack using any of [over 220 methods](https://docs.slack.dev/reference/methods). | [`@slack/web-api`](https://docs.slack.dev/tools/node-slack-sdk/web-api) |\n| OAuth        | Set up the authentication flow using V2 OAuth for Slack apps as well as V1 OAuth for classic Slack apps. | [`@slack/oauth`](https://docs.slack.dev/tools/node-slack-sdk/oauth) |\n| Incoming Webhooks | Send notifications to a single channel which the user picks on installation. | [`@slack/webhook`](https://docs.slack.dev/tools/node-slack-sdk/webhook) |\n| Socket Mode  | Listen for incoming messages and a limited set of events happening in Slack, using WebSocket. | [`@slack/socket-mode`](https://docs.slack.dev/tools/node-slack-sdk/socket-mode) |\n\n**Not sure about which APIs are right for your app?** Read our [blog\npost](https://medium.com/slack-developer-blog/getting-started-with-slacks-apis-f930c73fc889) that explains the options.\nIf you're still not sure, [reach out for help](#getting-help) and our community can guide you.\n\n## Installation\n\nUse your favorite package manager to install any of the packages and save to your `package.json`:\n\n```shell\n$ npm install @slack/web-api @slack/socket-mode\n\n# Or, if you prefer yarn\n$ yarn add @slack/web-api @slack/socket-mode\n```\n\n## Usage\n\nThe following examples summarize the most common ways to use this package. There's also a [Getting Started\ntutorial](https://docs.slack.dev/tools/node-slack-sdk/getting-started) that's perfect for just starting out, and each\npackage's documentation, linked in the table above.\n\n### Posting a message with Web API\n\nYour app will interact with the Web API through the `WebClient` object, which is an export from `@slack/web-api`. You\ntypically instantiate a client with a token you received from Slack. The example below shows how to post a message into\na channel, DM, MPDM, or group. The `WebClient` object makes it simple to call any of the [**over 130 Web API\nmethods**](https://docs.slack.dev/reference/methods).\n\n```javascript\nconst { WebClient } = require('@slack/web-api');\n\n// An access token (from your Slack app or custom integration - xoxp, xoxb)\nconst token = process.env.SLACK_TOKEN;\n\nconst web = new WebClient(token);\n\n// This argument can be a channel ID, a DM ID, a MPDM ID, or a group ID\nconst conversationId = 'C1232456';\n\n(async () =\u003e {\n  // See: https://docs.slack.dev/reference/methods/chat.postMessage\n  const res = await web.chat.postMessage({ channel: conversationId, text: 'Hello there' });\n\n  // `res` contains information about the posted message\n  console.log('Message sent: ', res.ts);\n})();\n```\n\n**Note**: To use the example above, the token is required to have either the `bot`, `chat:user:write`, or\n`chat:bot:write` scopes.\n\n**Tip**: Use the [Block Kit Builder](https://api.slack.com/tools/block-kit-builder) for a playground\nwhere you can prototype your message's look and feel.\n\n### Listening for an event with the Events API\n\nRefer to [Bolt for JavaScript document pages](https://docs.slack.dev/tools/bolt-js/concepts/event-listening).\n\n### Responding to interactive messages\n\nRefer to [Bolt for JavaScript document pages](https://docs.slack.dev/tools/bolt-js/concepts/actions).\n\n### Using Socket Mode\n\nRefer to [the module document page](https://docs.slack.dev/tools/node-slack-sdk/socket-mode) and [Bolt for JavaScript document page](https://docs.slack.dev/bolt-js/concepts/socket-mode).\n\n## Requirements\n\nThis package supports Node v18 and higher. It's highly recommended to use [the latest LTS version of\nnode](https://github.com/nodejs/Release#release-schedule), and the documentation is written using syntax and features\nfrom that version.\n\n## Getting Help\n\nIf you get stuck, we're here to help. The following are the best ways to get assistance working through your issue:\n\n  * [Issue Tracker](http://github.com/slackapi/node-slack-sdk/issues) for questions, feature requests, bug reports and\n    general discussion related to these packages. Try searching before you create a new issue.\n  * [Email us](mailto:developers@slack.com) in Slack developer support: `developers@slack.com`\n","funding_links":[],"categories":["TypeScript","💖 Admired Examples",":hammer_and_wrench: \u0026nbsp; Libraries and SDKs","Node JS"],"sub_categories":["JavaScript/TypeScript"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslackapi%2Fnode-slack-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslackapi%2Fnode-slack-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslackapi%2Fnode-slack-sdk/lists"}