Get all webhooks for an app

Hi,

Is it possible to get all webhooks ID for a given app? I can see that you can have the webhooks for a given user and workspace, but if you did not save this information, you basically have webhooks “in the wild” calling your app that you can’t delete…

Thanks!

For security reasons, our access control will only permit a user to see webhooks they have created themselves, so it is not possible to get all webhooks for an app. However, a webhook can be deleted by responding to it with a 410 Gone status, so the webhook’s ID is not required to delete it.

4 Likes

Excellent info on the 410, thanks!

1 Like

Thanks for jumping in @Joe_Trollo :wink:

+1. Thanx @Joe_Trollo

1 Like

Given that this is my app that created the webhooks and that receives the calls, I would find it understandable to have a say in it and be able to see them :sweat_smile:

+1, some tools to manage webhooks would be helpful, I have a bunch of webhooks created from staging & dev environments that I am trying to clear out. No success when trying to access webhooks from connected resources. It’s looking like I might have to query against the IDS we have saved in multiple databases :pensive:.

This was exactly my point. Lucky I kept the IDs in database! If you don’t do that you may endup with tons of people calling your server that you can’t stop… It does not seem right, are we missing something? :thinking:

An app cannot be permitted to access data in Asana without the approval and authorization of a user, and that user’s authorization can only be permitted to see webhooks created by the same user. If you have all your users’ tokens, you can make repeated calls to GET /webhooks with each of them to obtain a complete list of active webhooks, and then use that information to delete them. If the user has revoked authentication, any webhooks that were created with their credentials are deleted automatically.

2 Likes

that would be a fine answer if get webhooks worked. but it doesn’t. the only fix i found is to delete my asana account. i’m done…

Quite radical fix!

and (jokes on me), the webhooks still keep coming.

looks like they put your account in ‘free’ mode. the warning message says the account will be deleted in august 2021. rofl. i’ll send some notes to support seeing if i can get that stopped before then. they should call them web-hooked.

1 Like

If you can still get access to your “free” account in the UI, then you should be able to delete the app in the developer console and I assume that would stop the march of the webhooks.