google-api

Upload the file to Google drive using API and error 403

痴心易碎 提交于 2020-01-15 04:24:09
问题 I want to upload the zip-file to Google drive. I use Java Quickstart (https://developers.google.com/drive/v3/web/quickstart/java) as base. The code works. I modified it by the following code File fileMetadata = new File(); fileMetadata.setName("My Report"); fileMetadata.setMimeType("application/vnd.google-apps.spreadsheet"); java.io.File filePath = new java.io.File("files/report.csv"); FileContent mediaContent = new FileContent("text/csv", filePath); File file = driveService.files().create

Upload the file to Google drive using API and error 403

自古美人都是妖i 提交于 2020-01-15 04:24:08
问题 I want to upload the zip-file to Google drive. I use Java Quickstart (https://developers.google.com/drive/v3/web/quickstart/java) as base. The code works. I modified it by the following code File fileMetadata = new File(); fileMetadata.setName("My Report"); fileMetadata.setMimeType("application/vnd.google-apps.spreadsheet"); java.io.File filePath = new java.io.File("files/report.csv"); FileContent mediaContent = new FileContent("text/csv", filePath); File file = driveService.files().create

403 Forbidden Error adding an event to a Google Calendar

心已入冬 提交于 2020-01-15 03:33:13
问题 Used the code from [ https://developers.google.com/google-apps/calendar/create-events ] last month to add an event to a Google Calendar from an Android app and it worked. Now each time I attempt to add an event I get this error: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden W/System.err: { W/System.err: "code" : 403, W/System.err: "errors" : [ { W/System.err: "domain" : "global", W/System.err: "message" : "Forbidden", W/System.err: "reason" : "forbidden" W

Can I run a JavaScript function AFTER Google Loader has run?

扶醉桌前 提交于 2020-01-15 03:14:16
问题 I am loading Google API using google.load() and I need to process some of what is built by it, but I need to run the JavaScript after it has already completely loaded, is there a way to ensure that happens? Here is how I build the list of images, I need to add an attribute to each img tag though, can't do that until after it is built right? google.load("feeds", "1"); function initialize() { var feed = new google.feeds.Feed("myfeed.rss"); feed.load(function(result) { if (!result.error) { var

Can I run a JavaScript function AFTER Google Loader has run?

痴心易碎 提交于 2020-01-15 03:14:09
问题 I am loading Google API using google.load() and I need to process some of what is built by it, but I need to run the JavaScript after it has already completely loaded, is there a way to ensure that happens? Here is how I build the list of images, I need to add an attribute to each img tag though, can't do that until after it is built right? google.load("feeds", "1"); function initialize() { var feed = new google.feeds.Feed("myfeed.rss"); feed.load(function(result) { if (!result.error) { var

oauth2client.client.HttpAccessTokenRefreshError: invalid_grant: Invalid JWT

╄→尐↘猪︶ㄣ 提交于 2020-01-15 03:12:54
问题 I am using Google Cloud Vision API on my Raspberry PI. It works fine when I use it on my home (on which the cloud account was first accessed) network but if I access the API from a different network it raises a token refresh error. I have synchronized the time using NTP but is of no help. Detailed error: oauth2client.client.HttpAccessTokenRefreshError: invalid_grant: Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values and

How to get “Visitors Flow” data from Google Analytics GAPI API?

大憨熊 提交于 2020-01-15 03:08:04
问题 In Google Analytics there is a verry nice "visitor flow" page that clearly contains and keeps track of what path a visitor has taken on the site. Is it possible to get that data from the API? I know that you can use "custom variables" to give the users a unique ID and i do that already but what im after is to be able to use the data already collected without custom variables. I have got the following at the moment: $ga->requestReportData(56786432, array('networkLocation', 'date', 'hour',

Getting user credentials using Google+ API

♀尐吖头ヾ 提交于 2020-01-14 14:28:06
问题 I am trying to include Google sign in in my android application using Google+ Api. I am able to take account details from the user but once signed in I am getting null when requesting for username using call: Plus.PeopleApi.getCurrentPerson(mGoogleApiClient).getDisplayName() And Logcat shows: BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/plus/v1/people/me Although I am able to get email of the user using: Plus.AccountApi.getAccountName(GoogleClient

PHP fatal error on google php api app engine

戏子无情 提交于 2020-01-14 14:22:47
问题 I've a problem with my app engine while I'm trying to implement Google+ PHP API , it gives me a fatal error in curl file "Goolge_IO.php" it's one of the library files which was provided on https://code.google.com/p/google-api-php-client/ Here's the detailed error Fatal error: Uncaught exception 'Exception' with message 'Google CurlIO client requires the CURL PHP extension' in C:\Users\joker\Desktop\\plus\src\io\Google_CurlIO.php:47 Stack trace: #0 C:\Users\joker\Desktop\plus\src\Google_Client

PHP fatal error on google php api app engine

二次信任 提交于 2020-01-14 14:22:08
问题 I've a problem with my app engine while I'm trying to implement Google+ PHP API , it gives me a fatal error in curl file "Goolge_IO.php" it's one of the library files which was provided on https://code.google.com/p/google-api-php-client/ Here's the detailed error Fatal error: Uncaught exception 'Exception' with message 'Google CurlIO client requires the CURL PHP extension' in C:\Users\joker\Desktop\\plus\src\io\Google_CurlIO.php:47 Stack trace: #0 C:\Users\joker\Desktop\plus\src\Google_Client