title: What's the difference between api key, client id and service account?
body: <p>I needed to access a Google's service, i.e. Google Analytics, from my Symfony 2 application, so I had to use the Google api client (version 2). Before accessing Google Analytics' info, I had to create either a api key, a client id or a service account in the Google API Console.</p>
  
  <p>At the end, I created a service account, and a file was downloaded. This file is used by the Google api client to grant access to my Google Analytics account and its respective collected info.</p>
  
  <p>My question are:</p>
  
  <ol>
  <li><p>What are the differences between api key, client id and service account? </p></li>
  <li><p>When to create/use one over the other, and why?</p></li>
  </ol>
  
  <p>I've not seen any exhaustive article which explains what I'm asking in this question.</p>