
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
slack-devkit
Advanced tools
Slack DevKit is a light-weight developer kit to build Slack Apps in node.js super fast. No previous knowledge about building Slack Apps or Bots needed! Plus, automatic support for verifying requests from Slack and responding to validations.
This was made to build Slack Apps on Glitch even faster, but it works everywhere!
Learn more on SlackDevKit.com
File | Description |
---|---|
features.js | Examples of some common Slack App features |
internal-integration.js | Example configuration of an internal integrations |
storing-data.js | Example of storing and retrieving data from the datastore |
express.js | Example of adding Slack DevKit to an exiting Express.js server |
lambda.js | Using Slack DevKit with AWS Lambda and DynamoDB |
npm i slack-devkit
const Slack = require('slack-devkit');
// Configure express with the Slack App settings
const { server } = new Slack({
scope: 'chat:write,bot',
client_id: '1212313.1231231231231',
client_secret: '12312312323123123',
signing_secret: 'sdfsadfsadfasdfas',
redirect_uri: 'https://myserver.com', // optional
datastore: '.data/workspaces' // optional
});
// All GET routes redirect to the “Add to Slack” OAuth flow
server.get('/', (req, res) => {
req.slack.data; // the authenticated workspace info
res.send();
});
// All POST routes expect Slack callback events
// and verify against the verification token
server.post('/', (req, res) => {
const user = req.slack.user_id;
req.slack.api('users.info', { user }).then(r => {
r.data; // the results of 'users.info' API request
});
res.send();
});
// Start the webserver on port 3000
server.start(3000);
The configuration options used for the constructor
Name | Type | Description |
---|---|---|
scope | Required | Slack OAuth scopes |
client_id | Required | Slack OAuth client id |
client_secret | Required | Slack OAuth client secret |
redirect_uri | Optional | Slack OAuth redirect uri |
signing_secret | Optional | Slack signing secret |
verification_token | Optional | Slack verification token |
access_token | Optional | Access token for internal integrations |
slack_root | Optional | Root domain to use for Slack requests |
datastore | Optional | File path to write to or a DataStore object |
FAQs
A Slack developer kit to make building distributed Slack apps easy.
We found that slack-devkit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.