Sometimes this workaround “fixes” the issue and we receive a flurry of (previously missing) webhooks, though on other occasions, we consistently receive an Asana::Errors::Forbidden
response, which is odd, as nothing has changed in terms of user or project permissions.
After troubleshooting, I’ve figured out that I can “fix” the issue by deleting all registered webhooks and then resending the POST
request to (re)create the webhook on the problematic project. I have a working theory that, sometimes, deleting a webhook via the Asana API leaves something knocking around behind the scenes. The presence of this “partially deleted” webhook then prevents new webhooks from being created. This theory is supported by the fact that, after deleting a webhook for a particular resource (project), we’ll continue to receive webhooks for new events, though if we retrieve the full list of webhooks from your API, the resource (project) doesn’t feature in the list of enabled webhooks.
I’m assuming that, when I interact with the API to create/delete webhooks, I’m adding/deleting records in a webhooks database table and adding/removing subscriptions in an internal system, responsible for sending the webhooks to third parties? Is it possible some of my delete requests update the database but fail to update the internal notification system, leaving things in an inconsistent state?
I hope this makes sense and I’d be grateful to hear your thoughts on this issue.
Thank you!
Dave J