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

Files: generateIds

Requires authorization

Generates a set of file IDs which can be provided in insert requests. Try it now.

Request

HTTP request

GET https://www.googleapis.com/drive/v2/files/generateIds

Parameters

Parameter name Value Description
Optional query parameters
maxResults integer Maximum number of IDs to return. Acceptable values are 1 to 1000, inclusive. (Default: 10)
space string The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'.

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.appdata

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#generatedIds",
  "space": string,
  "ids": [
    string
  ]
}
Property name Value Description Notes
kind string This is always drive#generatedIds
space string The type of file that can be created with these IDs.
ids[] list The IDs generated for the requesting user in the specified space.

Try it!

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

Send feedback about...

Drive REST API v2
Drive REST API v2