slack-rs / slack-rs-api

Rust interface for the Slack Web API
Apache License 2.0
109 stars 67 forks source link

The `start_rtm.rs` returns "missing scope" #77

Open cedric-h opened 4 years ago

cedric-h commented 4 years ago

That example would be a really great jumping off point, but I'm not sure which permissions I need to give it. Right now I'm giving it:

channels:history, channels:read, chat:write:user, im:history, im:read

But apparently more, or different ones are needed?

Thanks!

dten commented 4 years ago

That's odd. Perhaps something had changed but my app only has the slash command permission. Hmmm

dten commented 4 years ago

It does seem some things have changed.

This page implies you need a bot type token with the scope bot https://api.slack.com/methods/rtm.connect

ccakes commented 4 years ago

Ever get this resolved? Having the same issue

dten commented 4 years ago

Do you have the scopes required according to the docs?

ccakes commented 4 years ago

Ended up getting this resolved. The crate docs don't contain anything about how to set up a valid RTM token and the way through legacy bot tokens etc via the Slack API portal is a bit of an average user experience.

dten commented 4 years ago

For how slack works you should read the slack docs https://api.slack.com/rtm they change a lot and it would be impossible for the docs.rs docs to mirror them. For rtm Slack expects you to use the oauth flow and not a tester token. in fact they're soon removing the creation of test tokens. https://api.slack.com/legacy/oauth New slack apps can't use rtm at all and i'm a little worried they're going to kill it

dten commented 4 years ago

I'll try and make the docs link to related places though

ccakes commented 4 years ago

New slack apps can't use rtm at all and i'm a little worried they're going to kill it

Same. Sorry didn't meant to come across as though I thought it was a crate doc problem, the Slack docs themselves are lacking. When I was Googling the error messages I found a lot of Python and JS devs with the same problem