title: How to get project id in Google Cloud Storage
body: <p>I have activated Google Cloud Storage on my Gmail account, then created a new Project. As far as I see, and read from tutorials (<a href="https://developers.google.com/storage/docs/json_api/v1/json-api-java-samples" rel="nofollow">https://developers.google.com/storage/docs/json_api/v1/json-api-java-samples</a>), Client Secrets (client_secrets.json) are related to Projects, not to my account.</p>
  
  <p>Now, while using Java API, there is a way to receive the list of buckets,</p>
  
  <p><a href="https://developers.google.com/storage/docs/json_api/v1/buckets/list" rel="nofollow">https://developers.google.com/storage/docs/json_api/v1/buckets/list</a></p>
  
  <p>Though it asks me to enter the project identifier as parameter.</p>
  
  <p>I checked API documentation, the download client secrets file (client_secrets.json), and Java methods, though nothing is providing me the "Project Identifier" that is related to authenticated client secret's project.</p>
  
  <p>Is there any method to find out on which project I am actively authenticated? I wouldn't want programme user to remember each project's identifier every time they authenticate in Java programme. The client secrets file is already related to a single project.</p>
  
  <hr>
  
  <p>Extra Information:
  Currently I developed a GUI Java application.
  By using Open File Dialog, user selects the downloaded "client_secrets.json" file.
  Then I use that example provided "authorise" method to get <code>Credentials</code> and <code>Storage</code> objects.</p>
  
  <p>After this, I want to list all buckets those are available in current project programmatically. (Current Project = The client_secrets.json is downloaded from a specific project.). But API requires me to enter the project name which doesn't seem to get programmatically.</p>