使用Google Drive API获取Google Doc上的评论:评论所有者的EmalAddress返回null



我有以下代码来获取给定Google文档的注释。对于Fields,我提供了*值来检索所有信息。我可以正确地检索Author.DisplayName的值,但Author.EmailAddress始终是null。我想知道这是不是正常的行为。我该如何缓解这种情况?

public IList<Comment> RetrieveComments(string fileId)
{
var _driveService = GetDriveServiceInstance();
try
{
CommentsResource.ListRequest commentRequest = _driveService.Comments.List(fileId);
commentRequest.Fields = "*";
CommentList comments = commentRequest.Execute();
return comments.Comments;
}
catch (Exception e)
{
Console.WriteLine("An error occurred: " + e.Message);
}
return null;
}

Comments未填充字段EmailAddress

作者

嵌套对象

评论的作者。不会填充作者的电子邮件地址和权限ID。

最新更新