google-api-php-client

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

末鹿安然 提交于 2020-01-20 06:03:05
问题 I am facing an issue with quickstart php script here: https://developers.google.com/drive/v2/web/quickstart/php 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

Updating Google Calendar event

耗尽温柔 提交于 2020-01-17 05:32:29
问题 I have been reading over the internet, but none of the codes work, to update an event. The event ID is sent from an other page. And this works. $eventId= $_GET['id']; $event = new Google_Event($service->events->get($calendarId, $eventId)); $event->setLocation('Home'); $event->setSummary('Summary'); //$start = new Google_EventDateTime(); //$start->setDateTime($fstart); //$event->setStart($start); //$end = new Google_EventDateTime(); //$end->setDateTime($ssend); //$event->setEnd($fEnd);

Python Google Analytics Management API throws error 403 Forbidden

不羁的心 提交于 2020-01-16 09:05:06
问题 I want to create an automated product data import for Google Analytics using the managament api (google analytics api v3) and python. Now, I am facing the follwing issue: There was an API error : 403 : Forbidden My oAuth works, because I can pull data from analytics. My account should also have sufficient user permissions, because I have created the same function with App Scripts and it worked (using the same property, account and customdatasourceId). There must be something wrong with line

Resumable Upload gets interrumpted after few GB

允我心安 提交于 2020-01-15 15:35:27
问题 I have a function in php to upload several files through a stand alone script, the first ones upload fine but the last one that's 16GB around 20 minutes it gets interrumpted for no reason and the upload stops. The auth is already handled, so I don't know what may be causing this issue. Here's the code and the error that it outputs: function insertFile($client,$service,$filePath,$name,$fId){ $file = new Google_Service_Drive_DriveFile(); $file->title = $name; $parent = new Google_Service_Drive

Resumable Upload gets interrumpted after few GB

早过忘川 提交于 2020-01-15 15:33:39
问题 I have a function in php to upload several files through a stand alone script, the first ones upload fine but the last one that's 16GB around 20 minutes it gets interrumpted for no reason and the upload stops. The auth is already handled, so I don't know what may be causing this issue. Here's the code and the error that it outputs: function insertFile($client,$service,$filePath,$name,$fId){ $file = new Google_Service_Drive_DriveFile(); $file->title = $name; $parent = new Google_Service_Drive

Find list of Members in group using google api services

我的梦境 提交于 2020-01-15 08:43:22
问题 <?php include_once "templates/base.php"; session_start(); require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php'); $client_id = '*******'; $client_secret = '*******'; $redirect_uri = '*********'; $client = new Google_Client(); $client->setClientId($client_id); $client->setClientSecret($client_secret); $client->setRedirectUri($redirect_uri); $client->addScope("https://www.googleapis.com/auth/admin.directory.group"); $directory = new Google_Service_Directory($client); if (isset

Google Drive V3, Google API client 2.0 - batch upload is failing

淺唱寂寞╮ 提交于 2020-01-15 05:03:50
问题 Batch upload fails using Google Drive V3 with master branch of API (v2.0). I've modified https://github.com/google/google-api-php-client/blob/master/examples/batch.php with service account credentials. The code: include_once __DIR__ . '/../vendor/autoload.php'; include_once "templates/base.php"; echo pageHeader("Batching Queries"); // USE TRUE OR FALSE TO TOGGLE BETWEEN BATCHED AND SEQUENTIAL UPLOADS. $useBatch = true; $client = new Google_Client(); $client->setScopes([ 'https://www

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

Updating in datastore not working in GAE 1.9.0

只谈情不闲聊 提交于 2020-01-14 10:42:07
问题 We have a PHP application running on GAE. It connects to Cloud Datastore using the Google PHP library (v0.6.7). Google introduced in the last days a new version of App Engine, v1.9.0 (not oficially released), which apparently was running fine, just as 1.8.9 was. However, we have been experiencing some issues related to Cloud Datastore. Sometimes, all the operations regarding to entities updating are just ignored. All the queries used to retrieve information work perfectly, however if we want