【问题标题】:How to fix missing scope error in Slack (rtm.connect) API?如何修复 Slack (rtm.connect) API 中缺少范围错误?
【发布时间】:2019-06-28 21:30:02
【问题描述】:

当我尝试将 rtm.connect 方法与自己的令牌一起使用时,测试器返回错误的响应。

网址:https://slack.com/api/rtm.connect?token=xoxp-532016xxxxx-53xxxxxx-536743xxxxxx-9211bedc4bfe9ddfexxxxxxxxxxxxxx&pretty=1

{
    "ok": false,
    "error": "missing_scope",
    "needed": "rtm:stream",
    "provided": "identify,incoming-webhook,channels:history,im:history,channels:read,im:read,team:read,users:read,users:read.email,users.profile:read,chat:write:user,files:write:user"
}

我在请求中缺少什么?为什么会出现这个missing_scope 错误?我已经关注了 Slack 文档。

【问题讨论】:

    标签: slack slack-api slack-commands


    【解决方案1】:

    您需要先创建用户机器人。关注此link 并创建一个。

    然后你会在左侧导航栏的Install App下获得Bot User OAuth Access Token

    使用此 Bot 用户 OAuth 访问令牌 进行上述请求。

    【讨论】:

      猜你喜欢
      • 2017-10-18
      • 2022-12-16
      • 2016-09-15
      • 2011-11-26
      • 2021-11-13
      • 1970-01-01
      • 1970-01-01
      • 2020-11-18
      • 1970-01-01
      相关资源
      最近更新 更多