The example code for the Clearing Obsolete Cache Entries with Webhooks article in the Kentico Cloud blog.
The example ASP.NET MVC Core app showcases how webhooks in Kentico Cloud can be used to invalidate content cached in web app's memory cache.
Clone the repo and edit the "KenticoCloudProjectId" and "KenticoCloudWebhookSecret" values in the appsettings.json file. The latter one should be generated in Kentico Cloud > main menu > Webhooks > Create new Webhook. In that dialog, also insert the publicly routable URL address of your app with "/webhook" at its end (e.g. http://example.com/webhook).
You may also wish to deploy the example app to your Azure subscription via the "Deploy to Azure" button below.
Once deployed, you should add the above two settings into your App Service's Application settings.