The photos space will sunset in early January 2018. Your users can continue to access Google Photos via the drive space by enabling the Google Photos folder in My Drive in the Drive client settings

Permissions: list

Requires authorization

Lists a file's or Team Drive's permissions. Try it now.

Request

HTTP request

GET https://www.googleapis.com/drive/v3/files/fileId/permissions

Parameters

Parameter name Value Description
Path parameters
fileId string The ID of the file or Team Drive.
Optional query parameters
pageSize integer The maximum number of permissions to return per page. When not set for files in a Team Drive, at most 100 results will be returned. When not set for files that are not in a Team Drive, the entire list will be returned. Acceptable values are 1 to 100, inclusive.
pageToken string The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.
supportsTeamDrives boolean Whether the requesting application supports Team Drives. (Default: false)
useDomainAdminAccess boolean Whether the request should be treated as if it was issued by a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the item belongs. (Default: false)

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/drive.metadata.readonly
https://www.googleapis.com/auth/drive.metadata
https://www.googleapis.com/auth/drive.photos.readonly

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "drive#permissionList",
  "nextPageToken": string,
  "permissions": [
    permissions Resource
  ]
}
Property name Value Description Notes
kind string Identifies what kind of resource this is. Value: the fixed string "drive#permissionList".
permissions[] list The list of permissions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
nextPageToken string The page token for the next page of permissions. This field will be absent if the end of the permissions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

发送以下问题的反馈:

此网页
Drive REST API
Drive REST API