[ERROR] not_allowed_token_type error on new bot app
See original GitHub issueI have created a brand new bot app (21 feb 2020). I the put my new bot oauth token in the init:
// Slack bot
self.bot = new SlackBot({
token: self._options.slack.botToken,
name: self._options.slack.botName,
// (boolean, defaults: false) whether to open websocket connection to listen to incoming messages,
// set to true for one time use
disconnect: false
});
where the bot oauth token starts with xoxb-
, but I get the not_allowed_token_type
in the event
// slack bot error
self.bot.on('error', (error) => {
error = error || new Error('slack connection error');
self.logger.error("Channel slack connection error", error.toString());
return reject(error);
});
Issue Analytics
- State:
- Created 4 years ago
- Comments:18
Top Results From Across the Web
Not allowed token type for Slack connection #964 - GitHub
U am using the "xoxb-" bot token. @robertomano24. I just went through the process myself and got the same error, it took me...
Read more >Slack not_allowed_token_type error - How to send message ...
You are using the wrong Bearer Token. You should be using the bot token (xoxb). The token you are currently using is for...
Read more >Access tokens - Slack API
Access tokens are the keys to the Slack platform. Tokens tie together all the scopes and permissions your app has obtained, allowing it...
Read more >Getting started with HTTP - Slack | Bolt for JavaScript
There are three main token types available to a Slack app: user ( xoxp ), bot ( xoxb ), and app ( xapp...
Read more >Develop a Slack-bot using Golang - ProgrammingPercy
Go into Settings->Basic Information and scroll down to the chapter called App-Level Tokens and press Generate Tokens and Scope and fill in a ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Are you guys ever planning to fix this? A few months later I have the same error after a fresh new project, and creating a new app bot. I was following this tutorial. https://www.freecodecamp.org/news/building-a-slackbot-with-node-js-and-slackbots-js/ “slackbots”: “^1.2.0”
I can confirm both that it’s an existing issue AND that the workarounds suggested are fine. Here’s what I said in the README of the app I’m building
Creating the slack app
MUST create CLASSIC slack app here and not the new style granular permissions app. After that create a legacy app user then install the app to the workspace. Then the Bot Oauthh token will work.
Related docs: