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
50
votes
2 answers

Google Drive API, Oauth and service account

I've some issues with Google Drive API, service account and authentication. I read a lot, but I cannot figure out how to solve this. Context: I have some files on my Drive account (about 35GB) and a simple web app which let users to log in, see some…
user6208310
48
votes
2 answers

Is it possible to send HTTP request from inside Google docs?

I want to send an HTTP request to some REST service from Google drive spreadsheet. Is this possible?
Muhammad Hewedy
  • 29,102
  • 44
  • 127
  • 219
46
votes
2 answers

Error: invalid_client no registered origin

I have installed the Google Drive Realtime API sample files on my web server, following these instructions, including generating a client_id in the Cloud Console and inserting it into the index.html file. When I visit that page and click the button…
45
votes
11 answers

Script runtime execution time limit

My Google Apps Script is iterating through the user's Google Drive files and copying and sometimes moving files to other folders. The script is always stopped after certain minutes with no error message in the log. EDITOR's NOTE: The time limit…
45
votes
4 answers

What are the Google Apps MIME Types in Google Docs and Google Drive?

What are the MIME types for each of the following file extensions: gdoc gslide gsheet gdraw
Edd
  • 8,402
  • 14
  • 47
  • 73
44
votes
2 answers

Authorization of Google Drive using JavaScript

I'm trying to authorize my application to integrate with Google Drive. Google documentation provides details for server based authorization and code samples for various server technologies. There's also a JavaScript Google API library, that has…
Frodo Baggins
  • 8,290
  • 6
  • 45
  • 55
43
votes
7 answers

How to get the file ID so I can perform a download of a file from Google Drive API on Android?

I am working on an Android project and I am trying to make use of the Google Drive API and I've got most of it working but I am having an issue in how I perform a download. I can't find anywhere how I get the file ID so that I can perform the…
Boardy
  • 35,417
  • 104
  • 256
  • 447
43
votes
5 answers

How do I read a Google Drive Spreadsheet in PHP?

All I'm trying to do is read a Google Spreadsheet from a web site. I've read and re-read the Google Drive API docs and everything Google Drive PHP on Stack Overflow and I still can't get to the end zone. Here's what I've done : Been to the Google…
Kiser
  • 459
  • 1
  • 5
  • 4
43
votes
5 answers

How do I add/create/insert files to Google Drive through the API?

Need help regarding inserting a file to google drive through api. The api documentation for this purpose does not clearly explains how to send the actual body of the file through http post request.
Niranja
  • 1,451
  • 2
  • 18
  • 19
42
votes
5 answers

How do I search sub-folders and sub-sub-folders in Google Drive?

This is a commonly asked question. The scenario is:- folderA____ folderA1____folderA1a \____folderA2____folderA2a \___folderA2b ... and the question is how do I list all the files in all of the folders under the root…
pinoyyid
  • 21,499
  • 14
  • 64
  • 115
42
votes
1 answer

Creating anchored comments programmatically in Google Docs

I have been unable to programmatically create a comment that is anchored to specific text in a Google Doc using an app script with the document. Google documentation about how to create an anchored comment using the Google Drive…
41
votes
6 answers

Error: invalid_request device_id and device_name are required for private IP

I was doing my development with Google Drive API using [localhost:8080]. Suddenly I felt to test it in my local deployment sandbox and it has IP address as [192.168.1.1:8080]. And as per that I changed the credential in developer console client…
phenomenon.aurora
  • 471
  • 1
  • 5
  • 11
40
votes
3 answers

Add Image to GitHub Readme.md from Google Drive

I have the image in Drive, How could it be added to the Readme.md so as to display the image in readme. I had tried with the shared link, but it isn't working.
GokulDAS027
  • 714
  • 1
  • 10
  • 22
40
votes
13 answers

Download a spreadsheet from Google Drive / Workspace using Python

Can you produce a Python example of how to download a Google Sheets spreadsheet given its key and worksheet ID (gid)? I can't. I've scoured versions 1, 2 and 3 of the API. I'm having no luck, I can't figure out their compilcated ATOM-like feeds…
40
votes
4 answers

How to automatically import data from uploaded CSV or XLS file into Google Sheets

I have a legacy database system (not web accessible) on a server which generates CSV or XLS reports to a Google Drive folder. Currently, I am manually opening those files in Drive web interface and converting them to Google Sheets. I would rather…