provider files GET
/files @utdk/google/drive
/files files.list
Lists the user's files. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the [Search for files & folders](/drive/api/guides/search-files) guide. *Note:* This method returns *all* files by default, including trashed files. If you don't want trashed files to appear in the list, use the `trashed=false` query parameter to remove trashed files from the results.
- $.xgafv query
- V1 error format.
- enum: 1, 2
- access_token query
- OAuth access token.
- string
- alt query
- Data format for response.
- enum: json, media, proto
- callback query
- JSONP
- string
- fields query
- Selector specifying which fields to include in a partial response.
- string
- key query
- API 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.
- string
- oauth_token query
- OAuth 2.0 token for the current user.
- string
- prettyPrint query
- Returns response with indentations and line breaks.
- boolean
- quotaUser query
- Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
- string
- upload_protocol query
- Upload protocol for media (e.g. "raw", "multipart").
- string
- uploadType query
- Legacy upload protocol for media (e.g. "media", "multipart").
- string
- corpora query
- Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency. By default, corpora is set to 'user'. However, this can change depending on the filter set through the 'q' parameter.
- string
- corpus query
- Deprecated: The source of files to list. Use 'corpora' instead.
- enum: domain, user
- driveId query
- ID of the shared drive to search.
- string
- includeItemsFromAllDrives query
- Whether both My Drive and shared drive items should be included in results.
- boolean
- includeLabels query
- A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
- string
- includePermissionsForView query
- Specifies which additional view's permissions to include in the response. Only 'published' is supported.
- string
- includeTeamDriveItems query
- Deprecated: Use `includeItemsFromAllDrives` instead.
- boolean
- orderBy query
- A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but can be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name.
- string
- pageSize query
- The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.
- integer
- pageToken query
- 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.
- string
- q query
- A query for filtering the file results. See the "Search for files & folders" guide for supported syntax.
- string
- spaces query
- A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.
- string
- supportsAllDrives query
- Whether the requesting application supports both My Drives and shared drives.
- boolean
- supportsTeamDrives query
- Deprecated: Use `supportsAllDrives` instead.
- boolean
- teamDriveId query
- Deprecated: Use `driveId` instead.
- string
Try it
Authentication
Configure credentials for Google Drive API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import google_drive from '@utdk/google/drive';
await google_drive.filesList()