Share a Google Drive file with a person or the organization
Changed onCreates a Drive permission for one file using the calling member's Google Workspace account. To share with one person pass type=user plus emailAddress; to share with the entire organization pass type=domain plus the org's Google Workspace domain (e.g. openworklabs.com). Sharing files not created through OpenWork needs the Full Drive access feature enabled by an admin.
Request
- Base URLhttps://api.openworklabs.com
- Auth
- API key in header x-api-key
- or HTTP bearer
Path parameters
Google Drive file id.
Request body
Use type=user to share with one person, or type=domain to share with the entire organization.
Required when type=user; pass the person's email address, for example raghav@openworklabs.com.
Required when type=domain; pass the organization's Google Workspace domain, for example openworklabs.com.
Drive permission role to grant.
Whether Google should email the recipient about the new access.
Response
Google Drive file shared.
Changes
- warning
changed the pattern of the request property
emailAddressfrom^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$to^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ - info
response property
details/items/path/items/list-of-types was narrowed by removing typesnumberfrom media typeapplication/jsonof response400
- warning
- info
added the optional property
messageto the response with the status
- info