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
1 answer

Google Server-to-Server OAuth2 PHP example not working

I am following this example to get server-to-server access working between my PHP application and Google Cloud API's, https://developers.google.com/api-client-library/php/auth/service-accounts. In particular, I need to access the Drive API. When I…
DatsunBing
  • 8,684
  • 17
  • 87
  • 172
0
votes
2 answers

Google Cloud Vision Client Library (PHP) Image Labels - Number of results?

I am using the upper mentioned library (Google Cloud Vision Client Library v1) in PHP to assign labels to images... so far so good. It all works, except it returns fewer results than on the google test page... as far as I understand it has to do…
0
votes
1 answer

Access token is same after renew with refresh token

I've been block for two days facing 0auth problems after 1 hour on Youtube api. 401 credential error. $OAUTH2_CLIENT_ID = 'XXXXX'; $OAUTH2_CLIENT_SECRET = 'XXXXX'; $client = new…
Julian
  • 27
  • 1
  • 9
0
votes
1 answer

I get "500 Backend Error" and "400 invalidMetadata" from youtube-api

I use PHP to insert/update the title and description of our video by using youtube-api and I get some problems with it. 1. When I insert/update title and description of video by using zh-Hant or zh-Hans, I get "500 Backend Error." However it works…
0
votes
1 answer

Are there any restrictions on using Google Directory API batch-updates feature?

I created a new group through Admin control panel and use Directory API to add new members in bulk, using batch-update, to the tune of 1000 users. The documentation states that it should be valid. You're limited to 1000 calls in a single batch…
0
votes
0 answers

Google Calendar API not working with private calendar

I have my Google calendar API working well with the following code: private $client; public function __construct() { $this->client = new Google_Client(); $this->client->setAuthConfig(__DIR__ . '/client_id.json'); …
0
votes
2 answers

Need help to understand the new Google Ads API PHP LIB

I try to get the customer manager link from Google Ads API PHP Lib. But they except the Resource_name. What's that ? $client->getCustomerManagerLinkServiceClient()->getCustomerManagerLink(resourceName)->getManagerLinkId(); They have no documentation…
WhyJ
  • 11
  • 6
0
votes
1 answer

Google Classroom api - patch draft grade

Hi everyone this is been driving me mad so I hope you can help I am trying to use patch() to assigne a draft grade to an assignment but keep getting the error (patch) unknown parameter: 'draftGrade' here is my code created in laravel…
0
votes
1 answer

How to impersonate a user and insert a calendar in its behalf using service account?

I'm trying to create calendars and share them with my organization's users using a service account. What I would like to obtain is the ability to manage the created calendars both from my website code (using the service account) and from the regular…
0
votes
0 answers

Add event to Google Calendar via API in PHP

I've installed the Google API via composer and called the function listed here but it is throwing an error. Could you help or provide some example to implement "Add Event", "Delete Event", "Update Event".
Siddharth Jain
  • 118
  • 1
  • 14
0
votes
1 answer

PHP Google API Client updating library problem

I have to update the google/apiclient package 1.0.*@dev to ^2.2. I had this code in version 1.0: $this->_client = new Google_Client(); $this->_client->setAssertionCredentials(new Google_Auth_AssertionCredentials( '__ACCOUNT__', …
0
votes
1 answer

YouTube Live Streaming API V3 when Insert Live Broadcast scheduledStartTime not Work Properly

I have inserted YouTube live broadcast using PHP client library live broad cast inserted successfully but scheduledStartTime is not showing properly according to my timezone when i verify it by clicking on event link on live dashboard page. My time…
0
votes
1 answer

YouTube Live Streaming API Snippet.scheduledStartTime not Working while Creating Live Broadcast

I am creating YouTube live broadcast using API explorer everything is working fine but Snippet.scheduledStartTime is not working fine. My time zone is +05:00 and country is Pakistan. I want to schedule event at 2019-01-18 04:50 PM. I have set the…
0
votes
0 answers

Access Firebase Storage Media Object with PHP and Firebase Auth

In a project I am provided with API endpoints from a Firebase DB. To retrieve data I authenticate a user with email and password (https://firebase.google.com/docs/reference/rest/auth/#section-sign-in-email-password) and then sign every API call with…
0
votes
0 answers

Try to get data from GA, but have timeout error

I try to execute a Pyton code sample from Google developers guide to get data from my Google analytics profile. The json key file is ok and i have it on local folder. Analytics API also connected in developer console. But any time i've Timeout…