google-api

Google API query files in multiple folders with php

主宰稳场 提交于 2020-04-30 09:20:40
问题 I am trying to query the google drive using multiple folder ids. This is my query $optParams = array( 'pageSize' => 1000 ,'fields' => 'nextPageToken, files(contentHints/thumbnail,fileExtension,iconLink,id,name,size,thumbnailLink,webContentLink,webViewLink,mimeType,parents, kind, trashed, owners, modifiedTime)' ,[q] => "trashed=false and ('folder-id-1' in parents or 'folder-id-2' in parents or 'folder-id-3' in parents or 'folder-id-4' in parents or 'folder-id-5' in parents)" ); $service = new

Google Tasks Authentication with 2 legged oauth error: 401 Unauthorized

北城以北 提交于 2020-04-18 06:56:14
问题 i am using this code to get an Authentication for Google tasks Api import com.google.api.client.http.*; import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.client.json.jackson.JacksonFactory; import com.google.api.services.tasks.*; import com.google.api.client.auth.oauth.OAuthHmacSigner; import com.google.api.client.util.ArrayMap; import com.google.api.client.auth.oauth.OAuthParameters; import com.google.api.services.tasks.model.TaskList; import com.google.api

Google Tasks Authentication with 2 legged oauth error: 401 Unauthorized

为君一笑 提交于 2020-04-18 06:55:35
问题 i am using this code to get an Authentication for Google tasks Api import com.google.api.client.http.*; import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.client.json.jackson.JacksonFactory; import com.google.api.services.tasks.*; import com.google.api.client.auth.oauth.OAuthHmacSigner; import com.google.api.client.util.ArrayMap; import com.google.api.client.auth.oauth.OAuthParameters; import com.google.api.services.tasks.model.TaskList; import com.google.api

Errow using googletranslate package in Python: Expecting value: line 1 column 1 (char 0)

倖福魔咒の 提交于 2020-04-18 06:13:40
问题 I have extracted the tweets from twitter and now trying to convert the text to English. It should detect the source language itself and convert to English. This is the code i'm using: from googletrans import Translator translator = Translator() tweet['English']= tweet['text_clean'].apply(translator.translate,dest='en').apply(getattr, args=('text',)) It was working initially but not anymore. Tried closing the jupyter notebook and restarting it again. It gives the same error even for processing

Errow using googletranslate package in Python: Expecting value: line 1 column 1 (char 0)

岁酱吖の 提交于 2020-04-18 06:13:13
问题 I have extracted the tweets from twitter and now trying to convert the text to English. It should detect the source language itself and convert to English. This is the code i'm using: from googletrans import Translator translator = Translator() tweet['English']= tweet['text_clean'].apply(translator.translate,dest='en').apply(getattr, args=('text',)) It was working initially but not anymore. Tried closing the jupyter notebook and restarting it again. It gives the same error even for processing

How to fix Error: Require at least one aggregateby? - fitness api

佐手、 提交于 2020-04-17 22:53:48
问题 I keep getting these error "Error: Require at least one aggregateby" and no idea how to fix it. I have tried many ways: fitness.users.dataset.aggregate({ auth: serviceAccountAuth, userId: "me", //fields: "bucket/dataset/point/value/intVal", requestBody: { "aggregateBy": [{ "dataTypeName": "com.google.step_count.delta", "dataSourceId": "derived:com.google.step_count.delta:com.google.android.gms:estimated_steps" }], "endTimeMillis": 1566733471706, "startTimeMillis": 1566647071706, "bucketByTime

Google Admin SDK authentication with service account

女生的网名这么多〃 提交于 2020-04-16 08:16:29
问题 My team is currently developing an application to list my company's domain users in GCP, using the Admin SDK, for onboarding and offboarding purposes. We're using a service account to do this and we've have added the admin.directory.user.readonly scope, in the Google Admin's advanced settings, to it. The Admin SDK API is activated and we can see the service account in the Credentials area. When we invoke the https://www.googleapis.com/admin/directory/v1/users endpoint with the parameters

Indexing API 403 Permission denied. Failed to verify the URL ownership

穿精又带淫゛_ 提交于 2020-04-13 16:49:19
问题 I want to execute the code from the example: require_once 'google-api-php-client/vendor/autoload.php'; $client = new Google_Client(); // service_account_file.json is the private key that you created for your service account. $client->setAuthConfig('service_account_file.json'); $client->addScope('https://www.googleapis.com/auth/indexing'); // Get a Guzzle HTTP Client $httpClient = $client->authorize(); $endpoint = 'https://indexing.googleapis.com/v3/urlNotifications:publish'; // Define

Google Classroom Apps Script - CourseWork.list permission error

匆匆过客 提交于 2020-04-13 08:06:39
问题 I am trying to access course work from my Google Classroom in a Google Apps Script using the Classroom API v1. I followed the steps in the Quickstart to successfully retrieve my course list, but when I tried to access the coursework in one of my classes using the following: var coursework = Classroom.Courses.CourseWork.list('valid courseId'); I get a 'The caller does not have permission' error. I can successfully retrieve the coursework list using the APIs Explorer, though. From playing with

GKE MasterAuth clientCertificate has no permissions to access cluster resource

寵の児 提交于 2020-04-11 11:59:31
问题 I created GKE cluster using GKE API. Below is the payload and end point I used. API: https://container.googleapis.com/v1/{parent=projects/ /locations/ }/clusters Method: POST RequestBody: { "cluster": { "name": "test", "masterAuth": { "clientCertificateConfig": { "issueClientCertificate": true } }.... } ...... ..... } NOTE: I'am creating GKE cluster with masterAuth enabled by setting clientCertificate to true. After cluster creation, I created the kubeconfig in my local machine using the