We have changed the authentication several times on our webhook handler (v1), each time deleting and replacing the hook with the same URL. The deleting is done via the Pipedrive UI, the service re-creates the webhook when it starts via the API.
It appears that we are receiving duplicates for each message, the current and then again with each legacy authentication info. The 401s are triggering the throttling and we are losing lots of events.
We’re working around it now so that we are not losing events but it would be nice to return 401s with confidence if a request fails authentication.
Hi @RobLinton
Welcome to the community and thanks for being patient
Does it mean that you are using the same webhook URL but changing the credentials for accessing the webhook URL? I understand that you are updating them via the UI but are there webhook handlers being registered programmatically via the REST API (those don’t show up in the UI and can be only accessed via the respective access token)
This is quite unfortunate. Ideally, you should not be seeing duplication. Can you add further details about the 401s. Is it the case that the same handler is called with previous credentials that are outdated?
Our service would create a hook for itself on launch using the same URL each time but with unique credentials (randomly generated). We would delete the old handler via the UI but everything else happens via the API.
For the 401s… it’s our service that was issuing issue a 401 because it would receive old auth information from deleted webhooks. It would receive these requests in addition to the requests issued for the current webhook.
FWIW, we work around this by returning a 200 for what appear to be historic auth credentials but ignoring the message. Also the service no longer recreates a webhook if it finds an existing webhook with the same URL.