Stay organized with collections
Save and categorize content based on your preferences.
Access
An enum representing classes of users who can access a file or folder, besides any individual
users who have been explicitly given access. These properties can be accessed from DriveApp.Access.
To call an enum, you call its parent class, name, and property. For example,
DriveApp.Access.ANYONE.
Anyone on the Internet can find and access. No sign-in required.
Domain administrators can prohibit this setting for users of a Google Workspace domain. If
the setting is disabled, passing this value to File.setSharing(accessType, permissionType) throws an exception.
ANYONE_WITH_LINK
Enum
Anyone who has the link can access. No sign-in required.
Domain administrators can prohibit this setting for users of a Google Workspace domain. If
the setting is disabled, passing this value to File.setSharing(accessType, permissionType) throws an exception.
DOMAIN
Enum
People in your domain can find and access. Sign-in required.
This setting is available only for users of a Google Workspace domain. For other types of
Google accounts, passing this value to File.setSharing(accessType, permissionType) throws
an exception.
DOMAIN_WITH_LINK
Enum
People in your domain who have the link can access. Sign-in required.
This setting is available only for users of a Google Workspace domain. For other types of
Google accounts, passing this value to File.setSharing(accessType, permissionType) throws
an exception.
PRIVATE
Enum
Only people explicitly granted permission can access. Sign-in required.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-09-28 UTC."],[[["`DriveApp.Access` is an enum used to define user access levels for files and folders in Google Drive, beyond individual permissions."],["You can set file or folder sharing permissions using methods like `setSharing()` along with the `DriveApp.Access` and `DriveApp.Permission` enums."],["Several access levels are available: `ANYONE`, `ANYONE_WITH_LINK`, `DOMAIN`, `DOMAIN_WITH_LINK`, and `PRIVATE`, each controlling who can access the content."],["Domain administrators in Google Workspace can restrict the use of `ANYONE` and `ANYONE_WITH_LINK` sharing options for their users."]]],[]]