> ## Documentation Index
> Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Service Account

> Access the Google API using a Service Account in 2 minutes 💨

> [tab] 🚀 Quickstart
>
> **1. Create an integration**
>
> In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Google Service Account*.
>
> **2. Authorize Google Service Account**
>
> Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then enter your Google Service Account credentials. Later, you'll let your users do the same directly from your app.
>
> **3. Call the Google API**
>
> Let's make your first request to the Google API using your service account (fetch a list of calendars). Replace the placeholders below with your [Environment API key](https://nango.dev/docs/reference/backend/http-api/api-keys.md), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):
>
> > [tab] cURL
> >
> > ```bash theme={null}
> > curl "https://api.nango.dev/proxy/calendar/v3/users/me/calendarList?maxResults=10" \
> >   -H "Authorization: Bearer <NANGO-API-KEY>" \
> >   -H "Provider-Config-Key: <INTEGRATION-ID>" \
> >   -H "Connection-Id: <CONNECTION-ID>"
> > ```
>
> > [tab] Node
> >
> > Install Nango's backend SDK with `npm i @nangohq/node`. Then run:
> >
> > ```typescript theme={null}
> > import { Nango } from '@nangohq/node';
> >
> > const nango = new Nango({ apiKey: '<NANGO-API-KEY>' });
> >
> > const res = await nango.get({
> >     endpoint: '/calendar/v3/users/me/calendarList',
> >     params: { maxResults: 10 },
> >     providerConfigKey: '<INTEGRATION-ID>',
> >     connectionId: '<CONNECTION-ID>'
> > });
> >
> > console.log(res.data);
> > ```
>
> Or fetch credentials dynamically via the [Node SDK](https://nango.dev/docs/reference/backend/backend-sdk/node.md#get-a-connection-with-credentials) or [API](https://nango.dev/docs/reference/backend/http-api/connections/get.md).
>
> ✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.
>
> > [!TIP]
> >
> > Next step: [Embed the auth flow](https://nango.dev/docs/guides/primitives/auth.md) in your app to let your users connect their Google Service Account accounts.

> [tab] 🔗 Useful links
>
> ## Useful links
>
> | Topic | Links |
> | - | - |
> | Authorization | [Guide to connect to Google Service Account using Connect UI](https://nango.dev/docs/integrations/all/google-service-account/connect) |
> | General | [Google Cloud Console](https://console.cloud.google.com/) |
> | | [Google Cloud Documentation](https://cloud.google.com/docs) |
> | Developer | [Using OAuth 2.0 for Server to Server Applications](https://developers.google.com/identity/protocols/oauth2/service-account) |
> | | [How to create a service account](https://developers.google.com/identity/protocols/oauth2/service-account#creatinganaccount) |
> | | [Make a delegated API call](https://developers.google.com/identity/protocols/oauth2/service-account#authorizingrequests) |
> | | [OAuth 2.0 Scopes for Google APIs](https://developers.google.com/identity/protocols/oauth2/scopes) |
> | | [API Library](https://console.cloud.google.com/apis/library) |
>
> > [!NOTE]
> >
> > Contribute useful links by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/google-service-account.mdx)

> [tab] 🚨 API gotchas
>
> *None yet, add yours!*
>
> > [!NOTE]
> >
> > Contribute API gotchas by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/google-service-account.mdx)

> [!NOTE]
>
> Questions? Join us in the [Slack community](https://nango.dev/slack).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.