bjornhaa / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

Sample upload of a photo into a public access Cloud bucket #891

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which Google API and version (e.g. Google Calendar API version 3)?
Cloud Storage API v1 (revision 3)

Java environment (e.g. Java 6, Android 2.3, App Engine)?
Android

External references, such as API reference guide?
https://developers.google.com/resources/api-libraries/documentation/storage/v1/j
ava/latest/overview-summary.html

Please provide any additional information below.
Sample upload of a photo into a public access bucket without requiring user 
credential but uses app credential instead.

Original issue reported on code.google.com by DustyRe...@gmail.com on 9 Jul 2014 at 6:40

GoogleCodeExporter commented 9 years ago
Unfortunately we have stopped adding API specific samples on this site. All 
sample requests should be posted on the API specific support site.

However, in your case, you are looking for the Service Account auth flow, which 
uses an app's credential instead of a user's. We do have a sample of using 
Service Account with the Cloud Storage API [1], which should get you started 
easily.

[1] 
https://github.com/GoogleCloudPlatform/cloud-storage-docs-xml-api-examples/blob/
master/storage-serviceaccount-cmdline-sample/src/main/java/StorageServiceAccount
Sample.java

Original comment by wonder...@google.com on 30 Dec 2014 at 3:56