I'm using the following code to connect and make my requests to G-API:
require_once '/google-api/vendor/autoload.php';
putenv('GOOGLE_APPLICATION_CREDENTIALS=/mySecretFile.json');
$client = new Google_Client();
$client->useApplicationDefaultCredentials();
$client->addScope("https://www.googleapis.com/auth/drive");
$service = new Google_Service_Drive($client);
$files = $service->files->listFiles()->getFiles();
foreach($files as $file){
print_r($file);
}
I tried this code a couple of times, and all of them the result comes with just 1 file, which I believe it's no mine, since it doesn't exist in my drive, so what's happening? There is the image of the only file I'm getting.