title: google service account get key
body: <p>I want to get private key from google api console .</p>
  
  <p>I can do it manually but I  want to do it programmatically in JAVA. </p>
  
  <p>Following references uses the private key file for authentication to google apis.</p>
  
  <p>1) <a href="https://stackoverflow.com/questions/10112939/login-required-401-unauthorized-message-when-calling-the-v3-google-calendar-ap">&quot;Login Required&quot; 401 Unauthorized message when calling the v3 Google Calendar API using a Service Account via OAuth 2.0</a></p>
  
  <p>2) <a href="https://stackoverflow.com/questions/11827817/authenticating-google-api-with-a-service-account-with-java-api">Authenticating Google API with a service account with Java API</a></p>
  
  <p>Once I'll export private key file from google console , I will use it for authentication as mentioned in above links.</p>
  
  <p>I am using google api version 2.0 with Oauth 2.0 in JAVA.</p>