Hello.I am trying to access the Cloud Storage API (en route to the Prediction API) from a Java application using a service account. When I attempt to execute a command, the response contains the following error:com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden{"code" : 403,"errors" : [ {"domain" : "usageLimits","message" : "Access Not Configured","reason" : "accessNotConfigured"} ],"message" : "Access Not Configured"}Checking these forums and Stack Overflow for other encounters with this issue, the common response seems to be that I simply need to enable Cloud Storage API access in my APIs Console. Unfortunately, I have already done this. Since this is the only project with which I am working, there's no chance I have confused the credentials with that of another project either.
The following is the Java code that I've been using, simplified and with confidential constant values obfuscated. The first block sets up a GoogleCredential object using the service account information, copied from the APIs console. The second sets up the Storage manager. The third attempts to create a new bucket, but produces the error.GoogleCredential credential = new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT).setJsonFactory(JSON_FACTORY).setServiceAccountScopes(StorageScopes.DEVSTORAGE_FULL_CONTROL).setServiceAccountPrivateKeyFromP12File(new File("xxxxxxx.p12")).build();Storage storage = new Storage.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential).setApplicationName("xxxxxxx").build();Bucket bucket = new Bucket();bucket.setId("test_bucket");return storage.buckets().insert(bucket).execute();I normally focus on the front-end of the applications that my team develops, so I'm afraid that I'm overlooking or omitting something simple, in this case. Any advice would be appreciated.
Thank you very much.--
Hello.I am trying to access the Cloud Storage API (en route to the Prediction API) from a Java application using a service account. When I attempt to execute a command, the response contains the following error:com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden{"code" : 403,"errors" : [ {"domain" : "usageLimits","message" : "Access Not Configured","reason" : "accessNotConfigured"} ],"message" : "Access Not Configured"}Checking these forums and Stack Overflow for other encounters with this issue, the common response seems to be that I simply need to enable Cloud Storage API access in my APIs Console. Unfortunately, I have already done this. Since this is the only project with which I am working, there's no chance I have confused the credentials with that of another project either.
The following is the Java code that I've been using, simplified and with confidential constant values obfuscated. The first block sets up a GoogleCredential object using the service account information, copied from the APIs console. The second sets up the Storage manager. The third attempts to create a new bucket, but produces the error.
GoogleCredential credential = new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT).setJsonFactory(JSON_FACTORY)
.setServiceAccountScopes(StorageScopes.DEVSTORAGE_FULL_CONTROL).setServiceAccountPrivateKeyFromP12File(new File("xxxxxxx.p12")).build();Storage storage = new Storage.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential).setApplicationName("xxxxxxx").build();Bucket bucket = new Bucket();bucket.setId("test_bucket");return storage.buckets().insert(bucket).execute();
I normally focus on the front-end of the applications that my team develops, so I'm afraid that I'm overlooking or omitting something simple, in this case. Any advice would be appreciated.
Thank you very much.
Was this issue resolved? I too am facing the same issue. I would like to know how to get past this..
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden{"code" : 403,"errors" : [ {"domain" : "usageLimits","message" : "Access Not Configured","reason" : "accessNotConfigured"} ],"message" : "Access Not Configured"}
Making the request for Google Cloud Storage JSON API is like sending a message in a bottle :)Anyone know how to expedite the request? I was accepted as trusted tester for a new Google service, the service relies on JSON API and I am stuck.Ideas welcome.
--
--