15,575 questions
-1
votes
0
answers
16
views
When changing the Parent of a "larger" Folder in Google Drive ; at 89 seconds consistently it returns 500 Internal Server Error
This seems to be a recurring problem category with various uses of the drive API, but I've yet to see one that mentions it in this way.
It does not appear to matter how many files descendants there ...
0
votes
1
answer
60
views
How do I specify a "q" parameter for www.googleapis.com/drive/v3/files
In the Google Slides API sample, it says to do a GET request:
GET https://www.googleapis.com/drive/v3/files?q="mimeType=application/vnd.google-apps.presentation"&fields=files(id,name,...
-1
votes
0
answers
17
views
Get Storage Usage for an Individual Shared Drive using Google Workspace APIs?
We can easily view the Storage used metric for individual Shared Drives within the Google Workspace Admin Console (admin.google.com/ac/drive/manageshareddrives).
However, the Drive API (v3)'s drives....
0
votes
0
answers
44
views
Google Drive integration with Angular app gives 403
I have tried to use this component
<drive-picker client-id="clientId" oauth-token="userAccessToken">
<drive-picker-docs-view starred="true"></drive-...
0
votes
0
answers
24
views
Why does Google Drive API drive.file scope fail to copy external file but work with drive scope?
I'm building an application where new users (who are external to my Google Workspace domain) need a personal copy of a single Google Docs file (a template I've created). The file is shared as "...
624
votes
48
answers
970k
views
wget/curl large file from google drive [closed]
I'm trying to download a file from google drive in a script, and I'm having a little trouble doing so. The files I'm trying to download are here.
I've looked online extensively and I finally managed ...
1
vote
1
answer
62
views
How to test a Google Drive add-on?
I have written a simple add-on using google apps script, and "deployed" it as "Add On".
But whatever I do, I cannot figure out how to connect that add on to my drive account so I ...
1
vote
0
answers
58
views
OAuth 2.0 error for Google Drive 127.0.0.1 refused to connect
I have a C# application linked to Google Drive to upload and download files.
The application is working for most of the cases. But it showed an error when I ran the application on one new PC recently.
...
-3
votes
1
answer
2k
views
Google Drive Api Service Accounts do not have storage quota. Leverage shared drives, or use OAuth delegation instead [closed]
Description:
I'm trying to upload files to a shared folder in Google Drive using the Google Drive API with Node.js and a service account.
My scenario:
The shared folder belongs to a personal Google ...
0
votes
0
answers
118
views
Accessing all files in Google Drive using Google Picker with drive.files scope
Goal
Let users create files in my web app and save them to Google Drive.
Let users use Google Picker to select any file they own or that’s shared with them.
After selection, let my app download or ...
1
vote
1
answer
112
views
How do I filter the Google Picker to show only files created by drive.file scope?
I have an app where users (using the drive.file Oath scope) can create a new Sheet. I want to display the Google Picker to display the Sheets they've created with my app BUT the Picker is showing ALL ...
0
votes
1
answer
111
views
Adding a file attachment from Google Drive to an email
This is the code I used (found online, not my own), but I can't figure out how to add an attachment to this code.
function sendEmails() {
// Load the spreadsheet data
const sheet = SpreadsheetApp....
2
votes
1
answer
263
views
Installing Python Libraries to Google Drive in Colab is extremely slow or re-installing
screenshot of installation
colab link
its been 25 minutes it is still installing the lib
I'm trying to optimize my Google Colab workflow by installing Python libraries directly to my Google Drive ...
1
vote
1
answer
3k
views
google drive API failed and returned "HttpError 403: Service Accounts do not have storage quota" [closed]
dear all:
I am using google drive service account (as an editor) to share some files via google drive API.
Everything worked fine.
Then after one day, google drive returned error message 403 and said ...
1
vote
1
answer
149
views
Google Drive API OAuth authentication for server-side app
I'm trying to upload some CSV files up to a google drive via a .Net web app. My first attempt doing this using a service account ended up a failure. My second attempt using OAuth for authentication ...
401
votes
26
answers
608k
views
Displaying files (e.g. images) stored in Google Drive on a website
I was wondering if its possible to access/display files like images which are stored in Google Drive on a public website.
0
votes
0
answers
137
views
How to create a Google Spreadsheet document using a service account?
I am building a script which is supposed to create and update documents in a certain folder of my Google Drive (personal account, not Google Workspace).
If there is no document that particular name, ...
1
vote
1
answer
178
views
Adding a drive doc to an existing AppScript email as an attachment
I have been working on a code for days now, and it's working fine. I am now on the final leg and wish to add another attachment from the drive with a docID.
Below is my current code that works fine ...
0
votes
0
answers
964
views
Why does Google Drive API return a 403 `storageQuotaExceeded` error for new Service Accounts, even with 0-byte operations?
I am encountering a critical, blocking issue with newly created Google Service Accounts that prevents any file creation via the Drive or Sheets APIs. This is happening under my personal Google account ...
2
votes
2
answers
346
views
Google Drive API files.download restricted scope
I've a web application that uses the Google File Picker to select a file, and then internally my backend takes the fileId and calls this API to download it:
https://developers.google.com/workspace/...
2
votes
2
answers
249
views
Selecting a folder in the Google Picker with the drive.file scope
Google is pushing developers to use the drive.file scope instead of the drive.readonly scope (which is restricted) while encouraging the use of the Google picker.
Using the Google picker and drive....
1
vote
0
answers
213
views
Storage quota errors when trying to upload files via Google Drive API
I'm trying to upload a small sample CSV file up to my personal google drive via a Service Account, but it keeps failing.
I've created a folder in my personal Drive, and shared it with my Service ...
0
votes
1
answer
95
views
Google Drive API: gapi.client.drive.files.copy returns 404 for existing file (Slides template)
I'm trying to copy a Google Slides template using the Google Drive API with gapi.client.drive.files.copy, but I always get a 404 error, even though the file exists and is owned by the same account I'm ...
1
vote
0
answers
61
views
How to query folders which have names that surrounded by apostrophes?
I'm using the google/apiclient API in PHP to query Google Drive.
I have two folders in the same parent folder in Google Drive:
test ' folder
'test folder'
I have the following query to retrieve the ...
-1
votes
1
answer
498
views
Is there a way to use a video on Google Drive as a source in a video element in HTML?
So is there a way to add the link here:
<video controls>
<source src="GOOGLE DRIVE LINK HERE" type='video/mp4'>
</video>
I tried adding the ID, but this doesn't work... ...
0
votes
0
answers
58
views
rclone can't write to a folder shared-with-me using a GCP service_account and google-drive-api
Overall goal: I'm trying to get a service-account script to write to our company's Google Drive. Currently trying to use rclone for writing files. Working backwards I got rclone working when logged in ...
1
vote
1
answer
90
views
Can I download all files from a selected directory using only drive.file permission?
I'm using the Google Drive Picker to let users upload files from their own Google Drive. I'm using the https://www.googleapis.com/auth/drive.file scope for permissions.
Users can manually select ...
180
votes
22
answers
426k
views
How do I display images from Google Drive on a website?
A client of mine has uploaded some photos to their Google Drive and would like me to display their photos on their company website. I reviewed the documentation for displaying Google Drive content on ...
126
votes
17
answers
273k
views
Python: download files from google drive using url
I am trying to download files from google drive and all I have is the drive's URL.
I have read about google API that talks about some drive_service and MedioIO, which also requires some credentials( ...
77
votes
16
answers
414k
views
Extract Google Drive zip from Google colab notebook
I already have a zip of (2K images) dataset on a google drive. I have to use it in a ML training algorithm.
Below Code extracts the content in a string format:
from pydrive.auth import GoogleAuth
...
0
votes
1
answer
74
views
TypeError: ClockTriggerBuilder.onWeekday is not a function in Google Apps Script (V8 runtime, correct scopes)
I am encountering a persistent TypeError when attempting to create weekly time-driven triggers in Google Apps Script. The error message is:
ScriptApp.newTrigger(...).timeBased(...).everyWeeks(...)....
1
vote
1
answer
161
views
Getting started with Oauth for google Drive API Getting a 502 response from gapi.client.init
I'm trying to write a web client for google drive, but I'm stuck trying to get the authorization client to work. Specifically, when I call gapi.client.init() I'm getting a response of 502 - Bad ...
1
vote
2
answers
6k
views
How to read a public Google Doc using the Google Doc API?
I am attempting to read a Google doc using the Google docs API. However, for public Google docs files I don't have access to the Document ID, and cannot acquire said ID from the author. In particular ...
0
votes
0
answers
76
views
Create a report on the contents of a Google Shared drive to a Google Sheet [duplicate]
I'm trying to report on the contents of a Google Shared Drive, but am struggling with the Apps Script API that would allow me to do this within a shared drive. I have found (and amended) a script that ...
0
votes
0
answers
53
views
Inconsistent File Access with drive.file Scope in Google Drive API [duplicate]
I authenticated using the https://www.googleapis.com/auth/drive.file scope and attempted to list files using the Google Drive API. However, the response only included a subset of files — specifically, ...
2
votes
1
answer
137
views
error message when DriveApp.getFolderByID is used
I constantly get an error message when trying to implement DriveApp.getFolderByID. My
partial code is:
function myFunction() {
var files = DriveApp.getFolderById("https://drive.google.com/...
0
votes
1
answer
72
views
Why can I only retrieve files through the API that were previously added using the API in Google Drive?
I'm integrating Google Drive with my PHP application.
Uploading files via the API works perfectly — I can upload files using the API.
However, when I upload files manually in browser to the same ...
1
vote
0
answers
102
views
Google Drive API starting return a 502 when initializing gapi
i had a working implementation of the google drive api.
Now stopped working and I get following error logged in the browser's console:
GET https://content.googleapis.com/discovery/v1/apis/drive/v3/...
-2
votes
1
answer
156
views
Google Apps Script Function to Add a Gmail Attachment to Google Drive
I'm trying to write a Google Apps script which automatically adds my Gmail attachments to Google Drive. What I have been able to accomplish is to create a copy of the Gmail attachments in the Google ...
58
votes
14
answers
115k
views
How to download a Google Drive url via curl or wget
Is there a way to download a publicly-viewable Google Drive url via curl or wget? For example, being able to do something like:
curl -O myfile.xls https://drive.google.com/uc?export=download&id=...
42
votes
8
answers
75k
views
Why can't Google Drive be mounted anymore and shows a browser popup instead of a link for authorization?
Since yesterday, I have had the problem that I can no longer mount my Google account.
Normally, when I run it, I get a link to authorize myself with. Now, when the code is executed, an extra browser ...
0
votes
1
answer
135
views
Google Drive API V3 - Best way to know if a file is new or was modified
I have a google drive folder where users upload files and work with them. I also have an app which periodically scans that folder using google drive api v3 and processes data.
I want to only process ...
1
vote
2
answers
168
views
Saving a file using Google Drives API to a specific location
I have a PHP app that saves some information into a .CSV file. I want to upload it to my Google Drive.
This seems to upload the file:
$service = new Google_Service_Drive($client);
$fileMetadata = new ...
5
votes
1
answer
1k
views
Google Drive returns 429 when using saved photo as src for <img> tag
Using an ASP.NET API, I upload photos to my Google Drive, make the photos public, and retrieve their IDs. I then use the following string to display the photo: $"https://drive.google.com/...
0
votes
0
answers
93
views
Changing a google drive file label value via API Python
I've been trying to modify the label value of a file using the following code.
However, it's not working. Do you have any ideas?
# Import Libraries
import os
from google.oauth2.credentials ...
-1
votes
1
answer
103
views
How to integrate/access google drive API when deploy in cloud run (trouble when using ADC)
I have developed an application using GCP- using python, and have tested it on local environtment and it was running successfully.
My apps access google drive API using local OAuth credentials.json ...
0
votes
0
answers
101
views
Long-lasting access to files opened with Google Picker API
My app needs continuous/background access to file data (docs and spreadsheets) that the user selects through the Google Picker API. Meaning, I need to access the file e.g. days after it was first ...
0
votes
2
answers
86
views
Changing access option of a file using Google Drive API
Is it possible to change the access option of a file in Drive from 'Restricted' to 'Anyone with the Link' using Google Drive API?
filename= 'filename' file_metadata = { 'name' : filename, 'parents' : [...
1
vote
2
answers
856
views
How to use Google Cloud ADC to access Google Drive API from Python with personal account (not service account)
Lets say you need to run a script locally that needs to connect to google workspace resources like drive and sheets. How do you do this from Python leveraging Google Application Default Credentials?
0
votes
1
answer
150
views
How to save new create documents in one file?
I'm creating several doc.files according to the template, I take data from the sheet. Everything is saved in different
files. Please help me to save the new files in one document.
function myFunction()...