Recently, I was working on setting up a webhook using the Sitecore Experience Edge Admin API for a cache revalidation scenario. The goal was straightforward: whenever content is updated in Sitecore, trigger a webhook that tells the frontend application to clear or revalidate cached pages.
The implementation itself is well documented by Sitecore, but I ran into an authentication issue that was not immediately obvious. Every request to create the webhook returned a 401 Unauthorized response with the message:
After troubleshooting, I discovered the issue was related to the type of OAuth credentials I had created in the Sitecore Deploy app.
If you run into the same problem, this post may save you some time.
