-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ERROR] not_allowed_token_type error on new bot app #147
Comments
@loretoparisi did you get to know how to overcome this error ? |
@sb39 not yet, I have created a brand new app on the 21, according to slack on the 20th the new app oauth token have been deployed, so it should have work... |
same issue: #145 |
I am getting the same error, whats the status on this issue? |
Can confirm, same issue here too.. claims are that RTM is not allowed and that the issue can be solved if you make a simple slack app instead of a bot |
I would recommend using Slack Official API, its much more flexible and very well documented |
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 appMUST create CLASSIC slack app here and not the new style granular permissions app. Related docs:
|
Hello, so what I did was this
Then I have set the Bot User OAuth Access Token in the SDK: 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
}); and I get that error again:
So now my guess is that the classic apps are actually not |
[UPDATE] and now it works! So at least in my Slack, I cannot have not classic apps, but it works with a deprecated app. Thank you. |
A very full and clear explanation of how to setup a classic app on slack for RTM (for this workaround) from elsewhere: |
@baob thank you. A question, maybe related to this classic app setup: var params = {
icon_emoji: ':rocket:'
};
self.bot.postMessageToChannel(self._options.slack.botChannel, 'listening...', params); the emoji does not appear in the slack chat. My fault? |
I suspect this s unrelated to the main topic of this thread. Two thoughts. (1) are you sure that emoji is available on your slack workspace ? (2) I remember seeing that initially but don't remember taking any specific action to cure it. Perhaps a caching issue ? |
@baob yes I have the // slack bot ready
self.bot.on('start', () => {
var params = {
icon_emoji: 'rocket'
};
self.bot.postMessageToChannel(self._options.slack.botChannel, 'listening...', params);
return resolve(true);
}); |
I confirm now that the emoji works. The problem happens on slack in Chrome, while on slack mobile I can see emojis. Thanks! |
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. |
Bumping for visibility. Still cannot set fields |
Any fix for this? I was following the same tutorial |
To anyone coming here: The tutorial on freecodecamp is based on obsolete Slack APIs and a module that's not supporting the recent versions. I just wasted time on this module and tutorial as well, it should have an "Unsupported" disclamer in top, IMO. However, I made something work with Slack's own bolt API. https://blog.logrocket.com/build-a-slackbot-in-node-js-with-slacks-bolt-api/ |
I have created a brand new bot app (21 feb 2020).
I the put my new bot oauth token in the init:
where the bot oauth token starts with
xoxb-
, but I get thenot_allowed_token_type
in the eventThe text was updated successfully, but these errors were encountered: