gpt4 book ai didi

slack-api - 是否无法再使用聊天 :write:bot scope for Slack apps

转载 作者:行者123 更新时间:2023-12-02 19:45:27 27 4
gpt4 key购买 nike

我希望我的应用使用 icon_emojiusername 参数将 chat.postMessage 发送到 Slack,以便我有时可以更改图标和显示名称。

来自the doc该方法,看来我必须将 as_user 设置为 false。但是当我这样做时,我收到了 Missing_scope 错误:我需要范围 chat:write:bot。 (无论我使用 OAuth 访问 token 还是 OAuth 机器人用户访问 token ,都会出现相同的错误)

但是来自this page我知道他们要消失了?那么我想使用的参数(icon_emoji 和用户名)也会消失吗?

最佳答案

不可以,自 2019 年 12 月 19 日起,您不能使用 icon_emoji


我遇到了同样的问题,因此我向 Slack 开了一张支持票。经过几条来回消息后,我确认这可能是一个错误:

With your help I was able to replicate the issue. I suspect this is a bug but I've escalated it to the Granular Bot Token team for a second opinion. As soon as I have more details I will let you know.

编辑:

我收到了另一条更新,我已将其精简为要点:

When building the Granular Bot Token model our team really wanted to use this as an opportunity to slowly deprecate certain API behaviour. The as_user parameter is one of them. See the following comment from (https://api.slack.com/authentication/quickstart).

One effect worth noting: chat.postMessage and other chat.* methods no longer mess around with the as_user parameter. You're granted a single chat:write scope (no :user or :bot is appended). If you call the chat.postMessage method with your bot token, you post as the bot. If you've obtained a user token through the new install flow, and you call the method with your user token, you post as the user.

因此,对于您想要采取的操作,恐怕用 Granular Bot Token 是不可能的。我们还认识到,所引发的错误对开发人员来说完全没有帮助且令人困惑。为此,我们创建了一个错误来修复 Granular Bot token 尝试进行受限 API 调用时返回的错误。

我已要求澄清这是否只是 as_user已弃用的部分,或 icon_emoji也是一部分。

编辑 2(美国东部时间 2019 年 12 月 19 日 13:38):

一个,可能是最终的更新:

The option for app to change information such as username, avatar and icon via the API is up for debate as well. Currently with Granular Bot Tokens you can only update that information via your API management page.

这实在是太不幸了。

关于slack-api - 是否无法再使用聊天 :write:bot scope for Slack apps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59370449/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com