i want to disable the notification email in my C# application if permissions get changed. i found a property of service.permissions.insert called SendNotificationEmails but i dont know how to use it. i tried Avoid mail notification on update drive permission
my code: return service.Permissions.Insert(newPermission,fileId).SendNotificationEmails(Boolean.TrueString).execute();
but i get an error: "non-invocable member 'Google.Apis.Drive.v2.PermissionsResource.InsertRequest.SendNotificationEmails' cannot be used like a method"
thanks! markus
SendNotificationEmails
is a field, not a method. Use the following instead:
InsertRequest req = service.Permissions.Insert(newPermission, fileId);
req.SendNotificationEmails = true;
req.Fetch();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With