Slack DevKit
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
Overview
Features
- OAuth support without 3rd-party database
- Supports Single Channel Installations
- Verifies request signatures and/or verification tokens
- Support for short-lived tokens with automatic refresh
- Automatic retrieval of workspace's authentication info
- Auto-parsing of string-encoded JSON payloads
- Authenticated HTTP client for Slack's API
- Writeable datastore associated to the workspace
What's Included
Examples
Getting Started
Install
npm i slack-devkit
Usage
const Slack = require('slack-devkit');
const { server } = new Slack({
scope: 'chat:write,bot',
client_id: '1212313.1231231231231',
client_secret: '12312312323123123',
signing_secret: 'sdfsadfsadfasdfas',
redirect_uri: 'https://myserver.com',
datastore: '.data/workspaces'
});
server.get('/', (req, res) => {
req.slack.data;
res.send();
});
server.post('/', (req, res) => {
const user = req.slack.user_id;
req.slack.api('users.info', { user }).then(r => {
r.data;
});
res.send();
});
server.start(3000);
Configuration
The configuration options used for the constructor