I'm trying to access to the drive with the access token but i didn't success. This is my code
public function indexAction() {
$client = new \Google_Client();
$client->setClientId("5d6c05b0215ae3a30ed95c64a73bbe7785974564");
$cred = new \Google_Auth_AssertionCredentials(
"******@gmail.com",
array('https://spreadsheets.google.com/feeds','https://docs.google.com/feeds'),
file_get_contents("../app/config/google.p12")
);
$client->setAssertionCredentials($cred);
if ($client->getAuth()->isAccessTokenExpired()) {
$client->getAuth()->refreshTokenWithAssertion($cred);
}
$service_token = json_decode($client->getAccessToken());
return $service_token->access_token;
This is the error:
Error refreshing the OAuth2 token, message: '{
"error" : "invalid_client",
"error_description" : "The OAuth client was invalid."
}'
500 Internal Server Error - Google_Auth_Exception
I'm trying to access to the drive with the access token but i didn't success. This is my code public function indexAction() {
This is the error: Error refreshing the OAuth2 token, message: '{ "error" : "invalid_client", "error_description" : "The OAuth client was invalid." }' 500 Internal Server Error - Google_Auth_Exception