useApplicationDefaultCredentials(); $client->setScopes([Google\Service\Drive::DRIVE]); $drive = new Google\Service\Drive($client); $about = $drive->about->get(['fields' => 'user, storageQuota']); header('Content-Type: application/json'); echo json_encode($about, JSON_PRETTY_PRINT);