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-oauth
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:
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
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
Why Google Drive API constantly requests login?
I’m working with google drive ap using Oauth. This works, however every day it ask my user for consent again and waits for me to login to my google account. Why do I need do this every day? Is this working as intended, i just want to be sure i’m not doing anything wrong. Answer This is because your code
Google Calendar API Token not refreshing
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
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($…