GoogleDrive

FREE
By mikilior1
Updated 5 months ago
Storage
-/10
Popularity Score
-
Latency
-
Success Rate

GoogleDrive API Documentation

Read, write, and sync files stored in Google Drive from your mobile and web apps.

View API Details
POSTcopyFile
POSTcreateFileComment
POSTcreateFileFromMetadata
POSTcreateFileFromMultipartData
POSTcreateFileFromUpload
POSTcreateFilePermission
POSTcreateReplyToComment
POSTcreateTeamDrive
POSTdeleteCommentReply
POSTdeleteFile
POSTdeleteFileComment
POSTdeleteFilePermission
POSTdeleteFileRevision
POSTdeleteTeamDrive
POSTemptyTrash
POSTexportFile
POSTgenerateFileIds
POSTgetAccessToken
POSTgetChanges
POSTgetCommentReplies
POSTgetFileComments
POSTgetFilePermissions
POSTgetFileRevisions
POSTgetFileSingleComment
POSTgetFileSinglePermission
POSTgetFileSingleRevision
POSTgetFiles
POSTgetMe
POSTgetSingleFile
POSTgetSingleReply
POSTgetSingleTeamDrive
POSTgetStartPageToken
POSTgetTeamDrives
POSTrefreshToken
POSTrevokeAccessToken
POSTstopWatchingChannelResources
POSTupdateCommentReply
POSTupdateFileComment
POSTupdateFileFromMetadata
POSTupdateFileFromMultipartData
POSTupdateFileFromUpload
POSTupdateFilePermission
POSTupdateFileRevision
POSTupdateTeamDrive
POSTcopyFile

Lists a file's comments.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
fileIdSTRING
REQUIREDThe ID of the file.
accessTokenSTRING
REQUIREDAccess Token. Use getAccessToken to get it
Optional Parameters
appPropertiesARRAY
OPTIONALA collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests.
parentsLIST
OPTIONALThe IDs of the parent folders which contain the file. If not specified as part of a create request, the file will be placed directly in the My Drive folder. Update requests must use the addParents and removeParents parameters to modify the values.
propertiesARRAY
OPTIONALA collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests.
fieldsLIST
OPTIONALList of fields.To display all fields, use `*`. Examples: kind, user, storageQuota, importFormats, exportFormats, maxImportSizes, maxUploadSize, appInstalled, folderColorPalette, teamDriveThemes
supportsTeamDrivesSELECT
OPTIONALWhether the requesting application supports Team Drives. (Default: false)
keepRevisionForeverSELECT
OPTIONALWhether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Drive. (Default: false)
ignoreDefaultVisibilitySELECT
OPTIONALWhether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders. (Default: false)
ocrLanguageSTRING
OPTIONALA language hint for OCR processing during image import (ISO 639-1 code).
contentHintsThumbnailMimeTypeSTRING
OPTIONALThe MIME type of the thumbnail.
mimeTypeSTRING
OPTIONALThe MIME type of the file. Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
nameSTRING
OPTIONALThe name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of Team Drives, My Drive root folder, and Application Data folder the name is constant.
contentHintsThumbnailImageSTRING
OPTIONALThe thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
descriptionSTRING
OPTIONALA short description of the file.
modifiedTimeDATEPICKER
OPTIONALThe last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user.
starredSELECT
OPTIONALWhether the user has starred the file.
viewersCanCopyContentSELECT
OPTIONALWhether users with only reader or commenter permission can copy the file's content. This affects copy, download, and print operations.
writersCanShareSELECT
OPTIONALWhether users with only writer permission can modify the file's permissions. Not populated for Team Drive files.
viewedByMeTimeDATEPICKER
OPTIONALThe last time the file was viewed by the user (RFC 3339 date-time).
Code Snippet
unirest.post("https://GoogleDrivemikilior1V1.p.rapidapi.com/copyFile")
.header("X-RapidAPI-Host", "GoogleDrivemikilior1V1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://GoogleDrivemikilior1V1.p.rapidapi.com/copyFile
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://GoogleDrivemikilior1V1.p.rapidapi.com/copyFile")
.header("X-RapidAPI-Host", "GoogleDrivemikilior1V1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication