当我同时使用 client
和 bot
作用域时,出现以下错误。
https://slack.com/oauth/authorize?scope=bot,client
Cannot request service scope (bot) with deprecated scopes.
看起来客户端范围已被弃用(即使我还没有看到任何相关文档)。我可以使用 bot 范围指定对象范围,
但我无法收集构成复合作用域 client
的所有作用域(尤其是 RTM 的作用域)。
最佳答案
客户端范围并未弃用,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"
如果您想访问 RTM API 来构建客户端,请请求客户端范围。如果要使用 RTM API 构建 Slack 应用程序,请使用 bot 作用域。任何一种都足以满足您的需求
关于slack-api - 如何在 Slack OAuth 请求中指定机器人和客户端范围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34608052/