setApplicationName("Client_Library_Examples"); $auth = new Google_Auth_AppIdentity($client); $token = $auth->authenticateForScope(Google_Service_Storage::DEVSTORAGE_READ_ONLY); if (!$token) { die("Could not authenticate to AppIdentity service"); } $client->setAuth($auth); $service = new Google_Service_Storage($client); $results = $service->buckets->listBuckets(str_replace("s~", "", $_SERVER['APPLICATION_ID'])); echo "

Results Of Call:

"; echo "
";
var_dump($results);
echo "
"; echo pageFooter(__FILE__);