FAQ Database Discussion Community


How to play a video being downloaded as if it was a stream?

python,video,google-drive-sdk,html5-video,chromecast
I'm using Google Drive's API to download a video from my Drive account. However, I'm using Partial Download, receiving the file by chunks. This is done by a Python script. If I try to play it using html5 , it won't work as I want because it plays until the...

“Cannot find DriveId. Are you authorized to view this file?”: Even if EXISTING_FOLDER_ID is set manually

android,google-api,google-drive-sdk,google-api-java-client,google-drive-android-api
I am having a look at here from github. I can create a file and a folder successfully by reading the code provided in github. But I am not being able to edit the file or create a file/folder in any specific folder. The main problem would be using emulator,...

Google Drive Android SDK: where to start from?

google-drive-sdk,google-drive-android-api
I have been looking all day at the Google Drive SDK for Android, but I am a bit confused. I need to make the list of folders and files in the user Google Drive account. I thought that was a simple, basic standard feature, but maybe not... Please can you...

Authorizing Drive and Sheets API on Android

java,android,google-drive-sdk,google-spreadsheet
Okay so my Android app needs to access a users Google drive account and edit spreadsheets on that account. I'm using the Google Sheets API version 3.0 to edit the spreadsheets and Drive API Client Library for Java for drive access.Now i know that the user needs to give permission...

Google Drive help required access to own Drive account

google-drive-sdk,google-oauth,google-api-php-client
I want to access my own google drive on web page but allow anyone to upload files and restrict download access or show only limited file to user for downloading. Drive API assumes that I will access another users credentials. But what I want is opposite, anyone can view my...

Formula to format cell if time has passed?

excel,google-drive-sdk,google-spreadsheet,excel-formula
For a list of times like so: 08:00 08:30 09:00 09:30 ... what formula would select cells containing times that have passed for the current day, assuming only the time (not the full date) was stored in the cell? Ideally something that works in Google Drive too. I tried comparing...

What's the best way to authorize a back-end sever to use the google drive api?

google-drive-sdk
I'm working on a an application where my back-end server will push and pull data over the google drive sdk. So, the back-end will only ever need a authorization via a single admin user's set of credentials. Is the best way to do the authorization for this use-case to do...

Do you need to migrate to Drive API when using https://spreadsheets.google.com/feeds/

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...

Does Google Drive no longer allow JavaScript file referencing from other website?

javascript,google-drive-sdk
I just noticed that all my javascript files hosted on Google Drive no longer work, which previously officially allowed by Google. All variables and function calls become undefined (as indicated in Chrome console), but all the while, they were working fine. Below is my link reference: <script charset='utf-8' src='https://googledrive.com/host/0B_kAR1YCVojTQnlmMXA0cWhfNGM' type='text/javascript'/>...

Using Google Drive to backup and restore SQLite Database

android,google-drive-sdk,google-drive-android-api
I've managed to create a backup of my database on an SD card and restore from there but realized that the purpose of my backup is to ensure the safety of the data and in this case if the physical device itself is damaged, lost, or spontaneously combusts so will...

“client secrets” that aren't & open source

google-drive-sdk,google-oauth
According to the Google Drive documentation, an application needs a so-called "client secret" in order to interact with the Google Drive SDK -- even if, as in the case of a client-side JavaScript app, the code is plain for all to see. (Of course, it's not really that much safer...

Google Drive revokes my token

java,google-drive-sdk
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:...

Drive API access to document with service account

google-drive-sdk,google-api-java-client
I'm attempting to access a spreadsheet that's under the "google.com" domain using the Google Drive Java API through a service account. I need to export several of the worksheets contained within the document. I've been able to create and use a service account (used via the Java API) but am...

How to add/append string to blob in Google Apps Script (Google Drive API)

google-apps-script,google-drive-sdk,google-apps
This code does work, except this part Drive.Files.update(thefile, theFileID, updatedBlob); var folder = DriveApp.getFolderById("0B0RcUNcUERU5MGpIaEXXXXXXXX"); var file = DriveApp.getFileById("NcUERXXXXXXXXERU5UWQUTZKY2X2"); var file2 = DriveApp.getFileById("NcUERXXXXXXXXERU5UWDDDDDDD2"); var myString = "sometext"; var updatedBlob = file.getBlob() + myString; var myFileName = "StringAddedFile.mp4"; var thefile = { title: myFileName, mimeType: 'video/mp4' }; var allFilesByName = folder.getFilesByName(myFileName); while...

Raised Gogle Drive API Per-user limit, still getting userRateLimitExceeded errors

google-api,google-drive-sdk,quota
Similar to Raising Google Drive API per-user limit does not prevent rate limit exceptions In Drive API Console, quotas looks like this: Despite Per-user limit being set to an unnecessarily high requests/sec, I am still getting rate errors at the user-level. What I'm doing: I am using approx 8 threads...

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

c#,c#-4.0,google-api,google-drive-sdk
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...

Dynamically Create Folders and Subfolders

php,google-drive-sdk,google-api-php-client
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...

When/why can file.downloadUrl be empty for a PDF file selected from Google Drive?

google-drive-sdk,google-api-js-client
Using js file picker to select PDF files from Google Drive. I'm encountering an instance when the downloadUrl is undefined. I don't understand what can cause this. I know downloadUrl can be empty for native Google formats, but these are PDF files. I'd like to know what scenarios (except native...

Removing permissions of the extensions

javascript,google-chrome-extension,google-drive-sdk,access-token
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')...

Cannot access Google Drive from 2 different device

java,android,google-drive-sdk,google-drive-android-api
I have an app which creates a word file on the Google Drive with some text. If I try to access the word file on the Google Drive from the device In which I have created that file, then it works and everything thing goes smooth, and I can able...

DexException: Multiple dex files

android,android-studio,google-drive-sdk,android-gradle,dex
Okay so currently i am making an Android app that utilizes the Google Sheets API version 3.0 and Drive API Client Library for Java, i need the app to read a spreadhsheet from a users drive account and edit it. Following the documentation i have included the following jars in...

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

python,google-drive-sdk
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 ? https://www.youtube.com/watch?v=38H7WpsTD0M Here they are talking about creating a form with a form using app script . Thank you...

calling connect(), while I am connected, DriveApi

android,google-drive-sdk
I have a problem, when I am trying connect to Drive api, I have got the following error log: Calling connect() while still connected, missing disconnect() for com.google.android.gms.drive.ApiService.Start A month ago it worked... I tried check if(mGoogleApiClient.isconnected()), but same problem. Tried Api 16-21, google-play-services_lib from official source (up-to-date a month...

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

php,google-apps-script,google-api,google-drive-sdk,xampp
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...

Google Drive API just listing up to 100 files per folder

python,google-drive-sdk
I'm creating an application to backup files stored in Google Drive using Python. The fist problem I encountered is that for some reason it just list up to 100 files in every folder. I think I'm using the correct scope ('https://www.googleapis.com/auth/drive') and here is the line of code I'm using...

Advanced Drive Services in Addons

google-apps-script,google-drive-sdk
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...

How to exclude trashed files when listing files in google drive

api,rest,google-drive-sdk,google-oauth,google-docs-api
I want to list all the files in google drive using google drive api v2 . But I want to exclude files in trash in the list So I tried GET https://www.googleapis.com/drive/v2/files?trashed=false as suggested in the api documentation But still I get files in the trash folder ,Am I missing...

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

python,google-drive-sdk,google-oauth
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...

How to import Drive API Client Library for Java and Google Sheets API version 3.0

java,android,google-drive-sdk,google-spreadsheet-api
After weeks of struggling with the documentation and plenty of forums I found out how to use both the Drive API Client Library for Java and Google Sheets API. I feel that the documentation especially for android is very lacking so I thought it would be useful to make a...

Google Drive API get authenticated email

php,google-drive-sdk
I'm running the php google drive api and I can authenticate the user just fine, but I want to store the user's permissionId and their email address into my database. the permissionid is easily accessible with $service = new Google_Service_Drive($client); ... $permissionID = $service->about->get()->getpermissionId(); but there isn't anything like getEmailAddress()...

Is there any way to set the initial count record number for google drive files just like setMaxResults?

java,google-drive-sdk
service.files().list().setMaxResults(50) Just like the above one is there any way to set the initial count or is it possible through query?...

Google Drive PHP Client render PDF?

php,google-drive-sdk,google-api-php-client
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...

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

android,google-drive-sdk
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 API VB.NET Parent Folder of a Folder

vb.net,google-drive-sdk,folder,parent
I am trying to work with Google Drive API with vb.net 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...

Google Drive Realtime API - Read-only users (limits)

google-drive-sdk,google-drive-realtime-api
I am developing an application with Google Realtime API that will have to handle a large number of concurrent read-only users. Is there a specific way to declare that a user should open the concurrent model in a read-only mode? Is there a limit on the number of concurrent read-only...

How to save my data in a cloud?

google-drive-sdk,cloud,server,dropbox
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...

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

html5,google-drive-sdk,dropbox-api
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,...

cannot get folderId that i just created on google drive

android,google-drive-sdk,google-play-services,google-drive-android-api
public class Helpers extends Activity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { SharedPreferences preferences; private static final String TAG = "BaseDriveActivity"; public static String EXISTING_FOLDER_ID; protected static final int REQUEST_CODE_RESOLUTION = 1; protected static final int NEXT_AVAILABLE_REQUEST_CODE = 2; public static final String folderId = "FOLDER_ID"; public static final String fileName = "folderId";...

Can Google Forms Each submission be one file

google-drive-sdk,google-form
Guys is it possible to get Each Submission of Google form instead of displaying all the submissions in one spreadsheet it should create a new file for each submission

How to browse files from projects google drive

php,google-drive-sdk
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('https://www.googleapis.com/auth/drive'); $accountEmail = 'SECRET'; $accountP12FilePath = './key.p12'; $key = file_get_contents($accountP12FilePath);...

Upload text file to Google Drive using Android

java,android,google-drive-sdk,google-drive-android-api
Edited: I have set my text into a string like so: String text = ("Hello!"); I want to turn this into a plain text file and then upload to a Google Drive Folder. I have tried on the code below, but it is not complete so I cannot say what...

RefreshToken from GoogleDrive sdk from authTOken received

java,android,eclipse,google-drive-sdk
I am trying to integrate GoogleDriveSDK Here is my code mGoogleClient = new GoogleApiClient.Builder(this) .addApi(Drive.API) .addScope(Drive.SCOPE_FILE) .addConnectionCallbacks(new ConnectionCallbacks() { @Override public void onConnectionSuspended(int arg0) { } @Override public void onConnected(Bundle bundle) { AccountManager am = AccountManager.get(AddAccountActivity.this); am.getAuthToken(am.getAccounts()[0], "oauth2:" + DriveScopes.DRIVE, new Bundle(), AddAccountActivity.this, new OnTokenAcquired(), null); } })...

No item with Given ID can be found

google-apps-script,google-drive-sdk
I am having issues when running my script after the most recent API update. I had some issues that I was able to fix with some help from around here but now I am having a get by ID issue. I am unsure of where it is coming from because...

Google Drive list method doesn't list files created recently

google-drive-sdk
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...

Google Drive API 500 null errors when copying

google-api,google-drive-sdk,google-api-php-client,google-api-client
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: developers.google.com/drive/v2/reference/files/copy Google_Exception: Error calling POST https://www.googleapis.com/drive/v2/files/#fileid#/copy: (500) { "error": { "code": 500, "message": null } } This issue seem...

Adding google api client to codeigniter

php,codeigniter,google-drive-sdk,google-api-php-client
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...

401 Unauthorized - Google Drive API

asp.net,.net,vb.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 "https://doc-08-68-docs.googleusercontent.com/docs/securesc/bteg36c1tifegg79l2ov17og25612tet/gk7kn52ahe4d0to7d6hte9f0f2hv47e4/1434132000000/11750183130219432819/11750183130219432819/0BziIKv2_NWCxc3RhcnRlcl9maWxl?e=download&gd=true" returns a 401 - Unauthorized...

List and access “Incoming” folder in Google Drive

java,android,google-drive-sdk
I want to list and access user's Incoming items using Google Drive Android API but I cannot find any method to do that in the Drive API documentation. I only know how to get the root of user Drive which refers to My Drive from the screenshot: // The setup...

Delete / trash file from android using android.gms.drive

java,android,google-drive-sdk,google-drive-android-api
I need to delete files from Google Drive using com.google.android.gms.drive. From what I've read here and across the web there is no support for file deletion in the "new API". Is that (still) correct? I mean the API isn't that new anymore ... I also read about the "clear contents...

python: How do i download a file from Google drive using api

python-2.7,google-drive-sdk,django-1.7
I would like to download a file in google drive to my system,using google drive api. How can i implement this ? according to example given at https://developers.google.com/drive/v2/reference/files/get#examples def print_file(service, file_id): """Print a file's metadata. Args: service: Drive API service instance. file_id: ID of the file to print metadata for....

Is the google drive file id settable?

google-drive-sdk
Google drive SDK works with file ids. When a new file is uploaded, the sdk returns a file id, i.e. it creates one. Can this id be set by the caller either during the upload or after?...

How to see user's files on google drive via angularjs?

angularjs,google-api,google-drive-sdk
I've read almost all api reference in google. There was a method to get a file or upload a file. In get file you need to pass file id: var request = gapi.client.drive.files.get({ 'fileId': fileId }); But what I want to achieve is to get users permission through my app...

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

google-drive-sdk,google-drive-android-api
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 do I add HTTP headers when making calls to the Google Drive service via the Google API Python Client?

python,google-drive-sdk
I'm building an app that fetches documents from Google Drive via the Drive API. I'd like to add an 'Accept Encoding' header to my request. How is this done in Python? I'm using the google-api-python-client I used the code here: https://developers.google.com/drive/web/quickstart/quickstart-python as a base for my app, but it doesn't...

How to open Google drive and pick file in android device

android,file,google-drive-sdk
In my android application have button called Upload whenever i click the button it needs to redirect to Google Drive, from that i have to pick a file & need read the file (file may be csv), is there anyway to do?? I have tried below code but it shows...

Cannot get Google Drive App Data folder content using query anymore

java,android,google-drive-sdk
For some reason the following Android app code com.google.api.services.drive.Drive drive; ... drive.files().list().setQ("mimeType='application/vnd.google-apps.folder' 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 https://drive.google.com/drive/my-drive > Settings >...

Domain-Wide Delegation of Authority while Third Party Apps are Disabled

oauth-2.0,google-drive-sdk,google-oauth,google-apps-marketplace
In Google Apps domains: Is it possible to grant domain-wide delegation of authority to third-party apps while the "Allow users to install Google Drive Apps" setting in the Admin Console is disabled.1 To be specific: I am trying to find out if there is a workaround the Admin Console Settings....

Google Drive api setting folder parents

php,google-drive-sdk,google-api-php-client
I have been trying to use google api to create first a root folder and then subfolders inside that root folder. However the results have been less than encouraging. Here is the code to create folders: public function createFolder($name, $parents = array()) { /** @var $client \Google_Client */ $client =...

python + google drive: upload xlsx, convert to google sheet, get sharable link

python,google-drive-sdk,google-spreadsheet,pydrive
The flow of my desired program is: Upload an xlsx spreadsheet to drive (it was created using pandas to_excel) Convert it to Google Sheets format Specify that it is editable by anyone with the link Get the link and share it with someone who will enter information Download the completed...

Google Drive Resumable Upload Failing

python,google-drive-sdk,python-requests
I am trying to upload a file using the Google Drive resumable upload api[https://developers.google.com/drive/web/manage-uploads#resumable] and i'm always getting a 400 status code with Invalid Upload request in the step 3 of the process. For the step 1(Starting a resumable session), I get the session uri and it's when I upload...

Good Drive API usage

php,google-api,google-drive-sdk,google-apps
I have made a google developer account from the google email provided by my organisation ( @nirmauni.ac.in email ). I have got some [email protected] I have some questions: How to I browse for the files that I upload using my [email protected] account. ?? is there any way to get [email protected]..

What is permissionId in Google API?

google-drive-sdk,google-api-client
I am trying to replicate the JavaScript client library example shown on https://developers.google.com/drive/v2/reference/permissions/update#examples. 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....

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

javascript,oauth,google-drive-sdk,google-spreadsheet,google-oauth
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...

Googe APPs managed “unlimited” account storage quota for service account

google-api,google-drive-sdk,google-apps,google-apps-for-education
I have a Google account as a student. This account is managed by my university and recently the university informed us that students' accounts have now "unlimited" storage for Drive etc. To perform backups with this, I created a few service accounts in Google APIs console ([email protected]). But it turns...

Google Drive Sync run program aftersync

google-drive-sdk
Is there anyway on the google drive program to set some program to run after the sync? Everytime it syncs it runs a script or something like that?

google-apps-script count files in folder

if-statement,google-apps-script,count,google-drive-sdk
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}...

Does OAuth 2.0 always require a browser in the flow

security,oauth,oauth-2.0,google-drive-sdk
Can I use OAuth 2.0 without a browser (or an embedded browser in my app) to perform nightly uploads? Setup I have a refresh token and access token from provider console-- Google Drive API I wish to use Java SDK to use/reuse these to upload data without the requirement for...

Ruby, spreadsheet by key

ruby,google-api,google-drive-sdk
I am using ruby to call spreadsheet_by_key from a google document. The first page that I call works great, however when i try to duplicate it and use the second tab on the page it does not work. Let me better explain with some examples. I am using: data =...

Google Service account user interfece

google-api,google-drive-sdk,google-oauth,service-accounts
How can I login to a Google Service account with the normal web user interface, for example to google drive ? Now I can only login using API using script....

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

google-apps-script,google-drive-sdk
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...

Is it possible for a domain owner to enable Google Drive API for all users?

google-apps-script,google-spreadsheet,google-drive-sdk
I've added a few scripts to a Google Spreadsheet. One uses the Drive API. First time a person runs the script he has to manuallly enable access to Drive API and click on the link to Google Developer Console and enable access to Drive API. There are about 100 people...

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

google-drive-sdk,google-drive-android-api
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: com.google.api.services.drive.Drive svc; svc.files().get("root").setFields("title").execute();...

Google drive api doesn't show correct quota usage for gmail

google-drive-sdk
I am trying to use google drive api to fetch quota used for gmail. The response that I get from the api is below: api used: https://developers.google.com/drive/v2/reference/about/get { "quotaBytesTotal": "246960619520", //246.96061952 GB "quotaBytesUsed": "5256850", "quotaBytesUsedAggregate": "85358344030", //85.35834403 GB "quotaBytesUsedInTrash": "0", "quotaType": "LIMITED", "quotaBytesByService": [ { "serviceName": "DRIVE", "bytesUsed": "0" },...

Google Drive: How do I transfer ownership using the Python SDK?

python,google-drive-sdk
I have setup a service account to copy a file a user uploads. How do I transfer the ownership to a different email address? I have: new_permission = {'value': [email protected]', 'type': 'user', 'role': 'owner', 'transferOwnership': True} # also tried "true" and "True" r = service.permissions().update(fileId=id, permissionId=perm_id, body=new_permission).execute() No transfer of...

make a data file of google drive account using google drive api

java,xml,json,google-drive-sdk,data-files
I'am want to get all of my data in google drive into file (xml or json it's not so matter). the regular way to do it is like this: Drive service = new Drive(somedata); String fileName = service.get(fileId).execute().getTitle(); to get the file id, it's needed to do this: Children.List request...

files.get and .getRequestFactory cannot be resolved

android,google-drive-sdk
I'm trying to get the metadata of a file in my Google Drive through the fileID but I'm running into some problems using files().get and getRequestFactory(). Specifically I'm looking at this and on the sample it shows the line File file = service.files().get(fileID).execute(); and HttpResponse resp = service.getRequestFactory().buildGetRequest(new GenericUrl(file.getDownloadUrl())).execute(); I...

Google Apps Script - Add file from Google Drive

google-apps-script,google-drive-sdk
First of all I want you to know that I'm not talking about uploading a file from users computer drive. What Im aiming to do is to be able to allow users to add a file from their Google Drive to a specific folder in my Google Drive. I've searched...

How to save data to Local google sheets

java,javascript,android,google-drive-sdk,google-spreadsheet
Hi I am developing an android app for a robotics competition. In the app we have buttons that add numbers to text boxes. I would like to get the number and save it to a locally stored Google sheet. Or to try to explain it the Google spreadsheet will be...

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

ios,objective-c,swift,google-drive-sdk,google-api-objc-client
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...

Where to get names of API_NAMES, API_VERSIONS

python,google-drive-sdk
In Google's apiclient, you can build a service by doing: service = build(api_name, api_version) I am trying to build a service for GoogleDrive, but am having trouble entering in the correct information: >>> from apiclient.discovery import build >>> service=build('drive', '1.3') Is there a place to find out all the names...

Google Drive API - OAuth2.0: How to Automate Authentication Process? Doubts and Questions

java,oauth-2.0,google-drive-sdk,oauth2-playground
I'm trying to integrate Google APIs inside a project (Thesis project) and I have some doubts and questions. So, here it is the scenario: I wrote a back-end application in Java that runs solely from a command-line and has absolutely no interaction with a user. Its goal is to allow...

Data backup by Google Cloud data store Vs google drive Vs other storage service

android,google-app-engine,google-drive-sdk,google-cloud-storage,google-cloud-endpoints
I need some basic understanding of google cloud as a whole.Supposing, I have an android app that will store user's contact,photo etc to cloud,in this case- 1.Which service should I use - google cloud storage or google drive ? if I use google cloud storage, how do I do it?...

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

excel,google-apps-script,google-drive-sdk,google-spreadsheet,google-apps
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 Drive API every time asking for authentication code

php,curl,google-drive-sdk
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 https://developers.google.com/drive/web/quickstart/quickstart-php My Code: require_once 'src/Google/autoload.php'; $client = new Google_Client(); // Get your credentials from...

Google Drive SDK Open with not working since 1 week

google-api,google-drive-sdk
We have created an application integrated with Google Drive. The application is executed from Google Drive using the "open with..." functionality https://developers.google.com/drive/web/integrate-open The application has been working fine for more than one year, however suddenly since one week the "open with..." functionatliy is not working anymore. The application works fine...

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

google-drive-sdk
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"?...

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

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

access drive with access token

php,google-drive-sdk,google-spreadsheet,google-oauth
struggling to understand the oauth2 token and refresh token processes ive got this code $url = 'https://www.googleapis.com/oauth2/v3/token'; $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 request a File in Google Drive

python,google-drive-sdk
I am able to make a request using the following Request in Google API Explorer: GET https://www.googleapis.com/drive/v2/files/asdf?key={YOUR_API_KEY} Authorization: Bearer ya29.EQEo6DJmR0Z-FngYc9nAL5iiidB8TBI7ysBDD6TARiqMtFjmMagLew0oC-vxj9HjojXjja46-5LSEQ X-JavaScript-User-Agent: Google APIs Explorer How would I then do this request in python? I am currently trying to do it with: api_key = '1122d' requests.get('https://www.googleapis.com/drive/v2/files/asdf?key=%s' % api_key) But I am...

Is there a way to reuse Google.Apis.Auth.OAuth2.UserCredential object to authorize SpreadsheetsService?

c#,google-drive-sdk,google-spreadsheet-api
I'm trying to use the Google Drive and Spreadsheets APIs from a C# console app. I'd like to authorize both services using user credentials with a FileDataStore so that I don't have to reauth my app every single time it runs. Below is how I'm authorizing my Drive service object:...

Is google phasing out the Google Docs Viewer?

google-api,google-drive-sdk,google-docs,google-apps,google-docs-api
I'm unable to find any reference to the Google Docs Viewer anywhere on the web except on sites from a few years ago. It still works, but I want to be a little more confident before I deploy code that relies on it. Here's an example of the viewer in...

Is there a way to add watermark to all videos in Google Drive’s folder?

google-apps-script,ffmpeg,google-drive-sdk,watermark,video-watermarking
Is there a way to add watermark to all videos in Google Drive’s folder? I found similar service, but it works only with pictures, pdfs - Wappwolf Maybe, it's possible to do by Google Apps Script or some other services (like ffmpeg)?...

Google Drive API doesn't list file from my drive (Ruby)

ruby,google-api,google-drive-sdk
I am working on a Ruby program to access my google drive in order to get my files. I want to use the server-to-server connection to avoid people to accept permissions, so I use the p12 key generated for the Service Account Client ID. The connection is ok but and...

Create GoogleCredential by Access Token

android,google-drive-sdk,google-oauth
I want to design an Android file viewer for Google Drive. At first, I implemented the app by using of the Google Android API, as follows, private void retrieveNextPage(){ if(mHasMore == false) return; Query query = new Query.Builder().setPageToken(mNextPageToken).build(); com.google.android.gms.drive.Drive.DriveApi.query(getGoogleApiClient(), query).setResultCallback(metadataBufferResultResultCallback); } However, the Android Drive API only allows the app...

Error com.google.android.gms.drive.DriveApi.DriveContentsResult cannot be resolved

android,google-drive-sdk,google-drive-android-api
I am working on Android Google Drive. As of now I am using the github sample code Android Demos. I am getting an error of The import com.google.android.gms.drive.DriveApi.DriveContentsResult cannot be resolved and The import com.google.android.gms.drive.DriveContents cannot be resolved I am using the updated Google play service and I have imported...

Google Drive file download via http

java,android,http,google-drive-sdk
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...

How do I turn off email notifications when transferring ownership?

python,google-drive-sdk
I am setting up an api and need to change the ownership of some files in my drive from my service account to my non-service account. How do I turn off the email notifications? I've tried via both Python as well as via the docs (at the bottom of the...

Insert file using Google Drive API?

java,google-drive-sdk
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. java.io.File fileContent = new java.io.File(filename); FileContent mediaContent = new FileContent(mimeType, fileContent); try { File file = service.files().insert(body, mediaContent).execute(); // Uncomment the following line to...