首页 > 解决方案 > 试图构建一个松弛的机器人并面临错误“错误:not_allowed_token_type”

问题描述

只是试图通过关注 YouTube 链接来构建一个简单的 slack 机器人并开始收到错误 Error: not_allowed_token_type

const bot = new SlackBot({
token: 'xoxb-TOKEN_GENERATED FROM SLACK SITE',
name: 'escalatorbot'  // what name should I give here
})

有人能告诉我为什么我面临这个错误

标签: javascriptnode.jsslack

解决方案


从您的代码片段中,我认为您正在使用 Slackbots.js 并遇到一个已知问题,该问题是由于 slack api 最近的更改而导致的。问题记录在这里:https ://github.com/mishk0/slack-bot-api/issues/145


推荐阅读