Linked Questions

0 votes
1 answer
571 views

Google drive api refresh token issue [duplicate]

I am working on google drive API to create spreadsheet. First time when API authenticate with my gmail account it return me following information: { "access_token":"...
stackers's user avatar
  • 385
20 votes
7 answers
49k views

Authentication on google: OAuth2 keeps returning 'invalid_grant'

I started to configure google calendar on my new application. I almost made an exact copy of the authentication code displayed at google developers ( https://developers.google.com/google-apps/calendar/...
Michiel's user avatar
  • 201
3 votes
3 answers
15k views

Unable to refresh OAuth2 token in PHP, invalid grant

I need to make a PHP script that creates a sigle event on Google Calendar. I had no problems setting up client id, client secret, dev key and creating a new event. My only problem is with OAuth2, in ...
Roberto Milani's user avatar
9 votes
1 answer
1k views

Google api php client code not return refresh token

I have been trying to get refresh token from google api using javascript google client " code " that google return from client side. It returns me the code which i send to the server side. Now from ...
Syed Abdur Rehman Kazmi's user avatar
7 votes
1 answer
2k views

Google API Client and Cronjob

I am using the Google API Client to read emails from Gmail. Now I want to add a Cronjob so it reads every 5 minutes the mails. The problem using the Google API Client is that it needs to allow the ...
Yanick van Barneveld's user avatar
0 votes
1 answer
4k views

Google Drive API refresh token -- Is this the correct way to authenticate with php client library?

I have been searching around and reading the php library to figure out the best way to have permanent authentication after the first initial oAuth request. The code below seems to work fine, but my ...
Chris Muench's user avatar
  • 17.9k
0 votes
1 answer
3k views

PHP Google API Refresh Token

Having a problem with the refreshToken procedure with Google API, upon an expired token is experienced the refreshToken doesn't get an AccessToken. I've already saved the refresh token to the db at ...
Jay Kappa's user avatar
1 vote
1 answer
2k views

Revoke Token OAuth 2 google api

I want to revoke Token to use it for longer time, my code begins with standart redirect -> getToken flow: $code = (array_key_exists('code', $_GET) ? $_GET['code'] : ''); $access_token ...
Jonuux's user avatar
  • 533
1 vote
2 answers
2k views

how to get new access token from refresh token in php

I am using google api to get access token and refresh token. but my question is how to use this refresh token to get new access token then i can again update users detail. I have all credentials and i'...
sakura14's user avatar
2 votes
0 answers
2k views

google analytics custom plugin getting error invalid grant

$client = new Google_Client(); $client->setAuthConfigFile(plugin_dir_url( __FILE__ ) . '/client_secrets.json'); $client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob'); ...
Prafulla Kumar Sahu's user avatar
1 vote
1 answer
1k views

Google PHP API not returning refresh token

I am working on a web application that, among other things, reads the gmail of a signed in user. I am using the Google PHP library to handle authentication, and I am able to fetch emails without ...
BillThePlatypus's user avatar
2 votes
1 answer
1k views

Refreshing Tokens with Google API for Google Calendar v3

I'm trying to use Google API (PHP) to perform a daily sync between a system calendar and the user's Google Calendars. I want a system user to be able to set up access to their calendar once from ...
thebronsonite's user avatar
1 vote
1 answer
2k views

Google API Access Token PHP

I am authenticating a Google Analytics account and retrieving data successfully. However, I want to run a cronjob to get data from the authenticated account once a week but the access token is invalid....
itsliamoco's user avatar
  • 1,048
1 vote
1 answer
2k views

Google AdSense API Refresh Token not working

From here: Google AdSense API asking for log in each time I tried and this worked the first time, but the next day, the script ran and got an error: Uncaught exception 'Google_Auth_Exception' with ...
Don Sevcik's user avatar
0 votes
1 answer
2k views

How to get access token from service account

I am new to google oauth and openid connect,lets say i need service account where users store videos in my youtube channel,i created service as given in docs.but i dont know how to get access token ...
Nishanth G's user avatar

15 30 50 per page