I have a project where the Google Sites API stopped working in March 2019. I am continuously getting the following error message.
I have checked necessary things like API is enabled, scopes and Google Admin API access enabled.
[26-Apr-2019 13:42:02 Europe/Minsk] PHP Fatal error: Uncaught exception 'Google_Auth_Exception' with message 'Error refreshing the OAuth2 token, message: '{ "error": "unauthorized_client", "error_description": "Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested." }
- google-api-php-client\src\Google\Auth\OAuth2.php(314): Google_Auth_OAuth2->refreshTokenRequest(Array)
- google-api-php-client\src\Google\Auth\OAuth2.php(239): Google_Auth_OAuth2->refreshTokenWithAssertion()
- google-api-php-client\src\Google\Service\Resource.php(214): Google_Auth_OAuth2->sign(Object(Google_Http_Request))
- google-api-php-client\src\Google\Service\Directory.php(1703): Google_Service_Resource->call('list', Array, 'Google_S in google-api-php-client\src\Google\Auth\OAuth2.php on line 363
I have not made any changes to my code and to the CREDENTIALS in the Google Developer Console or to the G Suite. What could have gone wrong for the API to stop working suddenly?
Thank you very much in advance.