data-manager-api-setup
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).
- License 许可
- Apache-2.0
- 所属仓库
- google/skills
- 最近更新
- 2026-11-13
- Stars
- ★ 2.4w
- Forks
- 2.0k
01 前言 Front Matter
- name
- data-manager-api-setup
- metadata
- { "version": "1.1.0", "category": "GoogleAds" }
- 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).
02 资源文件 6
- 参考文档references/dotnet.md336 B
- 参考文档references/java.md1.5 KB
- 参考文档references/node.md301 B
- 参考文档references/partner-links.md2.0 KB
- 参考文档references/php.md347 B
- 参考文档references/python.md300 B
03 SKILL.md 正文
Data Manager API Setup
Setup Authentication
Refer to Set up API access for more details.
1. Enable the API
Prerequisites: A Google Cloud project, the Google Cloud CLI (gcloud), and
a Google Account with a project role that can enable APIs, such as Owner,
Editor, or Service Usage Admin. Always tell the user about the required
role. If gcloud isn't installed, prompt the user to install it first.
gcloud services enable datamanager.googleapis.com --project={project_id}
gcloud services list --enabled --project=PROJECT_ID --filter="datamanager.googleapis.com"
2. Generate Application Default Credentials (ADC)
Choose the method that matches the user's scenario:
-
User account (API calls are made as the user's own Google Account): The Data Manager API scopes are sensitive, so the user must first configure their project's Google Auth Platform:
-
Data Access page: Add the Data Manager API scopes.
-
Audience page: Set Publishing status to Testing. Use the Internal user type for a Google Workspace organization, or External with the user's account added as a Test user.
-
Create (or reuse) a Desktop app OAuth client and download its JSON configuration file.
-
The user runs the following command, which opens a browser login:
gcloud auth application-default login \ --scopes="https://www.googleapis.com/auth/datamanager,https://www.googleapis.com/auth/cloud-platform" \ --client-id-file="{client_id_file_path}"
Unverified app screen: This warning appears because the Data Manager API scopes are sensitive. During Testing, External test users still see it and can continue past it. Before other users can sign in, the app must complete OAuth app verification. Service accounts don't need verification.
-
-
Service account (API calls are made as an app identity instead of a person): For local development, use service account impersonation rather than a service account key, since keys are a security risk if not managed carefully.
-
Grant the Service Account the
Service Usage ConsumerIAM role (roles/serviceusage.serviceUsageConsumer) on the project. -
Grant the user executing
gcloudthe Token Creator role (roles/iam.serviceAccountTokenCreator) on that Service Account. -
Run:
gcloud auth application-default login \ --impersonate-service-account={service_account_email} \ --scopes="https://www.googleapis.com/auth/datamanager,https://www.googleapis.com/auth/cloud-platform"
-
-
Data partner creating partner links in advertiser accounts: Read Partner Links.
Multiple APIs: To use the same credentials for other APIs, append their
scopes to the --scopes list in the commands above (e.g.,
https://www.googleapis.com/auth/adwords for the Google Ads API or
https://www.googleapis.com/auth/display-video for the Display & Video 360
API).
Verify: gcloud auth application-default print-access-token prints an
access token when credentials are set up correctly.
Troubleshooting PERMISSION_DENIED with a valid token: Add the user or
service account to the destination account (for example, the Google Ads account
or its manager account). For service accounts, also confirm the
Service Usage Consumer role on the Cloud project.
Production: For production authentication (workloads in or outside Google Cloud, apps that act on behalf of other users, or partner links), see Deploy to production.
Install Client & Utility Libraries
Refer to Install a client library 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 (packages:
google-ads-datamanagerandgoogle-ads-datamanager-util) - Java Setup Reference (packages:
com.google.api-ads:data-managerandcom.google.api-ads:data-manager-util) - Node Setup Reference (packages:
@google-ads/datamanagerand@google-ads/datamanager-util) - PHP Setup Reference (packages:
googleads/data-managerandgoogleads/data-manager-util) - .NET Setup Reference (packages:
Google.Ads.DataManager.V1andGoogle.Ads.DataManager.Util)
04 同仓库更多 Skills
sign-in-with-google-web
Implement, configure, and secure Sign In With Google (SiwG) using Google Identity Services (GIS / `https://accounts.google.com/gsi/client`) across web architectures. Use when creating Google sign-in buttons, implementing Google One Tap with FedCM, integrating GIS in React/Next.js/Angular/HTML, verifying ID tokens on backend runtimes (Python/Node.js/Go/Java), enforcing Google Workspace domain restrictions (`hd`), securing client-side ID tokens via WebCrypto nonces or encrypted IndexedDB, embedding in cross-origin iframes via the Intermediate Iframe API (`https://accounts.google.com/gsi/intermediate`), configuring Content Security Policy (CSP), COOP, and Permissions Policy (`identity-credentials-get`) headers, or handling sign-out and revocation. Don't use for legacy Google Sign-In (`gapi.auth2`), Google Cloud IAM service accounts, or Android/iOS native Credential Manager.
dpop-adoption
Implement and debug OAuth 2.0 DPoP (RFC 9449) refresh token sender-constraining for WebCrypto, Node.js ES6, and browser runtimes integrating with Google's OAuth platform. Use when configuring non-extractable asymmetric key pairs (P-256), generating DPoP Proof JWTs for authorization code exchange and token refresh, or handling 400 use_dpop_nonce challenge retry loops at oauth2.googleapis.com/token. Don't use for unconstrained OAuth 2.0 flows (where refresh tokens are not bound to a client key pair), or for Google Cloud IAM / service account authentication.
retrieving-developer-knowledge
Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI/Gemini, Android, Chrome, Web, Flutter, Go, Firebase, and other Google developer platforms. Integrates with the Developer Knowledge MCP server (search_documents, get_documents, answer_query) or the Developer Knowledge REST API fallback. Use when searching for gcloud CLI commands, API syntax, IAM permissions, official documentation, architectural comparisons, or product choice overviews. Don't use for local filesystem lookups or non-Google documentation.
migrate-to-rust
Clones, analyzes, plans, and migrates legacy codebases (C++, Fortran, Java, Python, C, Shell) from a GitHub URL or local directory to a modern, high-performance, deterministic, 100% Safe Rust architecture, tracking live telemetry across every task bucket, test failure/fix cycle, and Profile-Guided Optimization (PGO) stage, and producing a first-person AI storytelling report and interactive HTML infographic. Use when migrating a GitHub repository or local codebase to Rust, porting legacy C++, Fortran, Python, or Java workloads to memory-safe Rust, designing Struct-of-Arrays (SoA) or SIMD Rust architectures, or optimizing Rust ports with LLVM PGO. Don't use for unrelated non-Rust refactoring or single-line syntax questions.
finding-google-skills
Google platform decision and setup guidance, loaded on demand from Google's skill catalog. Use when a developer is choosing or setting up part of their stack, such as where to run a service, a database, storage, messaging, authentication, analytics, ads, or AI model serving, and a Google product is a reasonable candidate - whether or not a vendor is named - or when a request names a Google product or API. Brings in the matching Google skill so the answer can weigh Google options, their trade-offs, and when they are not the right fit. Skip when the stack is already settled on another provider and no Google product is named, or the task involves no platform choice.
workload-manager-basics
Use this skill to manage Google Cloud Workload Manager evaluations, rules, scanned resources, and validation results by using public client libraries and the REST API. Use when you need to inspect workload best-practice rules, create and run evaluations for Google Cloud general best practices, SAP, SQL Server, or custom organizational rules, review violations, export results to BigQuery, or automate Workload Manager through client libraries because no service-specific public CLI or MCP server is available. Don't use for general Google Compute Engine instance management, VPC configuration, or standard IAM auditing.