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: Answer It seems that you are not returning client in case the token expired Modify your code as shown in the quickstart for PHP to
Tag: google-api-php-client
How to get all properties for Google Analytics GA4 accounts
How do I list all properties for all account using Google Analytics GA4 through PHP? For universal analyitcs I’m using the following: However, this method only allows me to retrieve Universal analytics properties, not the new GA4 ones. The official documentation was of no help at all. Answer Google analytics GA4 is not the same as universal analytics. You can
Send email by Google API
I trying to send an email using Google API Send email controller look as public function sendMessage() { $client = self::getClient(); $service = new Google_Service_Gmail($…
How do I use the Google Cloud APIs (directly or using the GCP PHP Client SDK) to List, Add, and Remove Users from a GCP project programmatically?
A brief summary: I have a PHP web application which uses the Google Cloud PHP Client SDK to integrate with Dialogflow. That’s working no problem. I have a need now to let my users access the GCP Dialogflow dashboard directly, and part of that means that they need to be able to add/remove the Dialogflow permissions to users from within
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 …
Getting google calendar, “Service accounts cannot invite attendees without Domain-Wide Delegation of Authority.”
I can create events but when add attendees it returns this error i followed google guide and every thing is done but i can’t figure out what the problem My code I’m using google-api-php-client the error: GoogleServiceException: { “error”: { “errors”: [ { “domain”: “calendar”, “reason”: “forbiddenForServiceAccounts”, “message”: “Service accounts cannot invite attendees without Domain-Wide Delegation of Authority.” } ],
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 to the file with Google Drive PHP Client v2 or anyhow simple with PHP. I have
Google calendar meet link not being created automatically via Google Calendar API (PHP)
Google calendar meet link not being created automatically via Google Calendar PHP API. Google Calendar API stopped creating a hangout meeting link automatically. The same code was working a few months back but not not not. Code Answer Solution In order to create the conference data property in an Event you will have to send a request with the ConferenceDataVersion
PHP Google insert calendar event API
I am using this package : https://github.com/googleapis/google-api-php-client I used to get $meet_link like this from the API but suddenly it started throwing error Infact calendar event has been inserted perfectly but I am not getting $event->conferenceData->entryPoints[0]->uri in response. Infact I am not getting this entryPoints object($event->conferenceData->entryPoints) Answer There seems to be an issue with the conferenceData returned when creating an
Method not found. error when using Google my business API
I am getting 404 from accouts list function by using google api client. I have already access token by using OAuth2.0. In addition to this, I already enable the Google My Business API via https://console.developers.google.com for OAuth 2.0. ■Here is environemnt PHP 7.2.3 Ubuntu 18.04 LTS google/apiclient ^2.5 The function I want to execute is as following. https://developers.google.com/my-business/reference/rest/v4/accounts/list I install