Whats the difference between using oAuth or Service account for Google services?

I want to connect to Google sheets. I see options for credentials for oAuth and Service account in the docs;

Don’t really understand the difference there.


Perhaps this helps:

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

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

1 Like

That does help, thanks! They should specify this in the n8n documentation too :sweat_smile:

1 Like

Service Account is preferred for integration purposes as in essence it is server to server…daemons…there is no user interaction

1 Like