是否有一种干净的方法来检测 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/