How to do that? Should I use Google Docs ACL instead and how to configure such ACL?
When you share a file with someone, you can choose their access level: Viewer: People can view, but can't change or share the file with others. Commenter: People can make comments and suggestions, but can't change or share the file with others.
Invite-Based Google Drive Sharing For this reason, other people won't be able to access the document even if they have the link. Only the shared email address can. You can also send invites to Google Groups to quickly share your Google Drive file with a large number of individuals.
you have to set following parameters :
private Permission insertPermission(Drive service, String fileId) throws Exception{
Permission newPermission = new Permission();
newPermission.setType("anyone");
newPermission.setRole("reader");
newPermission.setValue("");
newPermission.setWithLink(true);
return service.permissions().insert(fileId, newPermission).execute();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With