google-drive-sdk,google-spreadsheet-api , Do you need to migrate to Drive API when using

Do you need to migrate to Drive API when using


Tag: google-drive-sdk,google-spreadsheet-api

The 22nd of January, I received an email with the subject 'Important: Steps to migrate from discontinued Documents List API' from Google Apps .

Important: Steps to migrate from discontinued Documents List API

Hello administrators,

We recently communicated that Documents List API will be discontinued on April 20, 2015. This change means that service calls for this API will no longer be supported, and any Google Apps features that are implemented using this API will no longer function.

Our records indicate that you may have an application that uses Documents List API, and we recommend that you migrate to Drive API, which has comparable functionality, as soon as possible.

Here's what you need to do:

Determine if you have an application that makes requests to these types of URLs:

Migrate the applications to Drive API. If you have questions about migration, please contact Google Apps for Work Support.

Sincerely, The Google Apps for Work Team

I think it says that applications using should migrate to the new Drive API. But in the new Drive API, this URL is used too:

Is there a typo somewhere in the URL either in the email or Drive API documentation? Or is this email saying that when you determined you used any of these URL's you're OK?

PS: I opened a case at Google but I fear a late response, so I asked here.


Short answer is no.

The Docslist API is being discontinued because it has been replaced by the Drive API. In the case of the Spreadsheet API, there is no replacement API (yet - maybe one day), so it remains supported.

The only gotcha is that at some point, only OAuth 2 will be supported for authentication/authorisation so if you're using OAuth 1 or u/p, you have some work to do.


Google Drive - How to List all Files in a specified folder

Hi I am stuck here with this situation, I have tried a number of different approaches but I cannot get what I am after. Situation: I have a large number of files in folders hosted on google drive. For instance a single client folder for reports has between 2000-10000 files(this...

What is permissionId in Google API?

I am trying to replicate the JavaScript client library example shown on There is a reference to permissionId. How do I get this, I've looked everywhere, and my assumption is I am missing something dead obvious. Thanks in advance....

List names of sheets in Google Sheets and skip the first two

I found code to list the names of all the sheets in Google Sheets (from here): function SheetNames() { // Usage as custom function: =SheetNames( GoogleClock() ) try { var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets() var out = new Array( sheets.length+1 ) ; //out[0] = [ "Name" , "gid" ]; for (var...

Google Drive API VB.NET Parent Folder of a Folder,google-drive-sdk,folder,parent
I am trying to work with Google Drive API with I have seen a lot of post but I am not able to understand how to choose the right folder to add a file. I have a lot of "Backup" folder but, I assume now, I want to add...

“undefined” when trying to get values from spreadsheet with Google Apps Scripts

I'm getting an "undefined" error when I try to get the value from a cell in a spreadsheet. The thing is that if I execute the same command for a different cell I get the value in that cell. The only difference between those 2 cells is the way the...

No spreadsheets found when using AppIdentityService to authenticate

I can successfully authenticate my app engine app using AppIdentityService. However when I perform a SpreadsheetService.getEntries I receive no entries. Here's my code: SpreadsheetService service = new SpreadsheetService("Spreadsheet editing"); String[] SCOPESArray = { "" }; final List SCOPES = Arrays.asList(SCOPESArray); AppIdentityService appIdentity = AppIdentityServiceFactory.getAppIdentityService(); AppIdentityService.GetAccessTokenResult accessToken = appIdentity.getAccessToken(SCOPES); Credential...

User disconnecting app in Drive causes loss of data under FILE scope

I've run into this issue a few times, but could never point my finger on it, attributing it to GDAA's latency, my buggy code, etc... I finally managed to come up with a scenario where I can safely reproduce it, so I would like to ask people who know if...

How to get first row from Google Spreadsheets Data API

Here is an example: The returned JSON data doesn't contain the first row from the spreadsheet. You can view the contents of the spreadsheet in HTML ( to verify that "first row" exists in the sheet. How can I get the first row from the spreadsheet? There is a...

Can one track the usage of a shared resource from google drive

Does anyone here know if you on Google Drive somehow can track if a public shared link to a file have been used? That is, the resource have been downloaded, viewed or otherwise "touched"?...

How to save my data in a cloud?

I don't know if this is possible, but I would like to save some data of my website, like images and documents in a cloud like dropbox or google drive and I want that these data are available and visible to someone looking my site. is it possible? (My intention...

How to download text file from google drive using the url by the google drive api for android [closed]

I have uploaded a text file to my google drive account and it is public. I got the link for that file by the share link. What I want to do is to download that file from the drive using drive API by using the link that I obtained. And...

Google Drive revokes my token

I am new to google drive and started with the tutorial quickstart. After numerous attampts I run the program successfully. However I had permission and authorisation problems when I was trying to delete files. Drive service = getDriveService(); service.files().delete("FileId").execute(); So I decide to change the URL in the client_secret.json, From:...

regex matching syntax in google sheets not working

I am trying to match cells in a range that contain the word achievement followed by a . then at least one other word. Can someone tell me why this returns NA instead of TRUE when cell A3 contains achievement.blah? =ARRAYFORMULA(A3="achievement(.[[:alnum:]])*?") which would include things like below as correct: achievement.hello...

Google Drive PHP Client render PDF?

I'm trying to render a PDF from a service account (the file is shared with the service). $pdf = $drive->files->get($file_id); $pdf->downloadUrl However, the resource is coming in with 401 Unauthorized. It's funny that I'm authorized to get the files and everything, but downloading the actual files is unauthorized? I want...

Google Sheets API for clickable images in Google Sheets

In Google sheets, you can insert a clickable image to a cell which links to a function in app script. Can we also insert this clickable image and link it to app script from our server using Google Spreadsheet API? Or Can we call app script from our server?

Net::Google::Spreadsheets login failing. need to use two-legged OAuth2

I have an application that uses Net::Google::Spreadsheets. It began to fail with authentication errors earlier this week. My understanding is that Google has deprecated some authentication methods, and that we are now to use OAuth2. My application runs on a headless server, so I cannot use the three-legged OAuth2 solution...

Insert file using Google Drive API?

Based on Google Drive API reference guiding how to insert file Files.insert // File's metadata. File body = new File(); body.setTitle(title); body.setDescription(description); body.setMimeType(mimeType); // File's content. fileContent = new; FileContent mediaContent = new FileContent(mimeType, fileContent); try { File file = service.files().insert(body, mediaContent).execute(); // Uncomment the following line to...

Cannot get Google Drive App Data folder content using query anymore

For some reason the following Android app code drive; ... drive.files().list().setQ("mimeType='application/' and 'appdata' in parents").execute().getItems(); started returning empty list since May 14. This code was returning my custom folders for more than 1 year before. I can see my App Data content still exists through > Settings >...

How to show multiple Date/Times per location?

Using Google Spreadsheets, I need to enter data structured like the example below. There will be multiple "quadrants" Each "quadrant" can contain one or many "days", Each "day" can contain one or many "times". This data will ultimately be imported in some backend db (e.g. Access DB, SQL, MySQL)....

Dynamically Create Folders and Subfolders

I have several scripts in php to create a folder and upload a file to the desired folder, but I can't seem to be able to create new folders, new subfolders or create another function to do this process. Do i have to use a parent/children specific procedure? Here's the...

Google Drive file download via http

There is a link to Google Drive file accessible to anyone without authentication. Is there any way to download that file using just link and some sort of http client? Most of examples around are relying on Drive API and file IDs, however I'd like to stick with more lightweight...

The lightest (most lightweight) Google Drive REST API query/response?

When initializing the REST Google Drive API in an Android app, I need to 'poke' the server to produce the UserRecoverableAuthIOException In order to minimize the network traffic, I'm searching for the most 'lightweight' request that would produce such an exception. Currently, I use the following construct: svc; svc.files().get("root").setFields("title").execute();...

Pass Comments & Suggested Edits from a Google Document to a Google Sheet

Fellow Stackers. I'm using a Google Apps Script to (a) capture all "Comments" in a Google Document... ...and (b) list them in a column of a Google Sheet... However, I'm wondering if it's possible to... (1) Array "Comments" into individual cells down a column in my Sheet rather than into...

Any way te read an excel file from a Google Sheet?

in my organization we work with Google Apps but we have one file that we need to maintain in Excel due to its complexity. All my other spreadsheets are Google Sheets and a lot of them need to get data from that excel file. So my question is: is there...

google-apps-script count files in folder

I've had a search but cannot seem to find what I am looking for. I am seeking the code to enable me to do this pseudocode: Count number of files in specific Google Drive folder (by folder Id) If file count is above 'x' do this {other piece of code}...

deleting column by header value deletes all columns

My code has (at least) 2 problems. Can anyone offer suggestions? I am trying to learn JavaScript so I would really prefer hints rather then completed code. My goal is to copy a sheet Main into a new sheet called achievement and remove all columns that do not have the...

How can I make a copy of a file in Google Drive via Python?

I wrote a short function in Google Apps script that can make a copy of a specific file that is stored on Google Drive. The purpose of it is that this file is a template and every time I want to create a new document for work I make a...

Advanced Drive Services in Addons

I have a Google Script that uses the Advanced Drive API service and am now looking to convert this script into an Add-on. However the Drive API needs to be enabled manually by the user before using the service inside the Apps Script. Is it possible to use the advanced...

Can I associate a user's account with an action to the drive API?

We're looking to make a little webapp to manage our week-long nerf war (humans vs zombies to be precise), and we're thinking about how easy it would be to have Google Sheets be our only backend, and our frontend be entirely javascript/html/css. Let's say there's two actions that can be...

How to create a Google form programatically with python ?Is it possible to do so by appscript and python interfacing or something like that?

How to create a Google form programatically with python ? Do they provide some api like drive api to do so ? Is it possible to interface python with Google appscript ? Here they are talking about creating a form with a form using app script . Thank you...

Google Drive list method doesn't list files created recently

I've developed an extension for Google Chrome that HEAVILY relies on Google Drive API (the extension is LBTimer, available in Google Chrome web store), to store data in the appfolder, using XMLHttpRequests Since May, 13th 2015 I'm finding a problem when using the list method. If I programmatically create a...

Newbie Google Drive API (PHP) confusion - what guide/library to use?

I have a mobile site - from a phone I want visitors to choose a file from Google Drive, and send it to the server that hosts Essentially emulating a simple <input type="file"> file upload as on a desktop. From what I understand the workflow is as follows:...

Google Spreadsheet to pdf with watermark in Google script

I want to convert the spreadsheet with a watermark/background image, and send + save the generated pdf The converting to pdf worked, but I don't know if/how you can put an image to the generated pdf. This is what i got now: function ExportAndSent(subject, filename, email) { var ss =...

Google Sheets Copy Down Issue

I have a google form that my students fill out daily. All form responses feed into one workbook. From the workbook, I have a spreadsheet for "Clean" data. Which is just the information from the responses sheet needed to graph progress. The formula I am using in A2 is: ='Form...

401 Unauthorized - Google Drive API,.net,,google-drive-sdk
I'm working with the Google APIs for the first time and I'm having problems trying to download files with the File object "downloadUrl" property. I'm currently using the "Service Account" option with the associated service account email and P12 certificate. However, the URL returned "" returns a 401 - Unauthorized...

Removing permissions of the extensions

I have an extension that first asks for permissions to access Google Drive files. The extension is almost empty except in the popup I load this js: chrome.identity.getAuthToken({ 'interactive': true }, function(token) { // Use the token. console.log('Request Token') console.log(token) chrome.identity.removeCachedAuthToken( { 'token': token }, function () {}) console.log('Removed token')...

access drive with access token

struggling to understand the oauth2 token and refresh token processes ive got this code $url = ''; $data = array('client_id' => 'clientid', 'client_secret' => 'secret','refresh_token' => 'token','grant_type' => 'refresh_token'); $options = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded", 'method' => 'POST', 'approval_prompt'=>'force', 'access_type'=>'offline', 'content' => http_build_query($data), ), ); $context...

How to get Google Sheet data into a HTML page using jQuery/Javascript?

Is there a way to obtain Google spreadsheets data into a HTML page using jQuery/Javascript? I couldn't find any examples/resources regarding the same on the Google sheets v3.0 API page. Could anyone help? I have tried to get the sheets feed using the following request GET

Google Spreadsheet custom function to add csv in spreadsheet

I am using Google spreadsheets, and in my google spreadsheet i want to import data from my RESTful web service. I cant use =IMPORTDATA due to the fact that i need to add a header to the url for auth purposes. This is the custom function i have so far:...

Google Drive API: I have to fetch only files in that folder without trashed files

I am trying to get a list of files in a folder on Google drive using the Google drive API. When I make my request I am getting a list of child elements in that folder including previous deleted files. How do I get only the files that are in...

OnEdit function Does not recognize pasted (ctrl-p) Values as being a cell edit. Is it possible to get it to do so?

I've got an script in my google sheet that stamps time codes into specific cells when a name is entered in the column next to it... However the script does not work when the names are copied and pasted into the column... is there a work around for this issue...

Formula Cell value is not updating in the reference while Using Google Spreadsheet API with JAVA

I have this sample code in which I am trying to integrate google spreadsheet API with java. import; import; import; import; import; public class ExpressionExample { public static final String GOOGLE_ACCOUNT_USERNAME = "[email protected]"; public static final String GOOGLE_ACCOUNT_PASSWORD = "xxx"; private static URL cellFeedUrl; public...

gspread/OAuth2: authenticated default gmail account (used early in ClientLogin)

I have been using gspread (authenticated via ClientLogin) for a last year. Now I would like to use OAuth2. I've followed tutorial from gspread site: The problem is that this method creates new "Email address" (in which doesn't have an access to spreadsheets - all spreadsheets should be...

Directory sandboxed access for Google Drive / Dropbox API / RemoteStorage apps?

Is there a way to get sandboxed, user-selected directory access on any major file service without first getting read level access to their entire filesystem? There's a lot of talk about "unhosted" static webapps that allow users to access their data from a 3rd party file service (Google Drive, Dropbox,...

Google Drive API every time asking for authentication code

I'm using google drive api to upload a file to google drive using php, but it every time asking me for authentication code fof my application. I have followed the steps given in the URL below My Code: require_once 'src/Google/autoload.php'; $client = new Google_Client(); // Get your credentials from...

Adding google api client to codeigniter

I want to upload files to google drive using php in codeigniter. First of all i am trying to integrate google api client to codiginator. I have uploaded all the files in to my third_party folder. it look like this I i have created a file called google.php inside my...

How to browse files from projects google drive

i have created project in google console with service type credentials. I have downloaded p12 key file, and then wrote sample code for inserting file to test it: <?php require_once 'google-api-php-client/src/Google_Client.php'; require_once 'google-api-php-client/src/contrib/Google_DriveService.php'; require_once "google-api-php-client/src/contrib/Google_Oauth2Service.php"; $scopes = array(''); $accountEmail = 'SECRET'; $accountP12FilePath = './key.p12'; $key = file_get_contents($accountP12FilePath);...

fetching specific columns using listFeed in googlesheet using java api

I want to fetch only specific columns based on header in spreadsheet. I tried the following code ListQuery query=new ListQuery(url); query.setFields("FieldName"); but it gives the following error: Exception in thread "main" Bad Request Fields query parameter is not supported at at at...

Google Drive API 500 null errors when copying

I'm getting this error message (100% of the time) when copying a shared file, using the latest version of php library. And I'm getting the same response via the API explorer: Google_Exception: Error calling POST (500) { "error": { "code": 500, "message": null } } This issue seem...

Google Drive API (GTL) - Create multiple folder paths in order?

I'm using the Google APIs Client Library for Objective-C (GTL) to access the Google Drive API. According to it's Introduction to the Google APIs Client Library for Objective-C, Query execution by the service is inherently asynchronous. Which means when you try to create a path like: root/a/b/c, before you can...