slack-api - 如何在 Slack OAuth 请求中指定机器人和客户端范围

标签 slack-api slack

当我同时使用 clientbot 作用域时,出现以下错误。

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/

相关文章:

jira - 松弛 channel 上将 Jira 票证移动到自定义列的通知

slack-api - 只有我能看到自定义斜杠命令的输出

python - 自定义 Slack 机器人未以用户身份发布

node.js - Slack 机器人安装以包含自定义表情符号?

slack - 为什么我的 Slack 机器人名称不接受更新?

passport.js - Passportjs Slack - 范围错误

用于查找现有 channel 的 slack api

Slack 机器人无法将消息发送到带有 - 或 "channel-name"之类的空格的 channel

slack - 无法获取 Slack App 发布的消息的时间戳

javascript - 使用 axios 上传图片到 Slack