
If successful, this method returns a Permissions resource in the response body. Whether the link is required for this permission. Only populated for permissions that belong to a view. When making a request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. This is used during inserts and is not populated in responses. The email address or domain name for the entity. Only populated for user type permissions for files that are not in a shared drive. Whether the account associated with this permission is a pending owner. The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. The date cannot be more than a year in the future.They can only be set on user and group permissions.They cannot be set on shared drive items.Expiration dates have the following restrictions: The time at which this permission will expire (RFC 3339 date-time). Only commenter is currently allowed, though more may be supported in the future. While new values may be supported in the future, the following are currently allowed:Īdditional roles for this user. In the request body, supply a Permissions resource with the following properties: Property name For more information, see the authentication and authorization page.

Some scopes are restricted and require a security assessment for your app to use them. This request requires authorization with at least one of the following scopes: Scope

Issue the request as a domain administrator if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. Whether the requesting application supports both My Drives and shared drives.ĭeprecated use supportsAllDrives instead. This parameter is ignored and an email is sent if the role is owner. Whether to send notification emails when sharing to users or groups. If set to false, parents are not changed. If set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. Request HTTP request POST fileId/permissions Parameters Parameter nameĪ plain text custom message to include in notification emails.ĭeprecated.

Warning: Concurrent permissions operations on the same file are not supported only the last update is applied. Inserts a permission for a file or shared drive.
