Google API Fatal error: Uncaught LogicException: refresh token must be passed in or set as part of setAccessToken
Working with the PHP Quickstart code, I found a problem: when the token needs to be refreshed, the code returns the following error: Fatal error: Uncaught LogicException: refresh token must be passed in or set as part of setAccessToken in /app/vendor/google/apiclient/src/Google/Client.php:258 Stack trace: #0 /app/gmail.php(32): Google_Client->fetchAccessTokenWithRefreshToken(NULL) #1 /app/test.php(14): getClient() #2 {main} thrown in /app/vendor/google/apiclient/src/Google/Client.php on line 258 I modified the getClient() function like this: function getClient() { $client = new Google_Client()