Cloud Storage & File Sharing — entry 008 of 18
Google Drive
Google Drive's API lets applications create, read, update, and share files and folders stored in a user's Drive, with fine-grained OAuth scopes for personal or Workspace accounts. A live GET against the real gateway, www.googleapis.com/drive/v3/files, returned a 403 without a token, reconfirming OAuth 2.0 auth over HTTPS, and a follow-up OPTIONS preflight echoed the request Origin in Access-Control-Allow-Origin, resolving cors from unknown to yes. The url was updated to Google's current Workspace documentation hub, which the old /drive/ path now permanently redirects to. Personal accounts get 15GB free, with paid Google One and Workspace plans raising the storage cap.
GreatAPIs Score
Auth quickstart
- Register an app / run the OAuth flow to obtain a bearer token.
- Send it as an Authorization header
Authorization: Bearer <token>
Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.
Endpoints
about1
GET/about
| Status | Description | Schema |
|---|---|---|
200 | Successful response | About |
changes3
GET/changes
| Name | In | Required | Type |
|---|---|---|---|
pageToken | query | yes | string |
driveId | query | no | string |
includeCorpusRemovals | query | no | boolean |
includeItemsFromAllDrives | query | no | boolean |
includeLabels | query | no | string |
includePermissionsForView | query | no | string |
includeRemoved | query | no | boolean |
includeTeamDriveItems | query | no | boolean |
pageSize | query | no | integer |
restrictToMyDrive | query | no | boolean |
spaces | query | no | string |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
teamDriveId | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | ChangeList |
GET/changes/startPageToken
| Name | In | Required | Type |
|---|---|---|---|
driveId | query | no | string |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
teamDriveId | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | StartPageToken |
POST/changes/watch
| Name | In | Required | Type |
|---|---|---|---|
pageToken | query | yes | string |
driveId | query | no | string |
includeCorpusRemovals | query | no | boolean |
includeItemsFromAllDrives | query | no | boolean |
includeLabels | query | no | string |
includePermissionsForView | query | no | string |
includeRemoved | query | no | boolean |
includeTeamDriveItems | query | no | boolean |
pageSize | query | no | integer |
restrictToMyDrive | query | no | boolean |
spaces | query | no | string |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
teamDriveId | query | no | string |
application/json — Channel
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Channel |
channels1
POST/channels/stop
application/json — Channel
| Status | Description | Schema |
|---|---|---|
200 | Successful response | — |
comments5
GET/files/{fileId}/comments
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
includeDeleted | query | no | boolean |
pageSize | query | no | integer |
pageToken | query | no | string |
startModifiedTime | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | CommentList |
POST/files/{fileId}/comments
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
application/json — Comment
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Comment |
GET/files/{fileId}/comments/{commentId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
commentId | path | yes | string |
includeDeleted | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Comment |
PATCH/files/{fileId}/comments/{commentId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
commentId | path | yes | string |
application/json — Comment
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Comment |
DELETE/files/{fileId}/comments/{commentId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
commentId | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | — |
drives7
GET/drives
| Name | In | Required | Type |
|---|---|---|---|
pageSize | query | no | integer |
pageToken | query | no | string |
q | query | no | string |
useDomainAdminAccess | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | DriveList |
POST/drives
| Name | In | Required | Type |
|---|---|---|---|
requestId | query | yes | string |
application/json — Drive
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Drive |
GET/drives/{driveId}
| Name | In | Required | Type |
|---|---|---|---|
driveId | path | yes | string |
useDomainAdminAccess | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Drive |
PATCH/drives/{driveId}
| Name | In | Required | Type |
|---|---|---|---|
driveId | path | yes | string |
useDomainAdminAccess | query | no | boolean |
application/json — Drive
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Drive |
DELETE/drives/{driveId}
| Name | In | Required | Type |
|---|---|---|---|
driveId | path | yes | string |
allowItemDeletion | query | no | boolean |
useDomainAdminAccess | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | — |
POST/drives/{driveId}/hide
| Name | In | Required | Type |
|---|---|---|---|
driveId | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Drive |
POST/drives/{driveId}/unhide
| Name | In | Required | Type |
|---|---|---|---|
driveId | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Drive |
files12
GET/files
| Name | In | Required | Type |
|---|---|---|---|
corpora | query | no | string |
corpus | query | no | string |
driveId | query | no | string |
includeItemsFromAllDrives | query | no | boolean |
includeLabels | query | no | string |
includePermissionsForView | query | no | string |
includeTeamDriveItems | query | no | boolean |
orderBy | query | no | string |
pageSize | query | no | integer |
pageToken | query | no | string |
q | query | no | string |
spaces | query | no | string |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
teamDriveId | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | FileList |
POST/files
| Name | In | Required | Type |
|---|---|---|---|
enforceSingleParent | query | no | boolean |
ignoreDefaultVisibility | query | no | boolean |
includeLabels | query | no | string |
includePermissionsForView | query | no | string |
keepRevisionForever | query | no | boolean |
ocrLanguage | query | no | string |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
useContentAsIndexableText | query | no | boolean |
application/octet-stream — File
| Status | Description | Schema |
|---|---|---|
200 | Successful response | File |
GET/files/generateIds
| Name | In | Required | Type |
|---|---|---|---|
count | query | no | integer |
space | query | no | string |
type | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | GeneratedIds |
DELETE/files/trash
| Name | In | Required | Type |
|---|---|---|---|
driveId | query | no | string |
enforceSingleParent | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | — |
GET/files/{fileId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
acknowledgeAbuse | query | no | boolean |
includeLabels | query | no | string |
includePermissionsForView | query | no | string |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | File |
PATCH/files/{fileId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
addParents | query | no | string |
enforceSingleParent | query | no | boolean |
includeLabels | query | no | string |
includePermissionsForView | query | no | string |
keepRevisionForever | query | no | boolean |
ocrLanguage | query | no | string |
removeParents | query | no | string |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
useContentAsIndexableText | query | no | boolean |
application/octet-stream — File
| Status | Description | Schema |
|---|---|---|
200 | Successful response | File |
DELETE/files/{fileId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
enforceSingleParent | query | no | boolean |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | — |
POST/files/{fileId}/copy
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
enforceSingleParent | query | no | boolean |
ignoreDefaultVisibility | query | no | boolean |
includeLabels | query | no | string |
includePermissionsForView | query | no | string |
keepRevisionForever | query | no | boolean |
ocrLanguage | query | no | string |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
application/json — File
| Status | Description | Schema |
|---|---|---|
200 | Successful response | File |
GET/files/{fileId}/export
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
mimeType | query | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | — |
GET/files/{fileId}/listLabels
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
maxResults | query | no | integer |
pageToken | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | LabelList |
POST/files/{fileId}/modifyLabels
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
application/json — ModifyLabelsRequest
| Status | Description | Schema |
|---|---|---|
200 | Successful response | ModifyLabelsResponse |
POST/files/{fileId}/watch
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
acknowledgeAbuse | query | no | boolean |
includeLabels | query | no | string |
includePermissionsForView | query | no | string |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
application/json — Channel
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Channel |
permissions5
GET/files/{fileId}/permissions
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
includePermissionsForView | query | no | string |
pageSize | query | no | integer |
pageToken | query | no | string |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
useDomainAdminAccess | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | PermissionList |
POST/files/{fileId}/permissions
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
emailMessage | query | no | string |
enforceSingleParent | query | no | boolean |
moveToNewOwnersRoot | query | no | boolean |
sendNotificationEmail | query | no | boolean |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
transferOwnership | query | no | boolean |
useDomainAdminAccess | query | no | boolean |
application/json — Permission
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Permission |
GET/files/{fileId}/permissions/{permissionId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
permissionId | path | yes | string |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
useDomainAdminAccess | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Permission |
PATCH/files/{fileId}/permissions/{permissionId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
permissionId | path | yes | string |
removeExpiration | query | no | boolean |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
transferOwnership | query | no | boolean |
useDomainAdminAccess | query | no | boolean |
application/json — Permission
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Permission |
DELETE/files/{fileId}/permissions/{permissionId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
permissionId | path | yes | string |
supportsAllDrives | query | no | boolean |
supportsTeamDrives | query | no | boolean |
useDomainAdminAccess | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | — |
replies5
GET/files/{fileId}/comments/{commentId}/replies
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
commentId | path | yes | string |
includeDeleted | query | no | boolean |
pageSize | query | no | integer |
pageToken | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | ReplyList |
POST/files/{fileId}/comments/{commentId}/replies
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
commentId | path | yes | string |
application/json — Reply
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Reply |
GET/files/{fileId}/comments/{commentId}/replies/{replyId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
commentId | path | yes | string |
replyId | path | yes | string |
includeDeleted | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Reply |
PATCH/files/{fileId}/comments/{commentId}/replies/{replyId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
commentId | path | yes | string |
replyId | path | yes | string |
application/json — Reply
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Reply |
DELETE/files/{fileId}/comments/{commentId}/replies/{replyId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
commentId | path | yes | string |
replyId | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | — |
revisions4
GET/files/{fileId}/revisions
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
pageSize | query | no | integer |
pageToken | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | RevisionList |
GET/files/{fileId}/revisions/{revisionId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
revisionId | path | yes | string |
acknowledgeAbuse | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Revision |
PATCH/files/{fileId}/revisions/{revisionId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
revisionId | path | yes | string |
application/json — Revision
| Status | Description | Schema |
|---|---|---|
200 | Successful response | Revision |
DELETE/files/{fileId}/revisions/{revisionId}
| Name | In | Required | Type |
|---|---|---|---|
fileId | path | yes | string |
revisionId | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | — |
teamdrives5
GET/teamdrives
| Name | In | Required | Type |
|---|---|---|---|
pageSize | query | no | integer |
pageToken | query | no | string |
q | query | no | string |
useDomainAdminAccess | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | TeamDriveList |
POST/teamdrives
| Name | In | Required | Type |
|---|---|---|---|
requestId | query | yes | string |
application/json — TeamDrive
| Status | Description | Schema |
|---|---|---|
200 | Successful response | TeamDrive |
GET/teamdrives/{teamDriveId}
| Name | In | Required | Type |
|---|---|---|---|
teamDriveId | path | yes | string |
useDomainAdminAccess | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | TeamDrive |
PATCH/teamdrives/{teamDriveId}
| Name | In | Required | Type |
|---|---|---|---|
teamDriveId | path | yes | string |
useDomainAdminAccess | query | no | boolean |
application/json — TeamDrive
| Status | Description | Schema |
|---|---|---|
200 | Successful response | TeamDrive |
DELETE/teamdrives/{teamDriveId}
| Name | In | Required | Type |
|---|---|---|---|
teamDriveId | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Successful response | — |
Try it
Developer reference
https://www.googleapis.com/drive/v3Google's Drive API usage-limits docs (developers.google.com/workspace/drive/api/guides/limits) publish a quota-unit system rather than a flat request count: a default of 1,000,000 quota units/minute/project and 325,000 quota units/minute/user, with per-method costs of 5 units for a read (e.g. files.get), 100 units for a list, 200 units for a download, and 50 units for an edit -- so a simple files.get call costs far less against the ceiling than a files.list or download. There's also a 400,000,000 quota-units/day billing threshold and a 750GB/day upload cap for Workspace users.
- GET/files
- GET/files/{fileId}
- POST/files
- POST/files/{fileId}/permissions
- GET/changes