1

云端硬盘权限的每次更改都会发送一封通知邮件。有没有办法避免这种情况?

提前非常感谢, Ridgh

4

4 回答 4

3

Whenever you insert a new permission with the Drive API, you can set the sendNotificationEmails optional parameter to false to avoid sending that email:

https://developers.google.com/drive/v2/reference/permissions/insert

于 2012-09-18T09:08:02.957 回答
1

以下是在 Java 中有效的方法:

service.permissions().insert(fileId, newPermission).setSendNotificationEmails(false).execute();
于 2013-06-18T04:01:39.367 回答
1

在 c# (api v3) 上,您必须在创建请求后将 SendNotificationEmail 设置为 false;

var req = _driveService.Permissions.Create(
                        new Permission
                        {
                            Role = "reader",
                            Type = "user",
                            EmailAddress = readerEmail
                        }, document.DocumentId);
                    req.SendNotificationEmail = false;
                    req.Execute();
于 2019-07-30T13:50:03.707 回答
1

PHP语言的解决方案:

$this->service->permissions->create($folder->id, $userPermission, array('fields' => 'id', 'sendNotificationEmail' => false));
于 2017-09-13T17:37:54.587 回答