-
Notifications
You must be signed in to change notification settings - Fork 85
missing scope rtm:stream #47
Comments
Hi! We're not able to provide support here. We keep this repository up as a reference. Would you mind opening a help ticket through either at http://my.slack.com/help/requests/new or at feedback@slack.com? Thanks very much. |
There's two scopes you can use for the rtm API:
You are not using any of those two scopes, so you don't have access to the RTM API. |
@ernesto-jimenez Could the response message or rtm readme (https://api.slack.com/rtm) be modified to make this more obvious? |
@lime-green I don't work at Slack, so you should ask them at feedback@slack.com ;) |
@ernesto-jimenez ah, my apologies, will do! :D |
@lime-green Did they ever get back to you? I have the same problem.. |
@Traintula if you are getting that error, your token is missing the |
@ernesto-jimenez scope='channels:read,channels:write,channels:history,chat:write:user,chat:write:bot,team:read,users:read,identify,bot,rtm:stream', |
remove |
You've got info about OAuth scopes here: https://api.slack.com/docs/oauth-scopes |
@ernesto-jimenez
|
@Traintula stick to the list of scopes in the main table on that page + |
@ernesto-jimenez I would gladly stick to the table, but I need to use "rtm.start" which worked great in the past until I added |
@Traintula you can use the If you want to use the |
@Traintula ernesto is correct, bot scope should have access to "rtm.start" (you can see it has access to that method here: https://api.slack.com/bot-users#bot-methods). You should also be able to add all the methods in the table. On a side note, I have contacted support about updating the API response and the docs to make this more clear. I don't think this has been done yet, however. |
This is my understanding:
@lime-green Using the @ernesto-jimenez Anyway, Thanks for all the help. |
Extra validation - just got this message when I tried to upgrade the existing user tokens from the "My Apps" screen in Slack: Oops, sorry! |
I am trying to build a slack user client use rtm. Has this issue been resolved by Slack or is it still an issue as I am running into the missing scope issue? |
@Matthew-Jannace there's no issue, you just need to use the old scopes ( |
@Matthew-Jannace This problem we were talking about only occurs when you mix the old and new scopes in the same oauth call. |
Hi there. I requested to slack oauth api like this but client scope is deprecated.... and can't use it with commands scope. So, I changed my scope like this https://slack.com/oauth/authorize?client_id=&scope=commands+bot when you auth slack's OAuth API, it return not only access_token but also bot_access_token. You can access RTM API using bot_access_token and you can access WEB API using access_token. |
in by case only works if i use legacy token |
If anyone else runs into this issue, I wrote some docs on generating an Hope this helps someone! |
I've using StackStorm-slack https://github.com/StackStorm-Exchange/stackstorm-slack which using I created a classic app, and I gave it
I went back to check my OAuth Tokens & Redirect URLs page, under
I click into the |
Cool! I figured out. I should using bot user token instead of OAuth access token here. And these is working only if I am using a classic app here. If it is a new app, then using bot user token would fail at token type mistaken error. |
I've built a simple slack view inside another application, with the following authentication flow:
This works fine for everything, with the exception of the RTM Websocket protocol. When I perform an api call to rtm.start, I get the following error:
{
error: "missing_scope",
needed: "rtm:stream",
ok: false,
provided: "identify,channels:history,im:history,channels:read,im:read,users:read,chat:write:user,chat:write:bot,im:write"
}
Adding rtm:stream to the scope however results in an error upon login: "unrecognized scope: rtm:stream". I'm not sure how to proceed, and it seems odd to receive an error that indicates a scope is needed that does not exist.
The text was updated successfully, but these errors were encountered: