{"id":20746906,"url":"https://github.com/johnagan/slack-devkit","last_synced_at":"2025-04-28T11:16:59.971Z","repository":{"id":32859050,"uuid":"144443794","full_name":"johnagan/slack-devkit","owner":"johnagan","description":"A Slack developer kit to make building distributed Slack Apps easy.","archived":false,"fork":false,"pushed_at":"2022-03-31T03:07:26.000Z","size":251,"stargazers_count":30,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T09:04:38.363Z","etag":null,"topics":["express","lambda","middleware","sdk","serverless","slack"],"latest_commit_sha":null,"homepage":"https://slackdevkit.com","language":"JavaScript","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/johnagan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-12T06:34:01.000Z","updated_at":"2023-09-07T01:46:07.000Z","dependencies_parsed_at":"2022-08-07T18:15:40.360Z","dependency_job_id":null,"html_url":"https://github.com/johnagan/slack-devkit","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fslack-devkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fslack-devkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fslack-devkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fslack-devkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnagan","download_url":"https://codeload.github.com/johnagan/slack-devkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251057979,"owners_count":21529645,"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":["express","lambda","middleware","sdk","serverless","slack"],"created_at":"2024-11-17T08:09:50.272Z","updated_at":"2025-04-28T11:16:59.950Z","avatar_url":"https://github.com/johnagan.png","language":"JavaScript","readme":"![](https://cl.ly/3V2e321C0D00/logo-black.png)\n\n# Slack DevKit\n\nSlack DevKit is a light-weight developer kit to build [Slack Apps](https://api.slack.com/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.\n\nThis was made to build Slack Apps on [Glitch](https://glitch.com) even faster, but it works everywhere!\n\nLearn more on [SlackDevKit.com](https://slackdevkit.com)\n\n## Overview\n\n### Features\n\n- OAuth support without 3rd-party database\n- Supports Single Channel Installations\n- Verifies request signatures and/or verification tokens\n- Support for short-lived tokens with automatic refresh\n- Automatic retrieval of workspace's authentication info\n- Auto-parsing of string-encoded JSON payloads\n- Authenticated HTTP client for Slack's API\n- Writeable datastore associated to the workspace\n\n### What's Included\n\n- [App](./src/core/app.js) - The Slack App\n- [Request](./src/core/request.js) - The request made from Slack\n- [Client](./src/core/client.js) - Minimal HTTPS client (to call other APIs)\n- [Payload](./src/core/payload.js) - Wrapper for Slack payloads (to standardize attributes)\n- [Router](./src/server/router.js) - An [Express.js](https://expressjs.com/) router (middleware)\n- [Express](./src/server/express.js) - An [Express.js](https://expressjs.com/) instance with the router attached\n- [Lambda](./src/server/lambda.js) - An [AWS Lambda](https://aws.amazon.com/lambda/) AWS Lambda handler\n- [FileStore](./src/datastore/filestore.js) - File-based storage to save workspace information\n- [DynamoDB](./src/datastore/dynamodb.js) - DynamoDB storage to save workspace information\n\n### Examples\n\n| File                                                          | Description                                                                                                 |\n| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |\n| [features.js](./examples/features.js)                         | Examples of some common Slack App features                                                                  |\n| [internal-integration.js](./examples/internal-integration.js) | Example configuration of an [internal integrations](https://api.slack.com/slack-apps#internal_integrations) |\n| [storing-data.js](./examples/storing-data.js)                 | Example of storing and retrieving data from the datastore                                                   |\n| [express.js](./examples/express.js)                           | Example of adding Slack DevKit to an exiting [Express.js](https://expressjs.com/) server                    |\n| [lambda.js](./examples/lambda.js)                             | Using Slack DevKit with AWS Lambda and DynamoDB                                                             |\n\n## Getting Started\n\n### Install\n\n```\nnpm i slack-devkit\n```\n\n### Usage\n\n```javascript\nconst Slack = require('slack-devkit');\n\n// Configure express with the Slack App settings\nconst { server } = new Slack({\n  scope: 'chat:write,bot',\n  client_id: '1212313.1231231231231',\n  client_secret: '12312312323123123',\n  signing_secret: 'sdfsadfsadfasdfas',\n  redirect_uri: 'https://myserver.com', // optional\n  datastore: '.data/workspaces' // optional\n});\n\n// All GET routes redirect to the “Add to Slack” OAuth flow\nserver.get('/', (req, res) =\u003e {\n  req.slack.data; // the authenticated workspace info\n  res.send();\n});\n\n// All POST routes expect Slack callback events\n// and verify against the verification token\nserver.post('/', (req, res) =\u003e {\n  const user = req.slack.user_id;\n  req.slack.api('users.info', { user }).then(r =\u003e {\n    r.data; // the results of 'users.info' API request\n  });\n  res.send();\n});\n\n// Start the webserver on port 3000\nserver.start(3000);\n```\n\n### Configuration\n\nThe configuration options used for the constructor\n\n| Name                 | Type     | Description                                                                                                      |\n| -------------------- | -------- | ---------------------------------------------------------------------------------------------------------------- |\n| `scope`              | Required | [Slack OAuth scopes](https://api.slack.com/docs/oauth#step_1_-_sending_users_to_authorize_and_or_install)        |\n| `client_id`          | Required | [Slack OAuth client id](https://api.slack.com/docs/oauth#step_1_-_sending_users_to_authorize_and_or_install)     |\n| `client_secret`      | Required | [Slack OAuth client secret](https://api.slack.com/docs/oauth#step_1_-_sending_users_to_authorize_and_or_install) |\n| `redirect_uri`       | Optional | [Slack OAuth redirect uri](https://api.slack.com/docs/oauth#step_1_-_sending_users_to_authorize_and_or_install)  |\n| `signing_secret`     | Optional | [Slack signing secret](https://api.slack.com/docs/verifying-requests-from-slack#about)                           |\n| `verification_token` | Optional | [Slack verification token](https://api.slack.com/events-api#url_verification)                                    |\n| `access_token`       | Optional | Access token for [internal integrations](https://api.slack.com/slack-apps#internal_integrations)                 |\n| `slack_root`         | Optional | Root domain to use for Slack requests                                                                            |\n| `datastore`          | Optional | File path to write to or a DataStore object                                                                      |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnagan%2Fslack-devkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnagan%2Fslack-devkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnagan%2Fslack-devkit/lists"}