Webhook Retrieval

Hi folks,

Have a question on retrieval of web hooks. We are running into an issue with our integration with users with multiple workspaces. Let’s take a user that has 2 workspaces. We are able to retrieve projects from both workspaces and also register hooks for both workspaces. However, when we try to retrieve the hooks for both workspaces (/api/1.0/webhooks?workspace=XXX) we get an access denied message. We are using the same tokens for the creation of the webhook to retrieve the web hook.

So in summary, we can create a hook for a project, but when attempting to retrieve the hook to see if it exists, we get a 403. Any idea why this could be?

Hey the user that creates the webhook is the same with the user request the webhook?

Correct, we are using the same oauth tokens to perform the create and the retrieval. They will likely have been refreshed sine the original create though, not sure if that makes a difference.

I am not able to test it now but you get the webhook requesting the resource and not the workspace?

So the sequence is:

  1. Create a web hook. The creation is successful, and I can confirm it works.
  2. Attempt to retrieve the web hook using /api/1.0/webhooks?workspace=XXX using the appropriate workspace. This returns a 403.

We’re having to change our process now to validate web hooks one at a time for each project. This seems to be working. So /api/1.0/webhooks?workspace=XXX throws a 403, but /api/1.0/webhooks?workspace=XXX&project=YYY returns just fine. And this seems to only be the case for certain workspaces affecting users that have multiple workspaces.

1 Like