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

Advanced Protection Program prevent our app from oauth signed in

Our app works fine without problems during the OAuth flow, that is, the following URL: https://accounts.google.com/o/oauth2/auth However, if the account is under the Advanced Protected Program, then the OAuth will failed with the following messages:…
3
votes
3 answers

uplad file to google drive with progress bar with python requests

This is my code for uploading to google drive with python requests using google-drive-api. import sys import json import requests from tqdm import tqdm import requests_toolbelt from requests.exceptions import JSONDecodeError class…
jak bin
  • 380
  • 4
  • 8
3
votes
2 answers

How to call Google Drive API from Cloud Function for Firebase on behalf of a user?

I want to interact with the Google's Drive API from a Cloud Function for Firebase. For authentication / authorization, I am currently relying on getClient, which I believe uses the Service Account exposed in the Cloud Function environment: import {…
3
votes
1 answer

php create Google Sheet from Service Account

I have been using a service account to read and update existing Google Sheets which have been shared with the service account. Now I want to create a new Google Sheet using a service account, and then share it with a user by email address, or at…
StripyTiger
  • 877
  • 1
  • 14
  • 31
3
votes
1 answer

Google Drive: Drive.Files.list() not finding file by name

I need to get some file id's from Google Drive every day searching by filename, but Drive.Files.list() isn't working as expected. API works fine for some files, but some ones returning null (both files are in same folder level). If i modify the…
3
votes
2 answers

Saving document to specific google drive folders depending on variable name

How should I approach the problem of saving a file to a specific folder depending on the result of a variable? For example, Say I have 3 clients Bob, Billy and Ben. And on google drive, I have corresponding folders for each client, so "BobFolder",…
dan
  • 347
  • 2
  • 14
3
votes
2 answers

get authetication in google api browser but gargle permission fails

I am using googledrive to download directly from my drive folders, I am getting now this error since i was getting this error Show in New Window Error in gargle_abort_request_failed(): ! Client error: (403) Forbidden Insufficient Permission:…
i.b
  • 167
  • 11
3
votes
1 answer

How to set the property `folderColorRgb` for all users?

Good day, folks! I am creating folders using API v3 files/create https://developers.google.com/drive/api/v3/reference/files/create. I execute two similar requests with body: { "folderColorRgb": "#AC725E", "description": "Folder description", …
Igor Petrov
  • 121
  • 2
  • 8
3
votes
1 answer

Spring Boot: No converter for [class java.io.ByteArrayOutputStream]

I'm trying to export a document from Google Drive via their Drive API, and there's an example of it in the docs, but I didn't have any luck with it. Here's my code: @RequestMapping(value = "/test", method = RequestMethod.GET, produces =…
3
votes
1 answer

With Service account, Not getting any files / folder list with PHP

What will extra setting to get files / folder from google drive API with service account? Currently getting empty results. Same code working with credential web scope with client id and secrets key but not with service account.
Vipin Garg
  • 466
  • 3
  • 15
3
votes
2 answers

Google drive API V3 Fetch original file from shortcut

I have a Google Drive folder to which customers are uploading files. Some of them are actual GDrive files, and some are shortcuts to files on other drives or folders to which I have permission to read. I can successfully get the files using the…
3
votes
1 answer

Exception: Cannot retrieve the next object: iterator has reached the end. when running by other user

I have a code to get the parent folder of my GoogleSheet by using this code var ssId = SpreadsheetApp.getActiveSpreadsheet().getId(); //get my GSheet ID var parentFolder = DriveApp.getFileById(ssId).getParents().next(); //get the parent folder…
3
votes
2 answers

Import xlsx file from gdrive to spreadsheet using google app script

I'm currently creating a script that can import xlsx file stored from gdrive folder to spreadsheet, may I know if someone have reference or sample that I can explore I've already do some research on my end but some of them are in CSV process.
rodskies
  • 119
  • 1
  • 11
3
votes
1 answer

How to save folium map directly to google drive

I'm working on a script that will update automatically some folium maps in google drive daily. I got the whole thing working correctly, locally, without issues, except for one thing: since this will be running automatically on a remote server daily,…
Alain
  • 339
  • 3
  • 19
3
votes
1 answer

Google Drive API sending PDF attachments in emails

I have some node.js code that reads in a PDF file using Google Drive API drive.files.get()... (it's a file that is sourced on our Google team/shared drives). I convert the returned stream to a single base64 data chunk with something like this: …
Bob
  • 41
  • 3