according to the Google Drive SDK Update sharing permissions and https://developers.google.com/drive/v2/reference/permissions I want to change the whole folder content to be available for viewing (the folder contains only images and I show them on my page with <img alt='' src='https://drive.google.com/uc?export=view&id="fileID"'/>
)
so, I'm trying to use that code
PermissionList permissions = Google_DriveService.Permissions.List(fileId).Fetch();
var filePermissions = permissions.Items;
Permission permission = Google_DriveService.Permissions.Get(fileId, filePermissions[0].Id).Fetch();
permission.Role = "reader";
permission.Value = "me";
permission.Type = "anyone";
permission.WithLink = true;
var updated = Google_DriveService.Permissions.Update(permission, fileId, filePermissions[0].Id).Fetch();
but I get the error message
Google.Apis.Requests.RequestError Invalid permission type specified [400] Errors [ Message[Invalid permission type specified] Location[ - ] Reason[invalid] Domain[global] ]
what am I doing wrong ?