Harish Shetty
Harish Shetty

Reputation: 64373

How to specify bot and client scopes in Slack OAuth request

When I use client and bot scopes together I get the following error.

https://slack.com/oauth/authorize?scope=bot,client

Cannot request service scope (bot) with deprecated scopes.

It looks like the client scope is deprecated(even though I haven't seen any documentation for it). I can specify object scopes with the bot scope, but I am not able to gather all the scopes that constitutes the compound scope client(especially the scopes for RTM).

Upvotes: 2

Views: 3112

Answers (2)

Matthieu
Matthieu

Reputation: 1239

The client scope is not deprecated, but is incompatible with the bot scope

Please note that certain scopes cannot be asked for in combination with each other. For instance, you cannot request both the bot scope and the client scope. When users arrive at an authorization page requesting invalid scope combinations, they'll see an ugly error stating something to this effect:

"OAuth error: invalid_scope: Cannot request service scope (bot) with deprecated scopes"

If you want to access the RTM API to build a client, request the client scope. If it is to build a Slack app using the RTM API, use the bot scope. Either one should be enough for your needs

Upvotes: 2

kchoi
kchoi

Reputation: 1215

You need to provide your own server redirect uri in the slack oauth settings by going to https://api.slack.com/applications and choosing the application you're working with.

If you're developing on local, you should request via something like http://localhost:3000/oauth/authorize?scope=bot,client

Or if you're on prod, you want to specify your server uri like http://<SERVER_URI>/oauth/authorize?scope=bot,client

Upvotes: 0

Related Questions