javascript - 我需要提供什么链接才能使用 Bolt 正确安装我的 Slack 应用程序?
问题描述
我一直在想办法在我的工作区正确安装我的 Slack 应用程序。我正在使用 Bolt Node.js 框架来执行此操作,并且我正在使用以下端点进行安装
https://mysite/slack/install
但是,一旦我导航到此页面,它就会说找不到该页面。我以为这个页面应该返回一个按钮来安装应用程序?
另外,我列出了重定向 URL 到这个端点,但我仍然得到同样的错误。
这是一些代码
const app = new Bolt.App({
token: BOT_TOKEN,
clientId: CLIENT_ID,
clientSecret:CLIENT_SECRET,
signingSecret: SIGNING_SECRET,
scopes: ['chat:write','commands','channels:history','groups:history','users:read'],
installationStore: {
storeInstallation: async (installation) => {
console.log(installation)
if (installation.isEnterpriseInstall && installation.enterprise !== undefined) {
console.log(installation.enterprise.id)
}
if (installation.team !== undefined) {
console.log(installation.team.id)
}
},
fetchInstallation: async (installQuery) => {
console.log(installQuery)
if (installQuery.isEnterpriseInstall && installQuery.enterpriseId !== undefined) {
console.log(installQuery.enterpriseId)
}
if (installQuery.teamId !== undefined) {
console.log(installQuery.teamId)
}
},
deleteInstallation: async (installQuery) => {
console.log(installQuery)
if (installQuery.isEnterpriseInstall && installQuery.enterpriseId !== undefined) {
console.log(installQuery.enterpriseId)
}
if (installQuery.teamId !== undefined) {
console.log(installQuery.teamId)
}
}
}
})
解决方案
推荐阅读
- github - 图片未显示在 github gh-pages 上
- azure - 为什么我的组没有显示在它添加到的工作项中?
- c# - C# 主应用程序移动到主屏幕,而不是从它启动的地方
- sql - 我如何从 xml 获取 CDATA 值
- javascript - 在数组中添加递增的类名 - JavaScript
- python - Airflow KubernetesPodOperator 在本地 MicroK8 上超时
- ansible - Ansible 2.9 Unexpected failure during module execution error (local connection)
- ios - 如何在运行时将 iOS 中的设备日志从 iPhone 捕获到 Documents Directory 中的文件中?
- sql-server - BCP - 将查询导出到制表符分隔的文本文件
- php - 如何在php中更改数组