Questions tagged [google-api-php-client]

The Google APIs Client Library for PHP provides access to many Google APIs. It is designed for PHP client-application developers and offers simple, flexible, powerful API access.

The Google APIs Client Library for PHP provides access to many Google APIs. It is designed for PHP client-application developers and offers simple, flexible, powerful API access.

Beta

This library is in Beta. We're comfortable enough with the stability and features of the library that we want you to build real production applications on it. We will make an effort to support the public and protected surface of the library and maintain backwards compatibility in the future. While we are still in Beta, we reserve the right to make incompatible changes. If we do remove some functionality (typically because better functionality exists or if the feature proved infeasible), our intention is to deprecate and provide ample time for developers to update their code.

Requirements

  • PHP 5.2.1 or higher
  • PHP JSON extension

Note: some features (service accounts and id token verification) require PHP 5.3.0 and above due to cryptographic algorithm requirements.

Developer Documentation

Google APIs Client Library for PHP

GitHub

2080 questions
0
votes
0 answers

When using "quickstart" genereated crendential to read my gmail, the message I got is "protected "

I follow the guide at https://developers.google.com/gmail/api/quickstart/php. And the crendentials are generated in this page with readonly permission on gmail. But the problem is I can get the labels and message id, but when I want to read the…
0
votes
1 answer

Calendar event only gets created after second attempt

My PHP site creates calendar events for my colleagues. After I get the request to login to my organization (which administers the calendar), the API successfully retrieves the code. However, the first attempt at a redirect results in the following…
0
votes
0 answers

Php Google Drive Api v3 - connection problem (quickstart)

I am trying to implement this code as its written in here: https://developers.google.com/drive/api/v3/quickstart/php I run my php file in command line, it throws and url in command line and i open it in my browser, i log in my account and i allow…
0
votes
1 answer

How to create secondary google calendars using PHP and service accounts?

I am trying to create secondary calendars for a calendar that is shared with a service account. My code is as follows: putenv('GOOGLE_APPLICATION_CREDENTIALS='.__DIR__.'/service_account.json'); define('SCOPES', Google_Service_Calendar::CALENDAR); …
0
votes
1 answer

Running out of YouTube quota what are my options?

I am working customer relationship department and creating an app which is replying to every YouTube comment. So what i am making right now is basically a script which pull comment data from YouTube Data API v3. This script is a looping script…
0
votes
0 answers

How do i get G Suite user's email usage and capacity?

google/apiclient: 2.0 $adminService = new Google_Service_Reports(...); $userUsageReport = $adminService->userUsageReport; I already tried using the Reports but it gives me an inaccurate result, values are not match with the current…
Joel
  • 1
0
votes
1 answer

Sending Google Calendar API Confirmation email

I'm trying to make it so that once an event is created with Google Calendar API and an attendee is added, they will get a confirmation email. Is this possible with the current Google Calendar API? (I'm using PHP for the back end ). I've tried with…
0
votes
2 answers

Class not found while trying to load YouTube PHP API

I've been trying to load up the YouTube API (via Google Client v2.5), but I keep running into an error: "error_message": "Class 'Google_Service_YouTube_Resource_Activities' not found", "location": "[path…
0
votes
1 answer

Can't create an event using google calendar api php

I've followed all the instructions, the php quickstart and the events.insert pages by google; but when i run it the consent form pops up I click allow and then nothing happens bar the consent form resetting.If i change the redirect url to another…
0
votes
0 answers

Adding media to GMB location using GMB API giving error

I am getting this response when I try to post location image in GMB API. For media category of ADDITIONAL, LOGO, COVER it save successfully.But when another Category is selected got this response in return. Categories options are following according…
0
votes
1 answer

Why is the package missing 'AudioEncoding'?

I'm trying to create an Text To Speech service which uses Google API Text-To-Speech. Hee is my code: // Setup Google Client require_once '../../plugins/php/google-api-php-client-2.4.1/vendor/autoload.php'; $client = new…
0
votes
1 answer

Calling google sheets api throws errors localhost currently unable to handle this request. HTTP ERROR 500

First of all sorry for bad english. I am using Google Sheets API for my web project and I am following Google Sheets API documentation. OAuth 2.0 flow is going well and I am getting access token but when control reach the $response =…
0
votes
1 answer

Dosnt work examples in Management API --- exeptions

Goals: list None of the examples work. Although the client library is installed. At the same time, Google_Service_AnalyticsReporting works without errors.
0
votes
1 answer

Google API query files in multiple folders with php

I am trying to query the google drive using multiple folder ids. This is my query $optParams = array( 'pageSize' => 1000 ,'fields' => 'nextPageToken,…
StripyTiger
  • 877
  • 1
  • 14
  • 31
0
votes
1 answer

Google Analytics - setPageSize not change

I tried to run query on Analytics Reporting using the "google/apiclient" and based on example on Google Analytics Reporting v4 documentation. It is returning records, but always only 10. NextPageToken is null in response. Response has only one…