Questions tagged [google-drive-api]

Questions related to integration with Google's cloud storage service or interacting with Google Drive files programmatically, via the Google Drive API, Google Drive SDK, or Google Apps Script. Usage questions about the web application should be posted at Web Applications Stack Exchange.

Google Drive is a cloud-based application and service for creating and managing cloud storage and files. The service supports an internal API for Google Apps Script as well as an External API.

Usage questions about the web application should be posted at Web Applications Stack Exchange instead of here.

Note: Google has used the brand "Google Drive" to encompass a suite of products, but since conforming to that would introduce ambiguity here, the tag is specifically for the cloud storage service while refers to the suite.

Note: Google Drive will soon be renamed to Google One.

Important URLs for the Google Drive SDK

Breaking changes:

Unofficial support channels

14746 questions
24
votes
4 answers

Google Sheets API: Create or move Spreadsheet into Folder

Is it possible to create a Spreadsheet in a specified Folder or do I have to use the Drive API to move it afterwards?
Hans Bickhofe
  • 343
  • 1
  • 2
  • 5
24
votes
9 answers

Google Sheets API v4 - How to get the last row with value?

How to get the last row with value in the new Google Sheets API v4 ? i use this to get a range from a sheet: mService.spreadsheets().values().get("ID_SHEET", "Sheet1!A2:B50").execute(); how to detect the last row with value in the sheet ?
seba123neo
  • 4,688
  • 10
  • 35
  • 53
24
votes
2 answers

Google drive API download files - python - no files downloaded

I have tried a number of ways to download files from google drive via oauth and the API, however I am not able to get the files downloaded. I believe I have properly authenticated. After running my code, it looks like there was success with…
user1253952
  • 1,577
  • 8
  • 22
  • 34
24
votes
7 answers

How to delete a File in Google Drive?

How do I write a Google Apps Script that deletes files? This finds files: var ExistingFiles = DocsList.find(fileName); But DocsList.deleteFile does not exist to delete a file. Is there a way to move those files to another Folder or to Trash? The…
user1962847
  • 241
  • 1
  • 2
  • 3
24
votes
1 answer

Upload Files To Google Drive Using ColdFusion

*NEW UPDATED FOR BETTER SECOND PART - NOW GETS TO "308 Resume Incomplete", even though file should be just one upload! I am using the foundation of cfgoogle from Ray Camden. But Google has deprecated the code for document uploads. The new standard…
Canadaboy
23
votes
2 answers

How to Refresh Google AccessToken in Firebase? #AskFirebase

I am attempting to build a web app that will be integrated with and installed into Google Drive. The user will be able to create and share my app's files in their drive. I am trying to write it using Firebase so I can leverage many of the great new…
23
votes
3 answers

Permanent links to thumbnails in Google Drive API

I'm using Google Drive API (PHP) to upload some photos to my Drive. When a file is uploaded, a Google_DriveFile object is returned in the response to confirm the successful transfer. It includes a field called thumbnailLink, accessible through the…
PiotrK
  • 1,502
  • 1
  • 15
  • 33
23
votes
6 answers

Google push notifications - Unauthorized WebHook callback channel

I'm facing problem with Google push notifications (for drive). I use service account which works perfectly for all other drive operations except drive changes watch. Below is application code which now fails with "Unauthorized WebHook callback…
23
votes
3 answers

Can I use Google drive for chrome extensions (not App)

I have a chrome extension (not App),Its a mashup of data from free third parties. I don't maintain a server for my extension. Can i use Google drive to save user's data using users account, so it can be shared by different computers?
surya
  • 1,351
  • 1
  • 13
  • 29
22
votes
10 answers

Google colab and google drive: Copy file from colab to Google Drive

There seem to be lots of ways to access a file on Google Drive from Colab but no simple way to save a file from Google Colab back to Google Drive. For example, to access a Google Drive file from Colab, you can mount the Google Drive using from…
zztop
  • 701
  • 1
  • 7
  • 20
22
votes
2 answers

How To Embed Google Drive Document (PDF) In Blogger Post?

I want to embed a pdf document from Google Drive in my Blogger Post.
Nahoor
  • 271
  • 1
  • 2
  • 12
22
votes
2 answers

GoogleUser.getAuthResponse() doesn't contain access_token

UPDATE2: I revisited this issue and have solved the problem by carefully following the doco linked below. But first, for those who are struggling with this, you are in good company. There are so many versions of the doco from Google it is confusing!…
Simon Hutchison
  • 2,949
  • 1
  • 33
  • 32
22
votes
4 answers

Is it possible to 'unload' ('un-require') a Ruby library?

I'm looking to load a few libraries, have them do some work, and then do the opposite of require to avoid compatibility errors later. I don't want to have to dump to a file and restart a shell, as the objects created (such as data) could be…
Louis Maddox
  • 5,226
  • 5
  • 36
  • 66
22
votes
1 answer

Follow redirect (302) in XMLHttpRequest

Using Firefox I am trying to download some data from Google Drive using XMLHttpRequest. In the debug console it gives me [302 Moved Temporarily] and the data i receive is empty. How can i get XMLHttpRequest to follow a redirect response? Also I am…
PureGero
  • 937
  • 2
  • 8
  • 16
22
votes
4 answers

Is it possible to be able to correctly select any available Google account to use when using authorisation via the JS client library for Drive?

I've got an existing Google Drive enabled application that's using the Google Java client library and server flow auth. If you're not logged into the application and navigate to the URL AND you have logged into more than one google account on that…