Skip to main content

Initial setup for Google Ads Reader

This section explains how to enable Google APIs, configure OAuth 2.0 credentials, obtain a refresh token, and set up a reusable Striim connection profile so the Google Ads Reader can authenticate securely and access your Google Ads data.

Prerequisites

  • Access to a Google Cloud project tied to the Google Ads account(s) you will read.

  • Enable the following APIs in Google Cloud Console for your project:

    • Google Ads API

    • Google Drive API

Create OAuth client credentials (Client ID and Client secret)

  1. Open Google Cloud Console and select your project.

  2. Go to APIs & Services > Credentials and click Create Credentials.

  3. Select OAuth client ID. If prompted, configure the OAuth consent screen.

  4. Choose an application type (for example, Web application) and add an authorized redirect URI (for example, http://localhost:9080 or another URI you control).

  5. Click Create. Copy and securely store the generated Client ID and Client secret.

Obtain an OAuth refresh token

You can use Google’s OAuth 2.0 Playground to obtain a refresh token. If you encounter 400-series errors, build a custom authorization URL and exchange the returned code for tokens.

Option A: Use OAuth 2.0 Playground

  1. Open the OAuth 2.0 Playground and select the scope https://www.googleapis.com/auth/adwords.

  2. Authorize and exchange the authorization code for tokens. Copy the refresh token for use in Striim.

Option B: Build a custom authorization URL

Construct a URL using the base:

https://accounts.google.com/o/oauth2/v2/auth
?redirect_uri=http://localhost:9080
&prompt=consent
&response_type=code
&client_id=<CLIENT_ID>.apps.googleusercontent.com
&scope=https://www.googleapis.com/auth/adwords
&access_type=offline
  1. Navigate to the URL, grant consent, and capture the code from the redirect URI.

  2. Exchange the code for tokens by making a POST request to https://accounts.google.com/o/oauth2/token with the following parameters: client_id, client_secret, grant_type=authorization_code, redirect_uri, and code.

Example (form-encoded):

POST https://accounts.google.com/o/oauth2/token
  client_id=<CLIENT_ID>.apps.googleusercontent.com
  client_secret=<CLIENT_SECRET>
  grant_type=authorization_code
  redirect_uri=http://localhost:9080
  code=<AUTHORIZATION_CODE>

The response includes an access_token and a refresh_token. Store the refresh token securely.

Set up a connection profile in Striim

A Striim connection profile stores authentication details for reuse across applications. Creating a profile for Google Ads avoids re-entering credentials.

  1. In the Striim UI, navigate to Manage > Connection Profiles.

  2. Click Add Connection Profile.

  3. Enter a descriptive Profile name (for example, GoogleAdsProfile).

  4. Select Endpoint type as Google Ads.

  5. Provide the required OAuth credentials:

    • Client ID: the OAuth client ID you created in Google Cloud.

    • Client Secret: the OAuth client secret.

    • Refresh Token: the refresh token obtained earlier.

  6. (Optional) Specify account identifiers as needed for your use case:

    • Manager ID (MCC) when access is inherited from a manager account.

    • Client Customer ID for one or more specific Google Ads accounts (comma-separated when supported).

  7. Click Test Connection to verify credentials, then click Save.

Note

When using a connection profile in an application, set the reader’s Use connection profile option to True and select the profile name.