Files: get

Gets a file's metadata or content by ID. Try it now.

Request

HTTP request

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

Parameters

Parameter name Value Description
Path parameters
fileId string The ID of the file.
Optional query parameters
acknowledgeAbuse boolean Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media. (Default: false)
fields string The paths of the fields you want included in the response. If not specified, the response includes a default set of fields specific to this method. For development you can use the special value * to return all fields, but you'll achieve greater performance by only selecting the fields you need. For more information see the partial responses documentation.
supportsAllDrives boolean Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives. (Default: false)
supportsTeamDrives boolean Deprecated use supportsAllDrives instead. (Default: false)

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a Files resource in the response body.

Try it!

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

Send feedback about...

Drive REST API
Drive REST API
Need help? Visit our support page.