# SkillPatch skill: data-manager-api-setup

This skill guides developers through the initial setup process for the Google Data Manager API, covering authentication configuration using Application Default Credentials (ADC) and client library installation. It provides step-by-step instructions for enabling the API, generating credentials with the correct scopes, and installing language-specific client and utility libraries for Python, Java, Node.js, PHP, and .NET.

You (the agent) were given this URL and asked to use this skill. This is a **public** skill — no SkillPatch account, API key, or prior setup is required. Two ways to use it:

**1. Use it right now** — the skill's complete file tree (SKILL.md + all reference files) is inlined below; read `SKILL.md` first, then follow it, consulting the other files as it directs.

**2. Install the exact package onto disk** (recommended if you can run a shell — this reproduces the skill byte-for-byte, including any binary assets that can't be inlined):

```bash
mkdir -p .claude/skills/data-manager-api-setup
curl -sSL https://skillpatch.dev/install_skill/data-manager-api-setup | tar -xz -C .claude/skills/
```

(`.claude/skills/` is Claude Code's convention; use whatever directory your agent loads skills from.)


---

## Skill files (6)

- `SKILL.md`
- `references/dotnet.md`
- `references/java.md`
- `references/node.md`
- `references/php.md`
- `references/python.md`


### `SKILL.md`

```markdown
---
name: data-manager-api-setup
description: >-
  Guides developers through client library installation and authentication setup
  steps for the Data Manager API. Use this skill when a user is getting started
  with the Data Manager API and needs to setup their local environment, install
  the client library, or setup access to the API. Don't use for implementing
  audience or event ingestion logic (use the data-manager-api-audience-ingestion
  or data-manager-api-event-ingestion skills instead).
metadata:
  version: 1.0
  category: GoogleAds
---
# Data Manager API Setup

## Setup Authentication

Refer to [Set up API access](https://developers.google.com/data-manager/api/devguides/quickstart/set-up-access.md.txt)
for more details.

1.  **Enable API (Prerequisite)**: Check that the user has enabled the Data
    Manager API in their Google Cloud project.
2.  **Generate ADC**: Authenticate the local workspace using Application
    Default Credentials (ADC) via `gcloud auth application-default login`.
    *   **Required Scopes**: Include scopes
        `https://www.googleapis.com/auth/datamanager` and
        `https://www.googleapis.com/auth/cloud-platform`.
    *   **Multi-API Scopes**: If using the same credentials for other APIs,
        append their scopes (e.g.,
        `https://www.googleapis.com/auth/adwords`).
    *   **Service Accounts**: Ensure the Service Account has the
        `Service Usage Consumer` IAM role, and the user executing `gcloud`
        has the Token Creator role
        (`roles/iam.serviceAccountTokenCreator`) on that Service Account
        for impersonation.

## Install Client & Utility Libraries

Refer to [Install a client library](https://developers.google.com/data-manager/api/devguides/quickstart/install-library.md.txt)
for more details.

The companion utility libraries provide pre-built helper classes
and functions to correctly format, hash, and encrypt user identifiers (such as
emails, phone numbers, and physical addresses) prior to API ingestion. Use of
these libraries is highly recommended to ensure that user identifier formatting
matches the API's specifications.

Select the language-specific installation guide below:

*   [Python Setup Reference](references/python.md) (packages: `google-ads-datamanager` and `google-ads-datamanager-util`)
*   [Java Setup Reference](references/java.md) (packages: `com.google.api-ads:data-manager` and `data-manager-util`)
*   [Node Setup Reference](references/node.md) (packages: `@google-ads/datamanager` and `@google-ads/data-manager-util`)
*   [PHP Setup Reference](references/php.md) (packages: `googleads/data-manager` and `googleads/data-manager-util`)
*   [.NET Setup Reference](references/dotnet.md) (packages: `Google.Ads.DataManager.V1` and `Google.Ads.DataManager.Util.csproj`)

```


### `references/dotnet.md`

````markdown
# .NET Client and Utility Library Installation

## Install Client Library

Install the `Google.Ads.DataManager.V1` NuGet package:

```shell
dotnet add package Google.Ads.DataManager.V1
```

## Install Utility Library

> [!IMPORTANT]
> The companion utility libraries are not available on public package managers
> (such as NuGet). Follow the instructions below to clone and install the
> library.

1.  Clone the repository:
    ```shell
    git clone https://github.com/googleads/data-manager-dotnet.git
    ```
2.  In your .NET project, declare a `ProjectReference` dependency pointing to
    the cloned library's `.csproj` path (replacing `{path_to_utility_library}`
    with the local path of the cloned repository):
    ```xml
    <ProjectReference Include="{path_to_utility_library}\Google.Ads.DataManager.Util\src\Google.Ads.DataManager.Util.csproj" />
    ```

````


### `references/java.md`

````markdown
# Java Client and Utility Library Installation

## Install Client Library

Determine the latest version of `com.google.api-ads:data-manager` by running:
```shell
curl -s "https://repo1.maven.org/maven2/com/google/api-ads/data-manager/maven-metadata.xml" \
  | grep -Po '(?<=<release>)[^<]+'
```

If using Maven, add the following dependency to your `pom.xml` file.
Replace `{latest_version}` with the version retrieved above:

```xml
<dependency>
  <groupId>com.google.api-ads</groupId>
  <artifactId>data-manager</artifactId>
  <version>{latest_version}</version>
</dependency>
```

If using Gradle, add this to your dependencies.
Replace `{latest_version}` with the version retrieved above:

```groovy
implementation 'com.google.api-ads:data-manager:{latest_version}'
```

## Install Utility Library

> [!IMPORTANT]
> The companion utility libraries are not available on public package managers
> (such as Maven). Follow the instructions below to clone and install the
> library.

1.  Clone the repository:
    ```shell
    git clone https://github.com/googleads/data-manager-java.git
    ```
2.  Determine the latest version of the library (`{version}`) in
    `data-manager-util/build.gradle` (e.g., `0.1.0`).
3.  Navigate to the `data-manager-java` directory.
4.  Build and publish the utility library to your local Maven repository:
    ```shell
    ./gradlew data-manager-util:install
    ```
5.  Declare a dependency on the utility library in your project. Replace
    `{version}` with the value found in step 2.
    *   **Gradle**:
        ```groovy
        implementation 'com.google.api-ads:data-manager-util:{version}'
        ```
    *   **Maven**:
        ```xml
        <dependency>
          <groupId>com.google.api-ads</groupId>
          <artifactId>data-manager-util</artifactId>
          <version>{version}</version>
        </dependency>
        ```

````


### `references/node.md`

````markdown
# Node Client and Utility Library Installation

## Install Client Library

Install the Node.js client library:

```shell
npm install @google-ads/datamanager
```

## Install Utility Library

> [!IMPORTANT]
> The companion utility libraries are not available on public package managers
> (such as npm). Follow the instructions below to clone and install the library.

1.  Clone the repository:
    ```shell
    git clone https://github.com/googleads/data-manager-node.git
    ```

2.  Navigate to the `data-manager-node` directory and install dependencies:
    ```shell
    npm install
    ```
3.  Navigate to the `util` directory:
    ```shell
    cd util
    ```
4.  Pack the utility library into a `.tgz` archive:
    ```shell
    npm pack
    ```
5.  Declare a dependency in your Node.js project's `package.json` pointing to
    the path of the generated `.tgz` archive:
    ```json
    {
       "dependencies": {
          "@google-ads/data-manager-util": "file:{path_to_archive}"
       }
    }
    ```

````


### `references/php.md`

````markdown
# PHP Client and Utility Library Installation

## Install Client Library

Install the `googleads/data-manager` component using Composer:

```shell
composer require googleads/data-manager
```

## Install Utility Library

> [!IMPORTANT]
> The companion utility library is not available on Packagist. Follow the
> instructions below to clone and install the library.

1.  Clone the repository:
    ```shell
    git clone https://github.com/googleads/data-manager-php.git
    ```
2.  Navigate to the `data-manager-php` directory.
3.  Resolve dependencies for the library:
    ```shell
    composer update --prefer-dist
    ```
4.  Update your project's `composer.json` to declare a dependency on the
    utility library using a path repository:
    ```json
     {
         "repositories": [
             {
                 "type": "path",
                 "url": "{path_to_repository}"
             }
         ],
         "require": {
             "googleads/data-manager-util": "@dev"
         }
     }
    ```

````


### `references/python.md`

````markdown
# Python Client and Utility Library Installation

## Install Client Library

Install the Python client library:

```shell
pip install google-ads-datamanager
```

## Install Utility Library

> [!IMPORTANT]
> The companion utility libraries are not available on public package managers
> (such as PyPI). Follow the instructions below to clone and install the
> library.

1.  Clone the repository:
    ```shell
    git clone https://github.com/googleads/data-manager-python.git
    ```
2.  Determine the latest version of the library (`{version}`) in
    `pyproject.toml` (e.g., `0.1.0`).
3.  Navigate to the `data-manager-python` directory and install the utility
    library:
    ```shell
    pip install .
    ```
4.  Declare a dependency in your project's `requirements.txt` file. Replace
    `{version}` with the value found in step 2.
    ```
    google-ads-datamanager-util=={version}
    ```

````
