I have the following code, modified from Google\'s documentation:
$GOOGLE_APPLICATION_CREDENTIALS = \"./[path].json\"; $_ENV[\"GOOGLE_APPLICATION
Alternatively you can define a path to your json file like this
$client = new Google_Client(); $client->setAuthConfig('/path/to/credentials.json');