我在这里读了很多关于Slack OAuth流的作用域:
- https://api.slack.com/methods
- https://api.slack.com/scopes
- https://api.slack.com/legacy/oauth-scopes
有些方法被弃用,有些方法应该有效,而另一些方法则无效-没有好的文档或示例。但仍然不知道如果我想的话,我应该为我的应用程序使用哪些范围:
- 为用户做身份验证流
- 创建自己的集成渠道(如Sentry、JIRA、GitHub等(
- 将消息推送到该频道
在所有这些文档之后,我找不到我需要的完整列表,也无法确定它是否有效。
问题:
- 我应该使用哪些作用域
- 我可以像
admin,channels,bot
一样设置它们,还是更具体地设置为channels:join,channels:manage,...
示例:
- 我使用了
channels:write,conversations
,但出现以下错误:
Invalid permissions requested
Invalid scope: channels:write,conversations
- 我使用了
channels:manage
,但它只询问现有频道
您可以尝试使用本教程中的:channels:read,groups:read,channels:manage,chat:write
。
作为回应,您将得到以下信息:chat:write,im:write,channels:read,channels:history,pins:read,reactions:read,users:read,channels:manage,incoming-webhook,groups:read
不确定它们对你来说是否足够,但看起来应该有效。