jezdez
jezdez

Reputation: 1499

How do I get a list of Google Cloud storage projects of a user via an API?

I'm working on integrating a PaaS product with the Google Cloud Storage API v2 and am very happy that OAuth2 is available. What makes me wonder though is having to specify the "x-goog-project-id" header on each request since that implies that my product's users provide that number additionally to the nice OAuth2 process. I understand that I could ask the user of my product to press the "Make this my default project for interoperable storage access" button to enable the v1 access, but that's rather user unfriendly and doesn't sounds very future-proof, too.

Instead I wondered whether there is a way to use the user's OAuth2 access token to retrieve a list of Cloud Storage projects the user has access to. I could then let the user decide which project to use. Does such an API exist? How likely is it that such an API will be provided in the future? Is there any other way to handle this particular problem?

Upvotes: 3

Views: 146

Answers (1)

Brian Dorsey
Brian Dorsey

Reputation: 4688

There is no API to list a user's Cloud Storage projects. The user will have to give you their project ID.

Upvotes: 1

Related Questions