gpt4 book ai didi

slack-api - 松弛传入 webhook : How to detect if a slack authorization has been revoked/removed?

转载 作者:行者123 更新时间:2023-12-02 23:12:44 26 4
gpt4 key购买 nike

是否有一种干净的方法来检测 Slack 应用程序的权限是否已被撤销?

当团队撤销我的应用程序并且我尝试发送消息时,我收到 500 响应:

{
"status": "fail",
"statusCode": 500,
"headers": {
"content-type": "text/html",
...
},
"response": "No service"
}

在其他一些我还无法重现的情况下,我也会收到 404 消息。

干净的响应会非常有帮助,因为我无法真正区分服务器故障和撤销的 token 。

最佳答案

Slack 支持的回复:

A "No service" respond indeed means that the hook has been revoked, you can safely delete the webhook URL and prevent any future calls.

关于slack-api - 松弛传入 webhook : How to detect if a slack authorization has been revoked/removed?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37412215/

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