We use the resumable upload mechanism in Google Cloud Storage to upload files from App Engine as described on: https://developers.google.com/storage/docs/json_api/v1/how-tos/upload#resumable A nice feature is that it's possible to make GCS generate upload urls from App Engine with an uploadId making it possible to use this URL directly from a client without the need to sign the URL. This works when adding the GAE service account as an GCS API project member.
This mechanism worked very well for a long time, but since today it stopped working with the following error (http 403):
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
So we're a little bit lost now. Could this be related to the GCS incident (Incident Report for GCS Error Rate Spike March 4th)?
Find below the important part of the code we're using to make the first POST (which was working before):
String url = "https://www.googleapis.com/upload/storage/v1beta2/b/"+bucketName+"/o?uploadType=resumable";
connection.setRequestMethod("POST");
connection.setRequestProperty("X-Upload-Content-Type", contentType);
String json = "{\"name\":\""+objectName+"\"}";
connection.setRequestProperty("Content-Length", String.valueOf(json.getBytes("UTF-8").length));
connection.setRequestProperty("Content-Type", "application/json");
List scopes = new ArrayList<>();
scopes.add("https://www.googleapis.com/auth/devstorage.full_control");
AppIdentityService.GetAccessTokenResult accessToken = AppIdentityServiceFactory.getAppIdentityService().getAccessToken(scopes);
connection.setRequestProperty("Authorization", "Bearer "+accessToken.getAccessToken());