Data Manager API Setup

Data Manager API Setup

Guides a coding agent through enabling the Data Manager API, installing its client library and setting up credentials for a developer's local environment.

Skill files7 files

references/

SKILL.md116 lines
1
---
2
name: data-manager-api-setup
3
description: >-
4
Guides developers through client library installation and authentication setup
5
steps for the Data Manager API. Use this skill when a user is getting started
6
with the Data Manager API and needs to setup their local environment, install
7
the client library, or setup access to the API. Don't use for implementing
8
audience or event ingestion logic (use the data-manager-api-audience-ingestion
9
or data-manager-api-event-ingestion skills instead), or for debugging
10
UNAUTHENTICATED, PERMISSION_DENIED, or other errors from requests after setup
11
(use the data-manager-api-troubleshooting skill).
12
metadata:
13
version: "1.1.1"
14
category: GoogleAds
15
---
16
# Data Manager API Setup
17
18
## Setup Authentication
19
20
Refer to [Set up API access](https://developers.google.com/data-manager/api/devguides/quickstart/set-up-access.md.txt)
21
for more details.
22
23
### 1. Enable the API
24
25
**Prerequisites**: A Google Cloud project, the Google Cloud CLI (`gcloud`), and
26
a Google Account with a project role that can enable APIs, such as **Owner**,
27
**Editor**, or **Service Usage Admin**. Always tell the user about the required
28
role. If `gcloud` isn't installed, prompt the user to install it first.
29
30
```shell
31
gcloud services enable datamanager.googleapis.com --project={project_id}
32
gcloud services list --enabled --project={project_id} --filter="datamanager.googleapis.com"
33
```
34
35
### 2. Generate Application Default Credentials (ADC)
36
37
Choose the method that matches the user's scenario:
38
39
* **User account** (API calls are made as the user's own Google Account): The
40
Data Manager API scopes are sensitive, so the user must first configure
41
their project's Google Auth Platform:
42
1. **Data Access** page: Add the Data Manager API scopes.
43
2. **Audience** page: Set **Publishing status** to **Testing**. Use the
44
**Internal** user type for a Google Workspace organization, or
45
**External** with the user's account added as a **Test user**.
46
3. Create (or reuse) a **Desktop app** OAuth client and download its JSON
47
configuration file.
48
4. The user runs the following command, which opens a browser login:
49
50
```shell
51
gcloud auth application-default login \
52
--scopes="https://www.googleapis.com/auth/datamanager,https://www.googleapis.com/auth/cloud-platform" \
53
--client-id-file="{client_id_file_path}"
54
```
55
56
**Unverified app screen**: This warning appears because the Data Manager API
57
scopes are sensitive. During **Testing**, External test users still see it
58
and can continue past it. Before other users can sign in, the app must
59
complete
60
[OAuth app verification](https://developers.google.com/data-manager/api/devguides/concepts/oauth-verification.md.txt).
61
Service accounts don't need verification.
62
* **Service account** (API calls are made as an app identity instead of a
63
person): For local development, use service account impersonation rather
64
than a service account key, since keys are a security risk if not managed
65
carefully.
66
* Grant the Service Account the `Service Usage Consumer` IAM role
67
(`roles/serviceusage.serviceUsageConsumer`) on the project.
68
* Grant the user executing `gcloud` the Token Creator role
69
(`roles/iam.serviceAccountTokenCreator`) on that Service Account.
70
* Run:
71
72
```shell
73
gcloud auth application-default login \
74
--impersonate-service-account={service_account_email} \
75
--scopes="https://www.googleapis.com/auth/datamanager,https://www.googleapis.com/auth/cloud-platform"
76
```
77
* **Data partner creating partner links** in advertiser accounts: Read
78
[Partner Links](references/partner-links.md).
79
80
**Multiple APIs**: To use the same credentials for other APIs, append their
81
scopes to the `--scopes` list in the commands above (e.g.,
82
`https://www.googleapis.com/auth/adwords` for the Google Ads API or
83
`https://www.googleapis.com/auth/display-video` for the Display & Video 360
84
API).
85
86
**Verify**: `gcloud auth application-default print-access-token` prints an
87
access token when credentials are set up correctly.
88
89
**Troubleshooting `PERMISSION_DENIED` with a valid token**: Add the user or
90
service account to the destination account (for example, the Google Ads account
91
or its manager account). For service accounts, also confirm the
92
`Service Usage Consumer` role on the Cloud project.
93
94
**Production**: For production authentication (workloads in or outside Google
95
Cloud, apps that act on behalf of other users, or partner links), see
96
[Deploy to production](https://developers.google.com/data-manager/api/devguides/concepts/deploy.md.txt).
97
98
## Install Client & Utility Libraries
99
100
Refer to [Install a client library](https://developers.google.com/data-manager/api/devguides/quickstart/install-library.md.txt)
101
for more details.
102
103
The companion utility libraries provide pre-built helper classes
104
and functions to correctly format, hash, and encrypt user identifiers (such as
105
emails, phone numbers, and physical addresses) prior to API ingestion. Use of
106
these libraries is highly recommended to ensure that user identifier formatting
107
matches the API's specifications.
108
109
Select the language-specific installation guide below:
110
111
* [Python Setup Reference](references/python.md) (packages: `google-ads-datamanager` and `google-ads-datamanager-util`)
112
* [Java Setup Reference](references/java.md) (packages: `com.google.api-ads:data-manager` and `com.google.api-ads:data-manager-util`)
113
* [Node Setup Reference](references/node.md) (packages: `@google-ads/datamanager` and `@google-ads/datamanager-util`)
114
* [PHP Setup Reference](references/php.md) (packages: `googleads/data-manager` and `googleads/data-manager-util`)
115
* [.NET Setup Reference](references/dotnet.md) (packages: `Google.Ads.DataManager.V1` and `Google.Ads.DataManager.Util`)
116

© Google LLC · Apache 2.0 · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 6,373 prompts

More by @OpenSourceBuffGuy

See all
Website Clone Architect prompt image

Website Clone Architect

Reverse-engineers a website section by section, writes component specs, and hands them to parallel builder agents in git worktrees to rebuild it.

agent-skill, orchestrator, parallel-agents, multi-agent, plan-then-execute, web-development, frontend, codebase-analysis, scaffolding, css, html, nextjs, typescript, git, mcp, claude-code, for-developers, for-designers, long-form, advanced, technical-spec, task-decomposition, structured-output, design-systems, ui-ux, tool-use, checklist, report, vibe-coding

Italian Terrace Cafe Candid Portrait prompt image

Italian Terrace Cafe Candid Portrait

Generates a photorealistic candid shot of a woman in a white corset dress laughing at a sunny hotel terrace cafe, written as detailed JSON.

image-prompt, json-prompt, structured-output, photorealistic, portrait, woman, candid, fashion, cottagecore, natural-light, golden-hour, bokeh, summer, travel, cityscape, mountains, medium-shot, vibrant-colors, for-photographers, nano-banana, fashion-shoot, luxury

Night Street Photo With Leashed Cat prompt image

Night Street Photo With Leashed Cat

Generates a flash-lit night street photo of a blonde woman in a retro track jacket walking a hissing tabby cat on a leash.

image-prompt, json-prompt, nano-banana, structured-output, portrait, woman, animals, pet-portrait, night-scene, street-photography, candid, editorial, fashion, dramatic-lighting, photorealistic, vertical-format, medium-shot, graffiti, for-photographers, for-content-creators

1 view

Reviews

Loading reviews…

Discussion

Loading comments…