What’s the difference between api key, client id and service account?

This thread is old, but still adding the information. Might help others in future.

Google needs unique identifier to tie it to your project (with your android package) for authentication and to manage traffic or quotas.

Oauth and API key are such unique identifiers.

OAuth 2.0 client IDs: If your application is using OAuth 2.0 protocol, then use OAuth client ID.
OAuth is used to create the Access token, which in turn is a unique identifier. However, the user needs to agree a consent.
https://developers.google.com/identity/protocols/OAuth2

API keys: An API key is a unique identifier that you generate using the console. The advantage is the user does not require an user action or consent. But you cannot use the API key for authorization unlike OAuth. Use an API key when the data you want is public and does not need a user authentication, such as Google maps.

Service Account : Google APIs such as the Prediction API and Google Cloud Storage can act on behalf of your application without accessing user information. In these situations your application needs to prove its own identity to the API, but no user consent is necessary. Similarly, in enterprise scenarios, your application can request delegated access to some resources.
For these types of server-to-server interactions you need a service account.
https://developers.google.com/identity/protocols/OAuth2#serviceaccount

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)