Reputation: 3474
I am using Google Drive Java API. I need to copy a file from one Google domain to another, so my approach is the following:
Everything works as expected except that I don't want the destination owner to receive the Google Drive email notifying him about the shared file. When the file is shared via the Web GUI one can disable the notification email so I guess this is also possible via the API, the question is how ^^ Anyone?
PS: I am open to new 'less tedious' methods to create a copy of a file from one domain to another if that is possible.
Upvotes: 8
Views: 7340
Reputation: 75
In the Google Drive API V3 with permissions.create() it has changed to singular: sendNotificationEmail=false
In a POST request it would be like this:
https://www.googleapis.com/drive/v3/files/*FILEID*/permissions?sendNotificationEmail=false
Upvotes: 6
Reputation: 13528
On step 2, when sharing the file with the new user, you'll be using the permissions.insert() API call. You'll want to specify the sendNotificationEmails=false
parameter along with this call to suppress the email notification.
Upvotes: 10