I want to access the google photos via a web server. I.e. My webserver should call the google api and show pictures to me. I have created a service account in google and created also a public/private key. But I am having an issue with the php photos library with the following error message:
Catchable fatal error: Argument 1 passed to Google\Photos\Library\V1\Gapic\PhotosLibraryGapicClient::__construct() must be of the type array, object given
Any ideas how to get the json credentials loaded for the PhotoLibraryClient? Thank you!
putenv('GOOGLE_APPLICATION_CREDENTIALS=myJson.json');
$client = new Google_Client();
$client->useApplicationDefaultCredentials();
$photosLibraryClient = new PhotosLibraryClient($client);