google-apis-explorer

List publicly shared files from google drive using service account key not getting public files

戏子无情 提交于 2019-12-06 13:40:53
I have been facing problem while coding that while using service account key and using drive.files.list API, i am not able to get files, though i have shared all the files publicly const { google } = require('googleapis'); const drive = google.drive('v3'); const jwtClient = new google.auth.JWT( client_email, null, private_key, ['https://www.googleapis.com/auth/drive'] ); jwtClient.authorize(function (err, tokens) { if (err) { console.log(err); return; } else { console.log("Successfully connected!"); } }); // List Drive files. drive.files.list({ auth: jwtClient, // fields: "files",

How to copy entire sheets from google spreadsheet in nodes?

穿精又带淫゛_ 提交于 2019-12-06 10:21:48
问题 Hi I am using googleapis npm package for work with spreadsheet. I have a function which use to copy spreadsheet but problem is that it only copy one sheet however my source spreadsheet has mupltiple sheets. Here is my code:- const { google } = require('googleapis'); var sheet_id = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx'; .. .. .. function copySpreadSheet(authClient, sheet_id) { console.log('sheet_id', sheet_id) const sheets = google.sheets({ version: 'v4', authClient }); sheets.spreadsheets.create({

Google Cloud Tasks always set HttpMethod to GET when using HttpRequest as payload_type

这一生的挚爱 提交于 2019-12-06 06:42:06
问题 According to this documentation [ https://cloud.google.com/tasks/docs/creating-http-target-tasks ], one should be able to create tasks with type 'http_request' and 'http_method' set to 'POST', but the behavior is not the expected once the task is always created with method 'GET'. After having this issue while using the Python Client Library, I've decided to try the API directly and check if it was an issue with the library or with the API itself. Using the "Try this API" from the product's

Google Photos API, pageSize Parameter not returning expected results

时光毁灭记忆、已成空白 提交于 2019-12-06 03:33:41
问题 Using the Google Photos API Explorer I am trying to limit the number of albums returned using the albums.list method. If I set pageSize = 10, the api explorer returns 5 albums, if I set it to 3 in returns 1 album. Any suggestions as to why I am not seeing the same number of albums in the response as is set via the pageSize parameter? Thanks 回答1: The page size describes the desired maximum number of results, but it is no guarantee. If you need at least 10 results from a single request, your

Update value in Google Sheet APIv4 with Python

耗尽温柔 提交于 2019-12-05 02:28:41
问题 I use the following python code to deal with Google sheet: #!/usr/bin/python from __future__ import print_function import httplib2 import os from apiclient import discovery from oauth2client import client from oauth2client import tools from oauth2client.file import Storage try: import argparse flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args() except ImportError: flags = None SCOPES = 'https://www.googleapis.com/auth/spreadsheets' CLIENT_SECRET_FILE = 'client_secret.json'

Is it possible to load google photos metadata into google sheets?

主宰稳场 提交于 2019-12-04 21:59:34
I have a project where I have scanned 10,000 family pictures from as far back as the 1900's and I am organizing them in Google Photos. I have a spreadsheet where I was keeping track of the proper dates and captions for the entire collection. I would organize a few at a time but then recently found out about the google photos API. I would like to use something like the methods Method: mediaItems.list or Method: mediaItems.search to get the data from my photos into the spreadsheet to manage. The output from these examples is exactly what I'm looking for and would want to load that into a

Google Cloud Tasks always set HttpMethod to GET when using HttpRequest as payload_type

戏子无情 提交于 2019-12-04 15:11:34
According to this documentation [ https://cloud.google.com/tasks/docs/creating-http-target-tasks ], one should be able to create tasks with type 'http_request' and 'http_method' set to 'POST', but the behavior is not the expected once the task is always created with method 'GET'. After having this issue while using the Python Client Library, I've decided to try the API directly and check if it was an issue with the library or with the API itself. Using the "Try this API" from the product's documentation page [ https://cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues

Google Photos API, pageSize Parameter not returning expected results

百般思念 提交于 2019-12-04 08:25:36
Using the Google Photos API Explorer I am trying to limit the number of albums returned using the albums.list method. If I set pageSize = 10, the api explorer returns 5 albums, if I set it to 3 in returns 1 album. Any suggestions as to why I am not seeing the same number of albums in the response as is set via the pageSize parameter? Thanks The page size describes the desired maximum number of results, but it is no guarantee. If you need at least 10 results from a single request, your best option would be to request a higher page size as you have found. Alternatively, you can always make

Revisions list and get missing information

被刻印的时光 ゝ 提交于 2019-12-02 20:13:59
问题 Using the Google APIs Explorer as well as the official C# library for Google Drive API v3 , the response is missing most of the documented fields. I specifically need access to who did the revisions, which should be accessible via $.lastModifyingUser . I've tried this on my domain admin account as well as a service account, so it shouldn't be a permission issue, at least not that I can see. What am I doing wrong, if anything? List: { "kind": "drive#revisionList", "revisions": [ { "kind":

How to update a user's externalId using Java

核能气质少年 提交于 2019-12-02 10:06:36
I'm trying to update a user with an externalId based on the Google Admin SDK documentation. UserExternalId externalId = new UserExternalId(); externalId.setType( "account" ); externalId.setValue( "test" ); User user = new User(); user.setExternalIds( externalId ); try { User update = directory.users().update( "USERKEY", user ).execute().setExternalIds( externalId ); LOGGER.info("Response from google: " + update.toPrettyString()); User full = directory.users().get( "USERKEY" ).setProjection( "full" ).execute(); LOGGER.info( "Response from new get user: " + full.toPrettyString() ); } catch