I need a service to manipulate emails in a gmail account within a project developed in PHP Symfony… I found this example : https://github.com/googleapis/google-api-php-client/blob/main/docs/oauth-server.md But more confusing than helping… I wrote this code : src/Service/Gmail.php Then I followed the steps described in Google Workspace for developers : Create a new project : https://developers.google.com/workspace/guides/create-project?hl=en Enable Gmail API : https://developers.google.com/workspace/guides/enable-apis?hl=en Create credentials
Tag: google-api-php-client
Uploading video to youtube stops with no error
I’ll like to upload videos to youtube, I have correctly the token, but never uploads it , gives no error… it stops execution at line $status = $media->nextChunk($chunk); Here is my code: when executing the code, it outputs “YES 1YES 2” , never reaches echo “NOT REACHED”; line…. why? Can I add an exception or something to tell me the
Drive API uploaded file always has zero size with PHP client
I’m trying to upload files into a google drive in a specific folder using a service account. It all appears to work – but the files always show up with 0 size. I’ve found a couple of very similar questions on here but none of the answers have worked. The code I’m using is: With {PARENT_ID} being the ID of
Google Oauth request results in invalid grant error
We have an app with offline access_type token. Yesterday all queries were broken, because authorization failed resulted in a 400 Bad Request response: { “error”: “invalid_grant”, “error_description”: “Bad Request” }). We use SDK Google Ads API Client Library for PHP for any queries to API. Code example: App is in production in google cloud console. What have we already done:
Google Api PHP Client Syntax Error on PHP 7
OS: macOS Big Sur PHP version: 7.4.1 Package name and version: google/apiclient: ^2.12.3 Whenever I switch the PHP version to 7.4.1 I get this error Parse error: syntax error, unexpected ‘static’ (T_STATIC) in /Users/webtechstreet4/Local Sites/fvtest/app/public/wp-content/plugins/form-vibes-pro/vendor/psr/cache/src/CacheItemInterface.php on line 75 The library works great on PHP 8 but gives the above error when switching to PHP 7. Screenshot Answer Actually, I sorted
Updating spreadsheet data with Google Spreadsheet api and php suddenly not working with authentication error
In a form which takes input and updates the value in a spreadsheet. It was working fine before but suddenly stopped working with this error message: According to other questions and answers it is because of authentication problem, but the form was working for 5 years with the same authentication so it is confusing. Is there any other reason for
How fetch access token with auth code for google api using php?
I am working on google docs api and I want to send request and get the auth code which in exchange will give the access token. Below code is working fine but the problem is I have to copy the auth url and paste it to the browser and then from browser url, I am copying the auth code and
Custom Google Analytics API script is working, but running extremely slow
I am working on a project using the Google Analytics API for PHP. Here is what I need to do: We have about 320 client websites that we track in our Google Analytics account. We are running into an issue where the Google Analytics code stops tracking (for various reasons) on some sites, and we would like to catch this
How to export Google analytics data without a view id
For the last 2-3 days i am trying to somehow download the “Pages and screens: Page path and screen class” reports so i can include the data on my management system, I tried to use the Google Analytics API in PHP, here is an example But as mentioned in the code my Google Analytics account doesn’t have Views Here again
Client is unauthorized to retrieve access tokens using this method – Google calendar php api
I have read a lot of articles : Google Calendar API – PHP https://developers.google.com/calendar/quickstart/php and others.. I want to use the service account, I gave permissions for my calendar, I have downloaded the json key. If I use the code from Google, I got: missing the required redirect URI If i use the code: I have: Client is unauthorized to