Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

slack-incoming-webhook: How to detect if a slack authorization has been revoked/removed?

Tags:

slack-api

Is there a clean way to detect if the permissions of a slack app have been revoked?

When a team revokes my app and I attempt to send a message I get a 500 response:

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

In some other cases, which I can't reproduce yet, I also get a 404 message.

A clean response would very helpful, as I can't really distinguish between a server failure and revoked token.

like image 922
AyKarsi Avatar asked May 24 '16 11:05

AyKarsi


1 Answers

Response from Slack Support:

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

like image 112
AyKarsi Avatar answered Nov 15 '22 07:11

AyKarsi