I am trying to get webhook notification from sharepoint sites by using graph api as instructed in this document.
From here I confirmed that driveItem can also be used for webhook notification. I created a webapplication which can receive notification and then created another console application which can use graph api to create subscription.
I was able to create a successfull subscription, but on doing on any CRUD operation on any sharepoint site i was not able to get any hits/notification in site notification in my webApplication, is there any step i am missing or there is issue with Resource parameter in the below shown request body.
var subscription = new Subscription
{
ChangeType = "updated",
NotificationUrl = "https://176fb499.ngrok.io/SPWebhooksReceiver/api/spwebhook/handlerequest"
Resource = "/drive/root",
ExpirationDateTime = DateTime.UtcNow.AddMinutes(25),
ClientState = "A0A354EC-97D4-4D83-9DDB-144077ADB449"
};