Files: generateIds

Requires authorization

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


HTTP request



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


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


Request body

Do not supply a request body with this method.


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

  "kind": "drive#generatedIds",
  "space": string,
  "ids": [
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