Idiomatic PHP client for Google Cloud Platform services.
Questions tagged [google-cloud-php-client]
9 questions
2
votes
2 answers
Extract data from Google Analytics Data API (Ga4) via oauth2 (consent screen)
Is it possible to extract data from Google Analytics Data API (GA4 accounts) not via service account? I can extract normally using service accounts (example below), but I needed authorization via oauth (consent screen) and I found absolutely nothing…

FBRC
- 163
- 1
- 10
2
votes
3 answers
Google Storage signedUploadUrl, fetching upload url returns: Bad content type. Please use multipart
I want to let my user upload large files directly to Google Storage. According to this documentation I should be able to use the PHP SDK to generate a signed upload url. I do so like this:
$storage = new StorageClient(['keyFilePath' => $myKeyPath…

Kenny Wyland
- 20,844
- 26
- 117
- 229
1
vote
1 answer
I have an ambiguous error with User Rate Limit Exceeded with google-cloud-php-translate for one translation
I am using the following code:
require 'vendor/autoload.php';
use Google\Cloud\Translate\V2\TranslateClient;
$API_KEY='my-key';
$translate = new TranslateClient([
'key' => $API_KEY
]);
// Translate text from english to french.
$result =…

Samir Ahmane
- 830
- 7
- 22
1
vote
1 answer
Google Cloud Vision PHP — Make Batch Request
I need to perform an OCR analysis on an image for an university project.
I am imposed to use PHP, unfortunately, on the Google Cloud Vision Documentation few are the code sample using PHP...
I succeed to perform OCR on one image at time but 80% of…

Rémi Bernard
- 89
- 7
1
vote
0 answers
How to pass options to stream_open in google cloud PHP stream wrapper
I'm trying to serve large audio files from google cloud storage with seeking support.
I have difficulties understanding php fopen and google stream wrapper working together.
When fopen is called it immediately calls stream_open from google…

Iko
- 11
- 1
0
votes
1 answer
Google Cloud PHP App Engine - signedUrl - Expired Token - Custom Error Page
I'm using signedUrl in a PHP App Engine on Goolge Cloud to get the https:// link of stored files in firebase storage using the following code snippet:
$url = $object->signedUrl(
new \DateTime('15 min'),
[
'version' => 'v4',
…

hannes
- 83
- 5
0
votes
1 answer
Why is the package missing 'AudioEncoding'?
I'm trying to create an Text To Speech service which uses Google API Text-To-Speech.
Hee is my code:
// Setup Google Client
require_once '../../plugins/php/google-api-php-client-2.4.1/vendor/autoload.php';
$client = new…
user13271817
0
votes
1 answer
PHP and Protobuf FieldMasks for Google API
I found the documentation just fine, but for the life of me I can't figure out how to set up the FieldMasks in PHP to update a CloudSchedulerClient.
The command should be like this:
$client->updateJob($job, $updateMask); but no matter what I set the…

Tomasz Mieczkowski
- 31
- 7
-2
votes
1 answer
Google Cloud Document AI processing response impossible to get Form Fields in PHP
I cannot get form fields values from processing a response in PHP when using a Google Cloud Document AI with a custom processor where the form fields are defined. google-cloud only has documentation for Java, C#, Pyton... How can I get my data? When…

Filipp30
- 1