16,015 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
59
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
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 "...
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-...
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.
...
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
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 ...
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 ...
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 ...
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....
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 ...
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, ...
-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 ...
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
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
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 ...
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 ...
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 ...
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....
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 ...
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 ...
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
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 ...
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, ...
-1
votes
1
answer
497
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
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 ...
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 ...
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
0
answers
47
views
Google Picker move into folder when selected
If I use a DocsView view in Google Picker with setIncludeFolders(true) and setSelectFolderEnabled(true), I can move into a folder by double clicking on it. However if I click on the folder name and ...
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/...
0
votes
0
answers
47
views
Pythong writtin in Google Drive Excel (not googlesheets)
I have a script that writes with no issue into a Google Sheets in Google Drive, and into multiple tabs within the Google Sheets.
I then come into an issue when importing that into Tableau due to its ...
-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
50
views
How to delete google drive folders using Python?
I am trying to delete google drive folders using the following code block:
from google.oauth2.service_account import Credentials
from googleapiclient.discovery import build
from google.oauth2 import ...
0
votes
0
answers
44
views
Having issues with implementing Google Drive sign-in with AndroidX‑Credentials/Identity - Simple android notes app
Im at my wits end with implementing the syncing functionality to my simple notes app for android that I created using kotlin and jetpack compose.
So Im a total beginner on coding and have ...
0
votes
0
answers
59
views
How do I capture an info response from the googledrive API to a text file using sink() in R?
I feel like this might be a really dumb question, but I've spent all day trying and failing to get it to work. I have a an R script that will be run automatically overnight, and in it I copy a file ...
1
vote
0
answers
69
views
I want to show image from google drive to my frontend but usually crash
I successfully uploaded my data to Google Drive via the API and set the permissions so that the image can be viewed by anyone with the link. However, when I try to display the image, it crashes. I've ...
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
votes
1
answer
88
views
Edit Google Drive and Sheets Files (Airflow Google Provider): Insufficient credentials
I am trying to modify a Google Sheets file and a CSV file in Google Drive via the Apache Airflow Google Provider:
df = pd.DataFrame(data)
csv_data = df.to_csv(index=True)
gcs_hook = GCSHook(...
0
votes
0
answers
94
views
setOwner(emailAddress) method returns a Exception: Access denied: DriveApp error? Is there a fix to this? [duplicate]
function transferOwnership() {
const fileId = "some-sheet-id-that-i-own";
const newOwnerEmail = "[email protected]"
const file = DriveApp.getFileById(fileId);
const ...
1
vote
0
answers
83
views
How to fetch calculated values (not formulas) from an Excel sheet stored in Google Drive? [duplicate]
I have an Excel file stored in Google Drive that contains several columns with calculated fields (i.e., formulas like =C2*D2).
My goal is to programmatically fetch the evaluated values (not the raw ...
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 ...
-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 ...
0
votes
0
answers
89
views
Google Drive API files.get() returns 403 forbidden after making a few requests
I'm making a get request with an API key in query params like so:
sound = new Audio(`https://www.googleapis.com/drive/v3/files/${fileId}?alt=media&key=${APIKey}`
I request songs from my google ...
0
votes
1
answer
74
views
Google Drive API Determine if Google Drive object is owned by user or shared
I have a script that synchronizes changes with Google Drive via the service->changes->listChanges mechanism. This is the general approach (php code here)
$idChangeHistory = [] ;
do {
$...
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()...
0
votes
1
answer
112
views
Notice [RequestTokenManager] getToken() -> NEED_REMOTE_CONSENT when authorizing Google Drive
I'm developing an app in Kotlin and want to use Google Drive to upload files. Initially, Google authentication works, but when I request authorization for Drive, I don't get it.
Supposedly, I already ...