google-drive-api

Get user email info from a Dotnet Google API

落花浮王杯 提交于 2021-02-19 04:27:08
问题 I'm have working two separate implementations of Oauth2 for both the gData and the Drive C# APIs, storing token information in an OAuth2Parameters and AuthorizationState respectively. I'm able to refresh the token and use them for the necessary API calls. I'm looking for a way to use this to get the user's information, mainly the email address or domain. I tried following the demo for Retrieve OAuth 2.0 Credentials but I'm getting a compile error similar to rapsalands' issue here, saying it

How do you post form submissions to a Google Drive Spreadsheet using Google App Scripts

醉酒当歌 提交于 2021-02-18 19:01:06
问题 I want to create a form on my site that when a user submits, it posts their data to a particular Spreadsheet in my Google Drive. How can I do this with Google App Scripts? sample form <form method='post' action='https://script.google.com/macros/s/xxxx.....'> Favorite Color <input type='text' value='' name='color' /> Favorite Ice Cream Flavor <input type='text' value='' name='flavor' /> <input type='button' value='submit' /> </form> so that when I hit submit it creates a record in a Google

How to read Drive Photos using Drive Rest API

我怕爱的太早我们不能终老 提交于 2021-02-18 15:35:23
问题 I'm trying to read Google Photos using Drive REST API inside Google Apps Script. The code looks like this: function myFunction() { var files = Drive.Files.list({ maxResults: 10, spaces: 'photos' }); for (var i = 0; i < files.items.length; i++) { var f = files.items[i]; Logger.log(f.title); } } But if I run this function Google shows error "The granted scopes do not give access to all of the requested spaces. (line 2, file "Code")" Page with error Project properties contain scope "https://www

How to read Drive Photos using Drive Rest API

ⅰ亾dé卋堺 提交于 2021-02-18 15:35:04
问题 I'm trying to read Google Photos using Drive REST API inside Google Apps Script. The code looks like this: function myFunction() { var files = Drive.Files.list({ maxResults: 10, spaces: 'photos' }); for (var i = 0; i < files.items.length; i++) { var f = files.items[i]; Logger.log(f.title); } } But if I run this function Google shows error "The granted scopes do not give access to all of the requested spaces. (line 2, file "Code")" Page with error Project properties contain scope "https://www

google service account credentials not working

孤者浪人 提交于 2021-02-17 05:55:10
问题 I am trying to create a simple web application that automatically uploads my database & media backup to a designated google drive. I have followed the official document and created a service account credential, gave it the owner role, and extracted a key(json file) from Google cloud platform. I enabled the Google Drive API on my account and wrote this code, but the credentials.valid returns False and my file would not upload to my drive. from google.oauth2 import service_account import

Location of a comment in its corresponding Google doc

我怕爱的太早我们不能终老 提交于 2021-02-17 04:32:16
问题 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. 回答1: You cannot retrieve the location of a comment using Drive API. As you can see in the official documentation, the Comment

Location of a comment in its corresponding Google doc

戏子无情 提交于 2021-02-17 04:29:24
问题 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. 回答1: You cannot retrieve the location of a comment using Drive API. As you can see in the official documentation, the Comment

Location of a comment in its corresponding Google doc

戏子无情 提交于 2021-02-17 04:26:04
问题 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. 回答1: You cannot retrieve the location of a comment using Drive API. As you can see in the official documentation, the Comment

Android App with Google Drive API stucks after choosing an account. Why?

我们两清 提交于 2021-02-17 03:36:32
问题 I'm trying to understand how I can integrate Google Drive API in my Android App(using Android Studio). I have tried the example app that I found here(https://github.com/googleworkspace/android-samples/tree/master/drive/deprecation) but after Google API console configuration my app stucks in an infinite loop when I choose an Account. Why? Where is the problem? I tried also with this(https://youtu.be/5bSEIQYJzKs) tutorial but I have the same problem. Here my build.gradle specific lines:

Google Apps Script to open password-protected Excel?

丶灬走出姿态 提交于 2021-02-16 18:21:08
问题 Is there a way for Google Apps Script to open a password-protected Excel file if the password is supplied when getting the file? I don't see any DriveApp method that accepts a "password" parameter. If not, then can this be implemented using the Google Drive API? Is there a "password" key I can use in an "options" object of a gapi.client.drive.files.get() or a similar method? 回答1: No, that is not possible with Apps Script or Google APIs at this time. You can always file a feature request in