2,139 questions
0
votes
0
answers
45
views
Service accounts cannot invite attendees without Domain-Wide Delegation of Authority - but NOT inviting any
Getting this error when Patching an event with new attendees. BUT we are NOT inviting attendees (sendNotifications is false, and sendUpdates = 'none').
We cannot do Domain Wide Delgation (nor do we ...
1
vote
1
answer
181
views
Google Auth with Google Identity Services in the front end deprecation confusion [duplicate]
I'm having a hard time understanding what is and what is not deprecated.
In the The Google API client, if you click on the "auth" guide, you end up with a message "gapi.auth2 has been ...
0
votes
1
answer
70
views
How to use a Google Service Account with Admin SDK?
I would like to use the Members function of the Admin SDK of Google. I'm using PHP and Codeigniter 3. I created a Service Account in the Google Cloud Console.
My Codeigniter model:
use Google\Client ...
1
vote
1
answer
130
views
Google directory API returns 403: "Not Authorized to access this resource/api" for OAuth client in PHP web app
I have a web app made with PHP (Laravel more specifically, but doesn't really matter) where I am implementing Google OAuth 2.0 authentication for users in customer Google Workspaces.
I have created an ...
0
votes
0
answers
80
views
google api php client re-use user token to call service as user after login?
When login with Google and using Google API Client PHP, I exchange a code and obtain token and user_id. I save the token and user_id for that user.
<script src="https://accounts.google.com/gsi/...
0
votes
0
answers
71
views
Google Sheets API - Unable to style BOTTOM_AXIS (text color and font size) after updating chart range
I'm working with the Google Sheets API to update a chart's data range and axis styling. The data range update works fine, but changes to the BOTTOM_AXIS text style (e.g., setting font size to 50 and ...
1
vote
1
answer
124
views
CodeIgniter 4.5.5 - Uncaught Error: Class "CodeIgniter\Log\Logger" not found -
I have installed CodeIgniter using downloaded zip file. I am trying to integrate google sign in in the application.
I have included the google-php-client using the code as below.
<?php namespace ...
1
vote
1
answer
115
views
Google Calendar Add Event in PHP
I am new to Google Calendar API, and am having a tough time getting the program to work. I am trying to build a webpage to allow other users to book appointments, and the appointment will be auto ...
0
votes
1
answer
120
views
Creating google user in php: Not Authorized to access this resource/api
I want to create a google workspace user for my organization from PHP google library, but my code show a 403 error:
{ "error": { "code": 403, "message": "Not ...
0
votes
1
answer
139
views
Google Calendar API: Requesting only existing events
I'm hoping someone can pint me in the right direction. I am succesfully pulling events, calendars, multiple calendars, etc, uding the Google Calendar API. However, the results are showing each and ...
0
votes
1
answer
67
views
Get file name from id with Google Drive PHP Library
I'm using the Google PHP Library with a service account and I'm trying to get the name of a document in a shared team drive by using the document ID. The service account is a content manager on the ...
0
votes
0
answers
65
views
Why is Google Sheets PHP API failing when I insert a line manually in Google Sheets?
I have a PHP script adding lines to a Google Spreadsheet. It all works perfectly fine.
$client = new Google_Client();
$client->setApplicationName("Google Sheets API");
$client->...
1
vote
1
answer
132
views
How to retrieve the page views for a post/page in Google Analytics 4?
I have this page view counter showing the views for the current post. I'm using an Google APIs Client Library for PHP and it worked fine with Google Analytics UA but now that GA4 took place definitely ...
1
vote
1
answer
581
views
Google Drive API 'drives.list' returning error 400 'invalid query'
I am trying to use a service account to view and access Shared Drives using the Google API.
I using PHP with the google/apiclient version v2.16.0 library to access the API.
Here is my code example:
$...
0
votes
1
answer
96
views
How can I filter google ads campaign data with date range filter?
As per my question, I want to filter the campaign's metrics based on the date range filter read the below code:
/**
* Runs the example.
*
* @param GoogleAdsClient $googleAdsClient the Google Ads ...
1
vote
1
answer
1k
views
Google Meet REST API Permission denied on resource Space (or it might not exist) error
I have just configured everything in google cloud console, i am using service account as auth method and i download key file as json. But i am getting this error
"Call failed with message: { &...
0
votes
2
answers
337
views
GoogleAnalytics BetaAnalyticsDataClient Getting INVALID_ARGUMENT: A dateRange is required
I try to get data from Google api and get an error
{ "message": "A dateRange is required.", "code": 3, "status": "INVALID_ARGUMENT", "details&...
0
votes
0
answers
87
views
Google Client API: Uncaught TypeError: Argument must be an instance of RenderAccountIssuesRequestPayload
Data sources
1)
I use this releas https://github.com/googleapis/google-api-php-client/releases of google client api library - for php 7.4
https://prnt.sc/l-WHG_rzCgGt - this one
2)
And use this ...
1
vote
0
answers
289
views
OAUTH_TOKEN_HEADER_INVALID with Google Ads API in PHP using Web client or Service account
I've set up an OAuth2 web project as well as a Service Account. Both IDs have been added with domain-wide delegation with the adwords scope in my Google Workspace.
I have a Google Ads Manager account ...
0
votes
1
answer
61
views
How to get data from play biling api
I have implemented play billing api in my backend, I get success getting startTime but lineItems->expiryTime can't get don't show anything
require_once('autoload.php');
//...
1
vote
1
answer
534
views
Google Drive API download files from shared drive
I am trying to download a file from a shared drive via the Google API. I always get the response that the file was not found (code 404).
This does not work even if I have full access (admin) to the ...
0
votes
1
answer
278
views
Google analytics admin api : The caller does not have permission
Edit : i just add email service account in my dashboard analytics user admin, and its working
So I would like to use google API to create property with datastream. (using laravel)
And I have one issue ...
0
votes
1
answer
108
views
create notification channel using google-api-php-client
I want to create a notification channel so that each time a user is deleted from my workspace my php app gets notified, I'm using the following
<?php
namespace App\Services;
use App\Models\...
0
votes
0
answers
85
views
Create google API creds for Gmail account not service account
i have a code that uses creates a google document:
public function create_content_document(Request $request)
{
$data = $request->all();
$contentId = $data['id'];
// ...
0
votes
1
answer
240
views
503 error when trying to get google doc with many pages
I am facing an issue with Google Drive API.
I am using PHP (version 8.1.27) with the Symfony framework (version 6.4.*) on Ubuntu ( version 22.04.3 LTS). I incorporated the latest Google API library (...
1
vote
2
answers
404
views
Get Invaild Argument Error with Google Wallet API when create a generic base class on PHP
I tried to implement Google Wallet API to create Generic Card Pass with PHP and I'm using the demo code described there: https://github.com/google-wallet/rest-samples/blob/main/php/demo_generic.php . ...
0
votes
1
answer
770
views
How to get the file URL from Google drive in PHP?
I tried to use the Google Drive API quickstart.php and changed part of it to list the file URL. However it didn't work. Can anyone help me?
Here is my code, the last part of the code is to print name, ...
1
vote
0
answers
134
views
Google ID Token verification fails in PHP, but works with tokeninfo endpoint
I'm encountering an issue verifying a Google ID token using the PHP API. The tokeninfo endpoint successfully verifies it, but $client->verifyIdToken($id_token) returns false in my PHP code. I have ...
0
votes
1
answer
657
views
GoogleAPI deprecated Return types
I recently updated PHP to version 8.1 on one of my systems. I have also updated Composer version 2.6.5 2023-10-06 10:11:52, using 'composer update' command (see output:)
> composer update
Loading ...
0
votes
0
answers
274
views
Google Apps Script API: Internal error encountered when creating deployments via POST request
I am trying to create a deployment for a Google Apps Script project using the Google Apps Script API. I am issuing a POST request to https://script.googleapis.com/v1/projects/{scriptId}/deployments as ...
1
vote
2
answers
183
views
Google Drive API PHP resumable
I am using dropzone js with chunking to take a large file and break it up, each one of those pieces are getting sent to PHP and all the pieces of that large file have a mime type application/octet-...
12
votes
2
answers
24k
views
Getting Precondition check failed - when using gmail api with a service account
I'm trying to fetch the gmail inbox directly from backend by a cronjob, with no browser or oauth thing.
here is the error i get
Google\Service\Exception: {
"error": {
"code": ...
0
votes
0
answers
148
views
How To Get Filename In Google Service Drive?
I try to fetch my google drive folder image use in Google_Service_Drive ..i Cannot Understand it's not execute image name fetch it's code is fine.i'think but why it's not fetch any image..
There is a ...
3
votes
2
answers
670
views
Which services to retain in Composer for authenticating with 'Sign In With Google' button using Google's APIs Client Library for PHP?
I'm using Google's APIs Client Library for PHP to enable a Sign In With Google Button and using Composer to install the dependencies.
The client library readme states:
There are over 200 Google API ...
2
votes
1
answer
618
views
PHP BetaAnalyticsDataClient runRealtimeReport empty
If I try the following it ends up empty -- Even though when I log into GA Analytics it will show 2 or 3 current active users in the last 30 mins. (which is the data I am trying to get back)
use Google\...
0
votes
0
answers
266
views
Google Drive API V3: 404 file not found error on download or export the shared PDF
I'm using Google Drive API V3 with PHP and trying to download or export the file which is shared with me by other person. But getting 404 File Not Found error.
Google\Service\Exception: { "error&...
0
votes
1
answer
66
views
Pull google calendar asynchronously
$client = new Client();
$client->setClientId(config('services.google.client_id'));
$client->setClientSecret(config('services.google.client_secret'));
$client->...
0
votes
0
answers
29
views
YouTube API - $videoSnippet->setDescription() function is adds extra slash for every comma ' character
When I'm uploading a title or a description from my webapp through the YouTube API (PHP) its adding a trailing slash ( php escape slash ) before the character
example:
I have a text area that has the ...
-2
votes
1
answer
56
views
Google drive php library issue
I am creating folder inside Google drive with php Google drive library, currently I am setting its permissions to anyone, which is not that I need. I want only person who is owner of that drive who ...
0
votes
2
answers
1k
views
Google Analytics Data API (GA4) Setup - Unable to Read Credential File Despite Correct Path
I have been facing a persistent issue while trying to set up the Google Analytics Data API (GA4) using the quickstart guide provided by Google (quickstart guide).
The specific problem arises when I'm ...
3
votes
0
answers
231
views
Send Push notification to multiple device in single request "google/apiclient"
I have implemented google/apiclient in Laravel. I want to send push notifications to multiple device in single request.
If I use foreach loop then it will create request for each token in array.
$...
1
vote
0
answers
113
views
Why do I need to redo the Google oAuth process even though I have the refresh token
I have a laravel app where i need to import events from Google Calendar API. I am working on the app on my local computer. I have read that if i have the refresh token, the user no more needs to ...
1
vote
2
answers
212
views
the queryParams added in createAuthUrl is not returned
In a Laravel App I try to get permission to save files on a Google Drive. As part of calling the api one can pass query parameters that should be returned.
Like this:
$client = new Client([
...
0
votes
1
answer
276
views
Reading my own Youtube Channel Memberships
I am trying to create a service-side PHP application that simply returns a list of my Youtube channel members. The documentation does not give a clear example on how to use this scope specifically and ...
1
vote
1
answer
417
views
Gmail API with PHP
I'm using the Gmail API for reads emails and just add/remove labels.
I authenticated correctly, I get my access token with 3600 seconds of life.
And here starts the problems... When I try to Refresh ...
1
vote
1
answer
380
views
Create file request results in "Request had invalid authentication credentials", even though client id and secret are valid
I am trying to create a folder in my drive using my Laravel APP. My Google drive credentials are correct but i keep getting this error:
{ "error": { "code": 401, "message&...
2
votes
2
answers
502
views
Fatal error: Uncaught Google_Exception: Invalid client secret JSON file. in /somepath/lib/vendor/google/apiclient/src/Google/Client.php
I have create an OAuth 2.0 Client IDs that looks like this when i download the json:
{
"web": {
"client_id": "topsecretstuff.apps.googleusercontent.com",
"...
1
vote
0
answers
841
views
Google Cloud API - Call to undefined method GuzzleHttp\Utils::chooseHandler()
I just installed the Google Cloud Storage for PHP (https://cloud.google.com/php/docs/reference/cloud-storage/latest) using their recommended composer request (composer require google/cloud-storage). I ...
2
votes
2
answers
1k
views
Google APIClient Class not found using Composer
I´m using composer to install the the google api client Packagist Google API Client.
After I installed it using composer require google/apiclient it installed like normal.
After that I tried to use it ...
0
votes
1
answer
1k
views
Error Message "User does not have sufficient permissions for this profile" while Executing Google Analytics API Code
Hello StackOverflow community,
I am currently working on implementing the Google Analytics API in PHP using the example code provided in this link: https://developers.google.com/analytics/devguides/...