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
79
votes
2 answers

Google Calendar Push Notifications SetUp

I'm trying to setup a Push Notifications for Google Calendar using PHP and V3 api. I've got the Auth2.0 Permission and I'm able to create events on google from my application. Now I want to know when a user makes any change on google calendar (CRUD…
72
votes
4 answers

Google Analytics API - Get page view information for specific URLs

I am looking to implement a page view tracking system on one of my websites. The website is a directory where suppliers can advertise their services. Suppliers have a unique profile page on the site, e.g mysite.com/directory/abc-profile.html The…
MAX POWER
  • 5,213
  • 15
  • 89
  • 141
68
votes
10 answers

Token must be a short-lived token and in a reasonable timeframe

I am having the same error as this. In my case it is happening when the app is trying to upload a file via Google Cloud Client API. POST https://www.googleapis.com/oauth2/v4/token 400 Bad Request Invalid JWT: Token must be a short-lived token and in…
wataru
  • 1,049
  • 1
  • 11
  • 19
36
votes
11 answers

Google Client Invalid JWT: Token must be a short-lived token

I am using Google's php api client. I am running through the quickstart guide for service accounts. I followed the steps perfectly (as far as I can tell). I am running into the following error: { "error": "invalid_grant", …
ajon
  • 7,868
  • 11
  • 48
  • 86
35
votes
5 answers

Gmail API returns 403 error code and "Delegation denied for "

Gmail API fails for one domain when retrieving messages with this error: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 OK { "code" : 403, "errors" : [ { "domain" : "global", "message" : "Delegation denied for…
30
votes
2 answers

What's the difference between api key, client id and service account?

I needed to access a Google's service, i.e. Google Analytics, from my Symfony 2 application, so I had to use the Google api client (version 2). Before accessing Google Analytics' info, I had to create either a api key, a client id or a service…
nbro
  • 15,395
  • 32
  • 113
  • 196
25
votes
2 answers

Youtube PHP APi Check VIdeo Is Duplicate Or Not

Hi I am using Google PHP API to upload video in PHP. I have followed this tutorial to implement this and it is working fine. But there is a problem if video is already exist in my channel it is also returning the video details and I can't find it is…
Bik
  • 553
  • 10
  • 31
25
votes
4 answers

Get Userinfo from Google OAuth 2.0 PHP API

I am trying to use Google Oauth API to get userinfo. It works perfectly for Google Plus API but I am trying to create a backup in case the user doesn't have google plus account. The authentication process is correct and I even get the $userinfo…
Kshitiz
  • 2,852
  • 5
  • 32
  • 41
23
votes
5 answers

Reading messages from Gmail, in PHP, using Gmail API

I have donwloaded new Gmail API source code from Google PHP client library. I inititalized the service using: set_include_path("./google-api-php-client-master/src/".PATH_SEPARATOR.get_include_path()); require_once 'Google/Client.php'; …
Anandhan
  • 422
  • 5
  • 12
  • 22
23
votes
4 answers

Upload video to Youtube using Youtube API V3 and PHP

I am trying to upload a video to Youtube using PHP. I am using Youtube API v3 and I am using the latest checked out source code of Google API PHP Client library. I am using the sample code given on https://code.google.com/p/google-api-php-client/ to…
jayendrap
  • 553
  • 1
  • 4
  • 10
21
votes
3 answers

Google Calendar API v3 - authenticate with hardcoded credentials

I am writing a PHP application that's supposed to allow users to add certain events to a private Google Calendar. The calendar is owned by me, and I need a way for PHP to communicate with the calendar API using fixed credentials (everyone can add…
21
votes
3 answers

Google Drive PHP API - Simple File Upload

I am trying to write a small script to upload a local file to Google Drive, using Google Drive PHP API. The documentation is very poor maintained, but so far I am pretty sure the code should be looking like that:
mirosoft
  • 285
  • 1
  • 2
  • 7
20
votes
3 answers

Google API: 404 Domain not found

I am new to working with Google API but I have a project that requires me to access their domain to find a user's manager by email. Before I started on the code I wanted to set everything up so I followed the example file for PHP. I was able to get…
Jeremy
  • 1,878
  • 2
  • 30
  • 54
19
votes
4 answers

Google OAuth 2.0 "error" : "redirect_uri_mismatch"

I spend already one day, crashed one glass and I am really angry about it, I do not understand what google want from me, and what is wrong. I've enabled Google+ Api in developers console , created new OAuth Client ID $ch =…
Unstaged
  • 449
  • 2
  • 5
  • 14
19
votes
1 answer

Use service account to verify Google InAppPurchase

I want to verify an inAppPurchase that has been made in my Android app. I created a new service account in the Google API console. a. The service account is listed under permissions and has "can view" permission I'm using the most current version…
glutorange
  • 993
  • 1
  • 10
  • 17
1
2 3
99 100