![Owns Owns](/uploads/1/3/3/8/133811929/983397196.png)
0 conversations with unread messages, including 0 mentions and keywords. Mentions & reactions. Slack is a proprietary business communication platform developed by American software company Slack Technologies.Slack offers many IRC-style features, including persistent chat rooms (channels) organized by topic, private groups, and direct messaging. 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.
The Slack platform offers several APIs to build apps. Each Slack API delivers part of the capabilities from theplatform, so that you can pick just those that fit for your needs. This SDK offers a corresponding package for each ofSlack’s APIs. They are small and powerful when used independently, and work seamlessly when used together, too.
Just starting out? The Getting Started tutorial willwalk 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 blogpost 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-styleapp inside Slack, try the Hubot Slack adapter. Hubot is a popular frameworkfor internal apps that automate workflows, perform ChatOps, or just generate silly memes.
Installation
Slack Website Chat
Use your favorite package manager to install any of the packages and save to your
package.json
:Requirements
This package supports Node v8 LTS and higher. It’s highly recommended to use the latest LTS version ofnode, and the documentation is written using syntax and featuresfrom that version.
Getting Help
![Account Account](/uploads/1/3/3/8/133811929/759491905.png)
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, featurerequests, bug reports and general discussion related to this package.
- Email us in Slack developer support:
[email protected]
- Bot Developers Hangout: a Slack community for developersbuilding all types of bots. You can find the maintainers and users of this package in #sdk-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.
Feature | What its for | Package |
Web API | Send data to or query data from Slack using any of over 200 methods. | slack_sdk.web slack_sdk.web.async_client |
Webhooks / response_url | Send a message using Incoming Webhooks or response_url | slack_sdk.webhook slack_sdk.webhook.async_client |
Socket Mode | Receive and send messages over Socket Mode connections. | slack_sdk.socket_mode |
OAuth | Setup the authentication flow using V2 OAuth for Slack apps. | slack_sdk.oauth |
Audit Logs API | Receive audit logs API data. | slack_sdk.audit_logs |
SCIM API | Utilize the SCIM APIs for provisioning and managing user accounts and groups. | slack_sdk.scim |
RTM API | Listen for incoming messages and a limited set of events happening in Slack, using WebSocket. | slack_sdk.rtm_v2 |
Request Signature Verification | Verify incoming requests from the Slack API servers. | slack_sdk.signature |
UI Builders | Construct UI components using easy-to-use builders. | slack_sdk.models |
The Python module documents are available at https://slack.dev/python-slack-sdk/api-docs/slack_sdk/
Installation¶
This package supports Python 3.6 and higher. We recommend using PyPI to install Python Slack SDK
Of course, you can always pull the source code directly into your project:
And then, save a few lines of code as
./test.py
.Slack Website
You can run the code this way.
It’s also good to try on the Python REPL.
Getting Help¶
If you get stuck, we’re here to help. The following are the best ways to get assistance working through your issue:
Slack Official Site Website
- GitHub Issue Tracker for questions, feature requests, bug reports and general discussion related to this package.
- Visit the Slack Developer Community for getting help using Python Slack SDK or just generally bond with your fellow Slack developers.