Get all webhooks for an app


#1

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!


#2

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.


#3

Excellent info on the 410, thanks!


#4

Thanks for jumping in @Joe_Trollo :wink:


#5

+1. Thanx @Joe_Trollo


#6

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:


#8

+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:.


#9

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:


#10

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.