Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google drive disable permission change notification email

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

like image 605
user2682653 Avatar asked Dec 25 '22 22:12

user2682653


1 Answers

SendNotificationEmails is a field, not a method. Use the following instead:

InsertRequest req = service.Permissions.Insert(newPermission, fileId);
req.SendNotificationEmails = true;
req.Fetch();
like image 155
Burcu Dogan Avatar answered Apr 17 '23 08:04

Burcu Dogan