AyKarsi
AyKarsi

Reputation: 9675

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

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.

Upvotes: 6

Views: 3337

Answers (1)

AyKarsi
AyKarsi

Reputation: 9675

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.

Upvotes: 9

Related Questions