> ## Documentation Index
> Fetch the complete documentation index at: https://nango-marcin-nan-6306-mcp-tool-connections-get.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How to register your own Google Ads OAuth app

> Register an OAuth app with Google for Google Ads and obtain credentials to connect it to Nango

This guide shows you how to register your own app with Google to obtain your OAuth credentials (client ID & secret). These are required to let your users grant your app access to their Google Ads accounts.

<Info>
  You will need to pass a security review to go live with your integration.

  [Follow our guide](/api-integrations/google-shared/google-security-review) to get approved as fast as possible.
</Info>

## Create your OAuth App

<Steps>
  <Step title="Create a Google Cloud account">
    If you don't already have one, sign up for a [Google Cloud account](https://console.cloud.google.com/).
  </Step>

  <Step title="Create a new project">
    1. Go to the [Google Cloud Console](https://console.cloud.google.com/).
    2. Click on the project dropdown at the top left of the page.
    3. Click **New Project**.
    4. Enter a **Project Name** for your project.
    5. Under **Location**, select the appropriate organization or folder where this project should belong.
       <Note>If you're not part of an organization, it will default to No organization</Note>
    6. Click **Create** and wait for the project to be created.
    7. Select it from the project dropdown.
  </Step>

  <Step title="Enable the APIs you need">
    1. Go to the [API Library](https://console.cloud.google.com/apis/library) in the Google Cloud Console.
    2. Search for **Google Ads API** and click **Enable**.
  </Step>

  <Step title="Configure the OAuth consent screen">
    1. Go to **APIs & Services** > **OAuth consent screen** in the Google Cloud Console.
    2. Click **Get started**.
    3. Fill in all the required fields in the **App Information** form.
    4. Click **Next**. Select the appropriate Audience:
       * **External**: For applications available to any Google user
       * **Internal**: For applications restricted to users within your Google Workspace organization
    5. Click **Next**. Fill in the **Contact Information**; these are the email addresses that Google will use to notify you about any changes to your project.
    6. Click **Next**, then check the **I agree to the Google API Services: User Data Policy** checkbox, and click **Continue**.
    7. Add the scopes your application needs. Under **Data Access**, click **Add or Remove Scopes** and select the scopes that correspond to the APIs you enabled.

    <Note>Make sure to select scopes based on the APIs you enabled earlier when setting up the app. See [Google's OAuth 2.0 Scopes documentation](https://developers.google.com/identity/protocols/oauth2/scopes) for all available scopes.</Note>

    8. Under **Audience**, click **Add users** if you selected **External** user type (required for testing before verification).

    <Warning>In "Testing" mode with an external user type, refresh tokens expire in 7 days unless only basic scopes are used (userinfo.email, userinfo.profile, openid, or their [OpenID Connect equivalents](https://developers.google.com/identity/protocols/oauth2/scopes#openid-connect)). You can remove this 7-day limit by switching from Testing to Production in step 8 below.</Warning>
  </Step>

  <Step title="Create OAuth 2.0 credentials">
    1. Go to **APIs & Services** > **Credentials** in the Google Cloud Console.
    2. Click **Create Credentials** and select **OAuth client ID**.
    3. Select **Web application** as the application type.
    4. Enter a name for your OAuth client.
    5. Under **Authorized redirect URIs**, add `https://api.nango.dev/oauth/callback`.

    <Note>While setting up the OAuth credentials, the *Authorized JavaScript origins* should be your site URL (`https://app.nango.dev` if you're testing from the Nango UI).</Note>

    6. Click **Create**.
    7. A dialog will appear with your client ID and client secret. Save these credentials securely as you'll need them when configuring your integration in Nango.

    <Note>Google allows up to 100 refresh tokens per account per OAuth client ID. New tokens overwrite the oldest without warning when the limit is reached.</Note>
  </Step>

  <Step id="get-developer-token" title="Get your Google Ads developer token">
    The Google Ads API requires a developer token on every request, separate from your OAuth client ID and secret.

    1. Sign in to a [Google Ads manager account](https://ads.google.com/) (create one if you don't already have one).
    2. Go to **Admin** > **API Center**.
    3. Copy your developer token.

    <Note>New developer tokens start at "Test Account Access," which only works against Google Ads test accounts. To use it with real (production) accounts, apply for Basic or Standard access from the same API Center page — this can take a few days to be approved. See [Google's access levels documentation](https://developers.google.com/google-ads/api/docs/api-policy/access-levels) for details.</Note>

    <Note>If you access your users' Google Ads accounts through a manager (MCC) account, you'll also need that manager account's customer ID (without hyphens) — this is `login_customer_id`. If every one of your end users brings their own manager account instead, you can skip this step and let them enter it during connect.</Note>
  </Step>

  <Step id="apply-developer-token" title="Apply your developer token to every connection">
    The developer token isn't something Nango asks each end user for — it belongs to your app, not to any individual Google Ads account. Set it once as a [connection config default](/reference/backend/http-api/connect/sessions/create) instead:

    ```json theme={null}
    {
        "integrations_config_defaults": {
            "<INTEGRATION-ID>": {
                "connection_config": {
                    "developer_token": "<YOUR-DEVELOPER-TOKEN>"
                }
            }
        }
    }
    ```

    If you also always access accounts through the same manager account, include `login_customer_id` in the same object so it's set automatically instead of shown in the Connect UI:

    ```json theme={null}
    {
        "integrations_config_defaults": {
            "<INTEGRATION-ID>": {
                "connection_config": {
                    "developer_token": "<YOUR-DEVELOPER-TOKEN>",
                    "login_customer_id": "<YOUR-MANAGER-ACCOUNT-CUSTOMER-ID>"
                }
            }
        }
    }
    ```

    If your end users each have their own manager account instead, leave `login_customer_id` out of the defaults — it'll appear as an optional field in the Connect UI for them to fill in themselves.

    <Accordion title="For agents">
      Pass `developer_token` under `integrations_config_defaults.<INTEGRATION-ID>.connection_config` when creating a connect session via the [create connect session API](/reference/backend/http-api/connect/sessions/create) — it's marked `automated: true` in the provider config, so it never appears in the Connect UI and must be supplied by your backend at session-creation time.

      `login_customer_id` is a regular, optional `connection_config` field, not automated. Include it in the same defaults object if your integration always uses one fixed manager account; omit it if it varies per end user, and it'll be collected in the Connect UI instead.
    </Accordion>
  </Step>

  <Step title="Start building your integration">
    Follow the [*Quickstart*](/getting-started/quickstart) to build your integration.
  </Step>

  <Step title="Verify your app">
    Most Google Ads scopes are marked "sensitive" by Google.

    You can develop your integration in test mode, but you need to pass a security review to go live.

    [Follow our guide](/api-integrations/google-shared/google-security-review) to prepare and pass as quickly as possible.

    <Note>For applications using sensitive or restricted scopes, Google requires verification and a security assessment. This process can take several weeks to complete.</Note>
  </Step>

  <Step title="Publish your app (switch from Testing to Production)">
    To move your OAuth app from testing to production:

    1. Go to **APIs & Services** > **OAuth consent screen** > **Audience**.
    2. Click **Publish App** to switch your app from testing to production.
  </Step>
</Steps>

## Important considerations

**Refresh token expiration**

For information on why Google refresh tokens expire, see [Why is my Google refresh token expiring?](https://www.nango.dev/blog/google-oauth-invalid-grant-token-has-been-expired-or-revoked#why-was-the-refresh-token-revoked). For Google OAuth basics, see [Google's OAuth 2.0 documentation](https://developers.google.com/identity/protocols/oauth2).

For more details on Google Ads scopes and API implementation, see [Google Ads API documentation](https://developers.google.com/google-ads/api/docs/start).

***
