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.
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.
My question are:
What are the differences between api key, client id and service account?
When to create/use one over the other, and why?
I've not seen any exhaustive article which explains what I'm asking in this question.