List a file's or shared drive's permissions

GET {{baseUrl}}/files/:fileId/permissions?pageToken={{pageToken}}&key={{key}}&oauth_token={{oauthToken}}

Lists a file's or shared drive's permissions.

Request Params

KeyDatatypeRequiredDescription
includePermissionsForViewstringSpecifies which additional view's permissions to include in the response. Only 'published' is supported.
pageSizestringThe maximum number of permissions to return per page. When not set for files in a shared drive, at most 100 results will be returned. When not set for files that are not in a shared drive, the entire list will be returned.
pageTokenstringThe token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.
supportsAllDrivesstringWhether the requesting application supports both My Drives and shared drives.
supportsTeamDrivesstringDeprecated use supportsAllDrives instead.
useDomainAdminAccessstringIssue 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.
altstringData format for the response.
fieldsstringSelector specifying which fields to include in a partial response.
keystringAPI key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
oauth_tokenstringOAuth 2.0 token for the current user.
prettyPrintstringReturns response with indentations and line breaks.
quotaUserstringAn opaque string that represents a user for quota purposes. Must not exceed 40 characters.
userIpstringDeprecated. Please use quotaUser instead.

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{"kind":"drive#permissionList","nextPageToken":"\u003cstring\u003e","permissions":[{"allowFileDiscovery":"\u003cboolean\u003e","deleted":"\u003cboolean\u003e","displayName":"\u003cstring\u003e","domain":"\u003cstring\u003e","emailAddress":"\u003cstring\u003e","expirationTime":"\u003cdateTime\u003e","id":"\u003cstring\u003e","kind":"drive#permission","pendingOwner":"\u003cboolean\u003e","permissionDetails":[{"inherited":"\u003cboolean\u003e","inheritedFrom":"\u003cstring\u003e","permissionType":"\u003cstring\u003e","role":"\u003cstring\u003e"},{"inherited":"\u003cboolean\u003e","inheritedFrom":"\u003cstring\u003e","permissionType":"\u003cstring\u003e","role":"\u003cstring\u003e"}],"photoLink":"\u003cstring\u003e","role":"\u003cstring\u003e","teamDrivePermissionDetails":[{"inherited":"\u003cboolean\u003e","inheritedFrom":"\u003cstring\u003e","role":"\u003cstring\u003e","teamDrivePermissionType":"\u003cstring\u003e"},{"inherited":"\u003cboolean\u003e","inheritedFrom":"\u003cstring\u003e","role":"\u003cstring\u003e","teamDrivePermissionType":"\u003cstring\u003e"}],"type":"\u003cstring\u003e","view":"\u003cstring\u003e"},{"allowFileDiscovery":"\u003cboolean\u003e","deleted":"\u003cboolean\u003e","displayName":"\u003cstring\u003e","domain":"\u003cstring\u003e","emailAddress":"\u003cstring\u003e","expirationTime":"\u003cdateTime\u003e","id":"\u003cstring\u003e","kind":"drive#permission","pendingOwner":"\u003cboolean\u003e","permissionDetails":[{"inherited":"\u003cboolean\u003e","inheritedFrom":"\u003cstring\u003e","permissionType":"\u003cstring\u003e","role":"\u003cstring\u003e"},{"inherited":"\u003cboolean\u003e","inheritedFrom":"\u003cstring\u003e","permissionType":"\u003cstring\u003e","role":"\u003cstring\u003e"}],"photoLink":"\u003cstring\u003e","role":"\u003cstring\u003e","teamDrivePermissionDetails":[{"inherited":"\u003cboolean\u003e","inheritedFrom":"\u003cstring\u003e","role":"\u003cstring\u003e","teamDrivePermissionType":"\u003cstring\u003e"},{"inherited":"\u003cboolean\u003e","inheritedFrom":"\u003cstring\u003e","role":"\u003cstring\u003e","teamDrivePermissionType":"\u003cstring\u003e"}],"type":"\u003cstring\u003e","view":"\u003cstring\u003e"}]}