Ok, i've a simple php page on google appengine with the code in the google PHP doc :
function accessGS(){
$options = [ "gs" => [ "Content-Type" => "text/plain" ]];
$ctx = stream_context_create($options);
file_put_contents("gs://mybucket/myFile.txt", "Hello", 0, $ctx);
return file_get_contents("gs://mybucket/myFile.txt");
}
and i received the error :
Warning: Access Denied in /base/data/home/runtimes/php/sdk/google/appengine/ext/cloud_storage_streams/CloudStorageWriteClient.php on line 116
Warning: file_put_contents(gs://meteo/HelloWorld.txt): failed to open stream: "\google\appengine\ext\cloud_storage_streams\CloudStorageStreamWrapper::stream_open" call failed in ....
Warning: Cloud Storage Error: FORBIDDEN in /base/data/home/runtimes/php/sdk/google/appengine/ext/cloud_storage_streams/CloudStorageReadClient.php on line 285 Warning: file_get_contents(gs://meteo/HelloWorld.txt): failed to open stream: "\google\appengine\ext\cloud_storage_streams\CloudStorageStreamWrapper::stream_open" call failed in /base ...
What does i need for authenticate my simple PHP page on GAE for access data on GS ??