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

Not able to Downloading Files using Google Drive API V3

I am facing issue "Call to a member function getBody() on string" I am using following code public function downloadFile($fileId , $name) { try { $content = $this->service->files->get($fileId, array("alt" => "media")); $outHandle…
0
votes
1 answer

Google API revoked grants in unverified app

Our app uses several different Google APIs. The app requests offline access for Google Search Console And Google Analytics. Every now and then the grants given by users are revoked. Several users' grants are revoked, not at the same time, but in a…
Borje
  • 255
  • 5
  • 19
0
votes
1 answer

how to get refresh token for login with google api?

First of all, i am an absolute beginner in google apis. I followed this tutorial along with many other tutorials on the web -> https://www.webslesson.info/2019/09/how-to-make-login-with-google-account-using-php.html and it is successfully working.…
jerry
  • 23
  • 1
  • 8
0
votes
0 answers

How to share private video for a list of emails using YouTube Data API

I need to update an upcoming Broadcast with YouTube Data API. I'm following this guide https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/update Right now I can change all the snippet info with the PHP SDK, but I don't see anywhere…
0
votes
1 answer

How do i refresh google token if expired?

I am Creating YouTube Broadcast and it successfully working. $client = new Google_Client(); $client->setClientId($OAUTH2_CLIENT_ID); $client->setClientSecret($OAUTH2_CLIENT_SECRET); $client->setScopes('https://www.googleapis.com/auth/youtube'); //…
0
votes
0 answers

how do i know youtube live is enabled?

I am creating YouTube Live broadcast link using https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/insert?apix=true I need to check Connected User's YouTube live is enabled or not? not able to find any endpoint here please help.
dev
  • 152
  • 1
  • 10
0
votes
1 answer

YouTube Data API: listLiveBroadcasts doesn't work... why?

I try to use the YouTube API, but when I wish to use the LiveBroadcasts.list API. When I use the same JSON key to list my playlist it's OK... I don't understand why. $client = new \Google_Client(); $client->setAuthConfig(__DIR__ .…
0
votes
1 answer

Google Drive API: Why doesn't uploaded file appear in my Google Drive until I view the webContentLink

I am new to the Google Drive API and have gotten to the point where I have successfully uploaded a file and subsequently am able to list out the file(s) that I uploaded. Something that confused me was that files I uploaded did NOT appear in my…
0
votes
0 answers

Error while Install the Google Client Library

I'm going to working in google drive API and follow this link of google drive API Google api quickstart Turn on the Drive API through the Enable The Drive API and successfully download the credentials.json and save him in my working…
0
votes
0 answers

Google Logging API v2 Authentification troubles

I'm trying to authentificate by OAuth token but i didn't find the way to get it without Google prompt and url redirection. I'm using php and google/apiclient:"^2.7" library I try to get token with it but I didn't find the way to get it. If it's not…
0
votes
1 answer

Gmail API php create label as sublabel

I'm trying to create a gmail label true gmail php api as a sublabel with method: users.labels.create As in the Gmail api reference creating an normal label (not a sublabel) works good. Unfortunately creating a sublabel is not discussed in the…
0
votes
1 answer

How to access G Suite member's calendar by service account

I wanna call Google Calendar API's freebusy.query endpoint by service account in server-side with php and google-api-php-client. First, I opened Google Cloud Platform project page. Then I created service account, downloaded credential JSON file,…
0
votes
1 answer

Merge CSV files on GCS using PHP

I have multiple small CSV files in a GCS bucket. I'm trying to merge those into a single large CSV file. I've seen it can be done using "gsutil compose" command, but I was wondering if that can be done using the PHP Google Cloud Storage API.
justberare
  • 1,003
  • 1
  • 9
  • 29
0
votes
0 answers

update and delete members from the group list in Google Apps not working anymore

This PHP code below has worked for years but since some days ago it has stopped working and I get an error which I show below The purpose of this code is to update and delete members from the group list in Google Apps. I searched a lot on Google but…
0
votes
1 answer

Google Calendar API Token not refreshing

For some reason when my token expires I need to delete the file and reconnect again otherwise nothing is working. Is it because the new token is not stored or? I have the following code: if(!$_GET['id']){ echo print_r('BUSINESS NOT…