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

"Invalid code" error with YouTube API with PHP

I am trying to set up a YouTube API connection test (with the test code provided by the API). I have: created an API key; created an OAuth and placed the file on my server; the time on my server is well synchronized. And I get the following…
0
votes
0 answers

how to set video file as public in google drive and how to determine when finished processing ? using php

I am trying to create a PHP function that when a file path is given and also a folder name it will upload the file (99.9% of the time is video) and give me the link back. I have managed to do all of these steps, the only problem is before going…
0
votes
1 answer

Youtube Live Stream API: Resolution is Required

My code is creating the Live video on Youtube and returning the Streaming URL. But on this point, it throws the exception: "Resolution is Required" $streamsResponse = $this->youtube->liveStreams->insert('snippet,cdn', $this->live_stream,…
0
votes
1 answer

Google Smart Device API Oauth2 Refresh Token Expires

I am building a server side app to periodically access information from users’ Google devices and notify them when certain criteria are met. I have a few test users signed up, and they have gone through the Google oauth2 login. The app has received…
0
votes
1 answer

Send email results in "missing required authentication"

I'm new to this API and currently trying to send email by Gmail. I have Laravel installed and required by composer google/apiclient:"^2.7". That's how I call create message and send functions $message =…
RedEclipse
  • 123
  • 2
  • 11
0
votes
0 answers

Video uploaded with Youtube API still marked as private after project was approved

I've been struggling with this problem for a while. I'm trying to upload videos to Youtube using the Youtube V3 API. I've added the correct scopes to the OAuth Consent screen and the project was approved recently (went through the whole audit…
0
votes
1 answer

Cannot Create Google Docs using PHP API

$client->setAccessToken($_SESSION['access_token']); $service = new Google_Service_Docs($client); $title = $_SESSION['class'].' - '.date("Y-m-d"); $document = new Google_Service_Docs_Document(array( 'title' => $title …
0
votes
1 answer

Parse error: syntax error, unexpected ':', expecting '{' in . Error when require_once autoload.php

I have problem when trying to connect to google api php client. Although this version was introduced for use with php 5.6 and above, it is actually not true of the structure of php5.6. My php version is 5.6 This is a function that autoload.php runs…
0
votes
1 answer

Fat Free Use Google OAuth + Google API

I'm trying the following thing for quite a while now and am heavily struggling... On a website, I first want to authenticate a user with his Google Account using OAuth. Therefore, I'm using this library. In order to get it working, I used…
0
votes
1 answer

Google Sheet API Access Token Getting Expired

I am new to Google API and trying to follow quick start guide. I have configured My PHP file for same like below function getClient() { $client = new Google_Client(); $client->setApplicationName('Google Sheets API PHP Quickstart'); …
0
votes
0 answers

Is there any specific way to filter Google Drive changes?

I started working with the Google Drive Changes API (https://developers.google.com/drive/api/v3/reference/changes). While my code can track all changes happening in My Drive, I cannot seem to filter out only specific changes like creation of new…
0
votes
1 answer

how to remove/fix the warning from mail "this mail outside the organization" the access given by Google Drive API

public function shareGoogleSheet(Google_Service_Drive $service, string $email, array $role, string $spreadsheetId, string $name) { $newPermission = new Google_Service_Drive_Permission(); $newPermission->setEmailAddress($email); …
0
votes
0 answers

Google Big Query insertAll() returns successful result, but table is empty

I use package which is a part of another package. Here is my base class for writing to google big query table:
A1t
  • 13
  • 5
0
votes
1 answer

Accessing Google sheets through Google Service Account PHP

I am new to the Google APIs and also to somewhat to PHP. I know there has been quite some similar questions, but going through them all in the last few days I didn't manage to handle my problem. I am building an app which reads from and writes to…
0
votes
1 answer

Create a shortcut to file in Google Drive API PHP Client v2

As per Single-parenting behavior changes in Google Drive API, beginning Sept. 30, 2020, you will no longer be able to place a file in multiple parent folders. Now we should Create a shortcut to a Drive file instead. Is it possible to create shortcut…
vatavale
  • 1,470
  • 22
  • 31