Google drive api reciving an access token google drive api, c#

I am developing desktop application using Google drive api. I am using c#. at login stage, after login and allow access, I receive authorization code, asking for me to copy paste it to my application for exchanging the authorization code to access token. Is there another way to receive the access token without the user copy and paste the authorization code. Thank in advance Moran

Google drive api Searching Google Drive within a specific folder

I am trying to utilize Google Drive as repository for many different types of documents. I have those documents arranged in several different folders. When I perform a search it seems to search my entire Google Drive account for matching results regardless of the fact that I am currently within a specific folder. This poses a problem for me as I want to be able to refine my searches to within a given grouping of documents. If I am searching for documents related to my work, for instance, I d

Google drive api Save document as docx from Google Docs

How can I save a document as .docx locally using the API? I got the URL, and managed to do a workaround like this: Dim documentUri As Uri = New Uri(feed.Entries(0).Content.AbsoluteUri + "&exportFormat=docx&format=docx") Dim stream As Stream = service.Query(documentUri) Dim streamReader As StreamReader = New StreamReader(stream) Dim streamWriter As StreamWriter = New StreamWriter("C:\\download.docx") Dim line As String = streamReader.ReadLine() While (line <>

Google drive api Google Drive DriveCommandLine sample app not working?

Is the Google Drive API sample command line app (DriveCommandLine) currently known to work? I have downloaded the Java client library, and compiled the sample application (inserting my application's client ID and secret created by specifying "installed application" and "other"). It runs and informs me to access the following link in a browser:

Google drive api Using Google Drive PHP API to read and write Google Doc tables

I'm thinking about the followin scenario: My PHP application push some integers into a google doc table which calculates with this and saves the result of this operations at the end of the table. my php application finally reads the result and displays it on the website. Is this possible with the Google Drive PHP API? I found the following:

Google drive api "AccessTokenRefreshError: Invalid Response 403" from oauth2client

I am creating a script that will download all files for a particular Google Apps user by using a service account that is impersonates that user (using the Python template code provided here (see code block below). def createDriveService(user_email): """Build and returns a Drive service object authorized with the service accounts that act on behalf of the given user. Args: user_email: The email of the user. Returns: Drive service object. """ f = file(SERVICE_ACCOUNT_PKCS12_FI

Google drive api Google Drive API Random 401 Errors

I have a service which integrates into the Google Drive API. On a seemingly random basis I will get 401 responses from requests, and attempting to repeat the request will yield the same response (up to 5 times, at which point we give up the attempt). Previous and subsequent requests for the same user, using the same authorization headers will be successful. Indications seem to be that there is some inconsistency with the behaviour of the API itself. I am not sure at this point what the best

Google drive api 405 Error when exchanging auth token for access token

I have authenticated to Google Drive API and have received an authentication token I then create my URI as follows AccessUri = new stringBuilder("") With AccessUri .AppendFormat("?code={0}", oAuth.UrlEncode(AccessToken)) 'Received in first part .AppendFormat("&client_id={0}", oAuth.UrlEncode(ConsumerKey)) 'Received from google API .AppendFormat("&client_secret={0}", oAuth.UrlEncode(Consume

Google drive api Integrating Google Docs - Authentication and Access

I'm interested in integrating Google Docs with our application, and curious if the API will support our use case. Our user would see a link on our site to open a document (document created programmatically). When they click the link, it would open up Google Docs (in another browser tab) in either write or read-only mode depending on permission in our system. Preferably the user wouldn't need a Google account at all. Also, before they click the link we would like to show a completely static HTML

Google drive api Can you restrict access to a realtime document?

The sample app in the docs loads a file into a document and then very nicely keeps the document synchronized across all instances of the app. Awesome! I don't understand when a user is allowed access to the realtime document. The load / save to the drive file is clearly regulated by permissions, but it seems that if I have the key to a realtime document I can make whatever changes I like to that document. Another user, who is allowed to save to the drive file, can get evil updates to the rea

Google drive api How to build and use a collaborative data model with Realtime API?

I have tried to follow the step described at Build a Collaborative Data Model and I end up with the following code : function onLoad(doc){ var Book = function(){}; var model = doc.getModel();, 'Book'); Book.prototype.title ='title'); ='author'); Book.prototype.isbn ='isbn'); B

Google drive api How can we add a file to a user's files.list via the sdk?

We are having issues where sometimes a file that a user can access is not returned when the user issues a files.list. This can happen in many ways. For example, new members of a Google group will not see previously shared files, as described in this question. Moreover, acording to Google documentation there are other limits on sharing which can prevent shared files from appearing in the "Shared with me" view. Finally, a user can issue a files.delete on a file she doesn't own, and the file wi

Google drive api What are the rate limits for creating subscriptions?

I am hitting the subscription rate limit, but I cannot find any further information regarding the limits. Failed to create channel 403 OK { "code" : 403, "errors" : [ { "domain" : "usageLimits", "message" : "Rate limit exceeded for creating file subscriptions", "reason" : "rateLimitExceeded" } ], "message" : "Rate limit exceeded for creating file subscriptions" }

Google drive api DriveQuickstart sample project in Android Studio

Can you please provide some guide how to create DriveQuickstart demo application (, steps 2-3) in Android Studio? The problem is that Android Studio can't find* classes, like And I can't find it neither in google-play-services.jar, not in Android SDK folders. I use "Compile with: Google APIs 17" in Android Studio, I downloaded all the late

Google drive api Multiple instances of Google API Client?

I have activity A that instantiates GoogleApiClient, connects and starts processing in AsyncTask that may take seconds or minutes. Meanwhile, user triggers activity B that instantiates it's own GoogleApiClient with a connection. The question is: Can an app have multiple instances of GoogleApiClient connected and working simultaneously, or should I keep an app singleton with my own semaphores?

Google drive api Does Google Drive SDK/API have a throttling/limiting policy (bandwidth limit)?

I created a program that downloads an entire user's drive. To improve the performance, it's a .NET multi-threaded application and I increased the value of System.Net.ServicePointManager.DefaultConnectionLimit to increase the limit of simultaneous connections. I can confirm that if the application asks for 50 concurrent connections, they are correctly opened and used. Currently, what I have experimented is that I can increase the number of the threads to improve the number of files processed per

Google drive api Null 500 error on copy

I have been receiving an extremely high rate of null errors from the Google Drive API when attempting to execute copy commands on a document I may or may not have permission to copy. Here is the code used to copy a file to drive. copyDriveFile = (file, callback) -> driveRequest({ url: "{}/copy?key=omitted" method: "POST" params: fileId: json: title: jwt:

Google drive api Google Drive Realtime API "get" endpoint not working as expected

We are trying to use the Google Drive API to retrieve the model of a Realtime document (API reference). However, if I call the "get" method to retrieve details of a Realtime File generated through the Google Drive Realtime API Playground app (with a blank "revision" field), the result is always: { "appId": "292824132082", "revision": 1, "data": null } even after a lot of editing on the model. If I try to specify a different revision (say, "2") the result is a 500 error: { "error": {

Google drive api Force new drive request even if not modified

Getting to grips with Google Drive API - working OK. I have nested requests so that I can save/update a file. Each nested request gets me the id of a parent folder - top parent, then second parent. The last request resolves a jQuery promise with the ID for the 'parents' option of the file save metadata object: 'parents' : [{'id' : invoiceFolderID}] When I load the web page and carry out the file save first time - it works OK. Subsequent attempts fail because the second nested request for the

Google drive api How to upload file on google drive from my website?

I want to use the Google drive API to upload files using my web app with an upload button. The back-end of the app is built with Laravel API and mongodb, and the front-end with angularJs. My end goal is for the file the user is uploading to be stored to a company's Google drive folder, not the user's (like Google file picker etc.) I'm a beginner when it comes to API, so any suggestions would be helpful.

Google drive api Google Drive - Inserting Parent Folder for a file adds Root as a parent as well

I am using api to update the parent folder for a particular file. Example - Original Folder - A Dest Folder - B Root Folder - / File - a1 After submitting a post request to the above endpoint, we see the following in the parents section of the file. parents : [ A, B, / ] Is it a known issue ? How can I avoid it apart from having to delete the 'root' folder manually ? Edit: Information about the apis used. Steps

Google drive api Drive API returning more response data then it used to send earlier

We have an integration of drive API in salesforce APEX language to retrieve the folders present on the drive. This service is up and running for a few years now and we saw no issues with, however a couple of days back we have noticed time out issues in Apex while response from google was being parsed. What we feel is that the response size has increased a lot which takes Apex a long time to parse and it ultimately times out. It was evident that this started happening with a lot of our google acc

Google drive api Retry failed Google Drive API batch

I am trying to handle failed batch request over Google Drive API v2 using the exponential backoff approach, but when it executes again the batch using batch.execute();, it fails due to the batch being empty. I would prefer not to rebuild the batch from scratch due to the workflow required. Is there any workaround? Edit: If I try to relaunch the batch without rebuilding it from scratch, I get an IllegalStateException, which is caused by the batch being empty (which it wasn't first time it was l

Google drive api Selective sync Google Drive for local folders?

Is there a way in Google Drive to make selective sync for local folders, i.e. having the parent folder synced to the cloud while keeping some selected sub-folders local only? For example, in my local pc the project folder has 3 sub folders: data, source, and bin. Is there a way to use Google Drive to back up project while ignoring bin?

Google drive api Getting 401 Unauthorized error on google API

I am learning how to use Google Drive API to upload a file and I am getting this error: "Client error: `POST` resulted in a `401 Unauthorized` response:\n{\n \"error\": \"unauthorized_client\",\n \"error_description\": \"Client is unauthorized to retrieve access tokens using this me (truncated...)\n" I think this stem from a wrong configuration of my service account. When I created my service account, I didn't use Enable G Suite Domain-wide Delegatio

Google drive api Is get start Page Token for creating drive push notification channel and getting list of changes is same?

I am using googleapis (drive v3) npm and oauth2client to get drive items. I use drive.changes.getStartPageToken() to create channel for webhooks(push notifications). I am successful in getting the notification. Now when I get the notification, initially was syncing all the drive items again. But now I wanted to change the flow as fetching only the changes in the drive using drive.changes.list(). In drive.changes.list() also should I get start page token again and hit it? what is the difference b

Google drive api How to access zip files from drive on Google collab?

I have dataset from that I have in my Google drive. These folders are zipped. Help needed with How do I access individual zip folders(,, from the main folder? Then, after accessing the zip, say, how to access folders (building,glaciers) from that? I tried below code: !pip install PyDriveimport os from pydrive.auth import GoogleAuth from import GoogleDrive

Google drive api How can I upload files to GoogleDrive in “multipart” type by using Guzzle?

With the help of @Tanaike(see here), I can successfully upload files to GoogleDrive by using php-curl, here is my code by using php-curl: function uploadByCurl($uploadFilePath, $accessToken){ $ch = curl_init(); $boundary = md5(mt_rand() . microtime()); //MetaData $params = json_encode([ 'name' => basename($uploadFilePath), 'description' => 'This is a test', ]); $fileContent = file_get_contents($uploadFilePath); $dataToUpload = "--{$boundary}\r\

Google drive api How do I transfer subscription of Google Drive to an existing google account?

I recently migrated a client's emails to Gsuite and set up a workspace account for them. This included the following emails (not actually their emails) - with aliases set up for & (these were old emails which were migrated over into archive folders and set up as alias under the primary account - not actual email accounts) There was also an old email called which was migrated into an archiv

Google drive api New thumbnail feature - how to use in Java

I'd like to leverage the new thumbnail feature of Google Drive using the latest Java SDK. But all I get is a bad request response. Can someone post a working example of this feature? I've been simply setting the mimetype and Base64-encoded image data but this does not work - at least for file.insert and file.patch. Update: This is my (simplified) code snippet. It works fine without the new thumbnail stuff - and the encoded image data looks ok as well: ... Drive drive = getDrive(account); File

Google drive api Inconsistent behaviour between "Real User" and API

1st of all, sorry for using that channel, but there's no other "open" communication channel for Drive SDK issues. See, the thing is, if you try to access a Google Drive document that you do not have access to from your browser you get a nice warning that allows you to ask for access to the file (so, you get CONFIRMATION that the document exists, and that you DO NOT have access to it). If you try to access a file you do not have access to from the API you get a 404, which does not confirm the d

Google drive api Requirements for google drive Share file Dialog

Can someone here explain this part of documentation? For the dialog to work as expected, all of the following must be true: The user is signed in to Google The user has installed your app The URL of the page that launches the dialog must have the same origin as the Open URL registered for the app. specially the 2 and 3.. thanks!

Google drive api Limit accounts in Google Project using OAuth 2.0 client IDs

I am trying to use Google API to develope my first integration service with Google Drive (I am a newbie). I configuared OAuth 2.0 client IDs as credentials but my service have to limit access only to a specified set of accounts (Gmail). Is it possible to do this, by setting any parameters in Developer Console? I can obviously create a login page, but the best solution would be to use something integrated with Google API (preference for PHP). Thanks all

Google drive api Issue with Google-API-PHP Client, getting error when running the quick start script

I am facing an issue with quickstart php script here: When I run the script first time, it executes perfectly and the access token is stored in a file called: drive-php-quickstart.json When I run the script second time, it gives me the error: Error start: Notice: Undefined index: expires_in in \google-api-php-client\src\Google\Client.php on line 485 Fatal error: Uncaught exception 'LogicException' with message 'refresh token must be

Google drive api Count files in google drive enterprise

how can you get the number of files in my company's google drive enterprise account using google drive sdk? is there anything like that available from google drive apis? How can we systematically get: Number of files in my enterprise Space taken in my enterprise The number of files per user average The number of space taken per usage average I Do not want to crawl all users looking for a single lookup. If it has to be an email to google enterprise support then so be it.

Google drive api Create access request for file using Google Drive REST API

From: If a file won’t open, a few things could be wrong: The file owner didn’t give you permission to view the file. You're signed in to a different Google Account. Your access could be denied because someone removed your permission to view the file. Is it possible to create access request using Google Drive REST API? Thank you in advance

Google drive api Alternative access to application files when server is down

I have an application that generates some reports at every hour. These reports are very critical (and sensitive) to the users and the only access is through the application (excel/pdf generation in memory with database) with previous user/password/role validation. Last week the server that host the application shut down for several hours (hardware failure) and the users could not retrieve those reports (and i cant access to the db inmediatly). My client needs to at least access the last gener

Google drive api Location of a comment in its corresponding Google doc

Given a google doc retrieved through the Google docs API and its comments retrived with the Drive API, How do you know where in the document a comment corresponds? I've been inspecting all the fields and couldn't find a relation except the quotedFileContent that contains the commented text in the doc, but this would resolve ambiguously if that text is duplicated.

Google drive api Read Files from Google Drive in JupyterLab

I have installed the jupyter lab extension to connect to google drive. I can create and open files in the drive from the JupyterLab UI. But I can't find a way to read files located in the drive in the notebook. For example I would want to be able to run in my notebook the following: df = pd.read_csv("Gdrive/MyDrive/somefileinthedrive.csv") Any suggestions ?

Google drive api Google Drive upload with CORS

So, there was a flurry of discussion about the Google Drive API last summer (e.g. a nicely written answer by Nivco), but it has been quite awhile since the last time anybody said something like "we have let our engineering team know about the issue". So, 8 months later, is there a way to gain any insight into this issue other than to troll old SO questions for updates?

Google drive api Cloud storage api suggestion for often video uploads

We are starting a software business. It includes : -Often video file uploads to the cloud storage -After upload is done, the software will send the video URL to the specified email adress. We use just storage in cloud, the processing will be done locally. For this system, what is your cloud service suggestion in terms of performance, api richness, api easiness etc.? SkyDrive, Dropbox, Google Drive or another? (The first business is done in Australia, then in Turkey)

Google drive api Google Drive Integration - "Open with" always prompts "Your domain administrator has approved access to"

We have a public Google Apps Market place app with Drive integration enabled. We request all the required privileges at domain wide level at app install time and it seems to be working because non admin users are able to perform seamless SSO. In drive, when a user selects a file, clicks "Open With", and selects our app to open with, he is prompted with a message as follows: "Your domain administrator has approved access to " Sign in As: This happens each time the user selects a file and not

Google drive api Should I pay for Google Drive SDK for iOS

Some times ago I received a message that developer will responsible to pay for data transfer using Google Drive SDK for iOS. Is this still actual, how to calculate a price for it? As I understood if many users will download huge data via google drive storage, it will be expensive for me as developer using SDK.

Google drive api Strategies to GoogleDrive API limit export download 10 mb

We've been developing a solution which is responsible for generating a PPT with a lot of images embedded and then downloading in the browser via Google Slides and Google Drive API. So, we discovered in the middle of the project that there's a limitation on the export of files from Google Drive API - currently at 10mb per file. Some PPT's are supposed to have thousand pics on them, so that's not ok for us. Here's a sample of the method used for exporting and downloading the PPT file. public by

Google drive api Google drive blocked access to a file in Colab

I mounted my disk this way: from google.colab import drive drive.mount('/content/drive', force_remount=True) And I get access to all the files on the disk except for one: If I try to copy it this way: copy_cmd = "/content/drive/My\ Drive/ /content/MyDataset" !cp $copy_cmd He writes an error: cp: error reading '/content/drive/My Drive/': Operation canceled If I try to download it via the colab file browser, it writes this error: Error Do

  1    2   3   4   5   6  ... 下一页 最后一页 共 11 页