Guide · Agent skill
How to use the Data Manager API Setup agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The data-manager-api-setup skill is a step-by-step playbook that helps an agent prepare a computer to call Google's Data Manager API. It covers enabling the API in a Google Cloud project, setting up Application Default Credentials as a user or service account, checking the access token, and installing the official client and utility libraries. After this guide you will know how to add the skill, ask for it in plain language, and what you need before running it.
Quick start
- 1Confirm prerequisites. Check that you have a Google Cloud project, the gcloud CLI, and an account with Owner, Editor or Service Usage Admin role on the project.
- 2Install the skill. Unzip the downloaded ZIP into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills.
- 3Ask for setup in plain language. Describe your goal, such as setting up Data Manager API authentication, and let the agent follow the skill's steps.
- 4Enable the API. Run the gcloud command that enables datamanager.googleapis.com on your project, then list enabled services to confirm.
- 5Set up Application Default Credentials. Choose user account or service account, complete the required console settings, and run the matching gcloud auth application-default login command.
- 6Verify the access token. Run gcloud auth application-default print-access-token and confirm it prints a token.
- 7Install your language's libraries. Install the client and utility packages for Python, Java, Node, PHP or .NET using the matching reference guide.
What is an agent skill and what does this one do?
An agent skill is a folder containing a SKILL.md file and optional reference files. When you install one, the AI agent can load its instructions when your request matches the skill's description, so it follows a tested procedure instead of guessing.
This skill covers setup only. It explains how to enable the API in a Google Cloud project, set up Application Default Credentials (either as a Google user or as a service account), verify the access token, and install the Python, Java, Node, PHP or .NET libraries. It does not write audience or event ingestion code; for that the skill redirects to data-manager-api-audience-ingestion or data-manager-api-event-ingestion.
What you need before you start
The skill's steps cannot be completed without these items. Check them first.
- A Google Cloud project
- The Google Cloud CLI (gcloud). If it is not installed, the skill will prompt you to install it first.
- A Google Account with Owner, Editor or Service Usage Admin role on the project
- For user account login: a Desktop app OAuth client JSON file
- A package manager for your chosen language: pip, Maven, npm, Composer or NuGet
How to install the skill
Download the ZIP file from this page and unzip it. Then place the skill folder in one of these locations:
- For all your projects: ~/.claude/skills/
- For one project only: the project's .claude/skills/ folder
- In the Claude apps: upload the ZIP under Settings → Capabilities → Skills
How to trigger the skill with a natural request
You do not need a special command. Describe what you are doing in plain words. The skill's description matches requests about getting started with the Data Manager API, setting up a local environment, installing the client library, or setting up API access.
Requests that should trigger it include setting up authentication for the Data Manager API, installing the client library in your language, or preparing your environment for a first integration. Requests to write audience or event upload code will not trigger this skill, because it redirects those to other skills.
- "Help me set up authentication for the Data Manager API."
- "Install the Python Data Manager client library and its utility package."
- "I'm starting my first Data Manager API integration. Walk me through the setup."
- "Check whether my gcloud access token works for the Data Manager API."
Walk through the main setup paths
Choose the path that matches your scenario. A user account makes API calls as your own Google Account. A service account makes calls as an app identity.
For a user account, the Data Manager API scopes are sensitive, so the project's Google Auth Platform must be configured first: add the scopes on the Data Access page, set Publishing status to Testing on the Audience page, and create or reuse a Desktop app OAuth client and download its JSON file. Then run the login command below. You may see an unverified app warning; during Testing, external test users can continue past it.
For a service account, the skill recommends service account impersonation rather than a service account key, because keys are a security risk if not managed carefully. The service account needs the Service Usage Consumer role, and the user running gcloud needs the Token Creator role on that service account.
Data partners creating partner links in advertiser accounts should follow the separate partner links reference.
gcloud services enable datamanager.googleapis.com --project={project_id}
gcloud services list --enabled --project=PROJECT_ID --filter="datamanager.googleapis.com"
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}"
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"Verify your credentials and fix permission errors
To check that credentials are set up correctly, run the verify command. If it prints an access token, your Application Default Credentials are working.
If you get PERMISSION_DENIED even with a valid token, add the user or service account to the destination account, such as the Google Ads account or its manager account. For service accounts, also confirm the Service Usage Consumer role on the Cloud project.
gcloud auth application-default print-access-tokenInstall the client and utility libraries
Each language has a client library for calling the API and a companion utility library that formats, hashes and encrypts user identifiers such as emails, phone numbers and addresses before ingestion. The source recommends using the utility library so identifier formatting matches the API's specifications.
Python uses google-ads-datamanager and google-ads-datamanager-util. Java uses com.google.api-ads:data-manager and com.google.api-ads:data-manager-util. Node uses @google-ads/datamanager and @google-ads/datamanager-util. PHP uses googleads/data-manager and googleads/data-manager-util. .NET uses Google.Ads.DataManager.V1 and Google.Ads.DataManager.Util. Open the reference file for your language for the exact commands.
npm install @google-ads/datamanager
npm install @google-ads/datamanager-utilSafety notes: scripts and network access
This skill does not run scripts. It does use the network, because the setup steps call Google Cloud and Google's package repositories, and the login command opens a browser sign-in.
Prefer service account impersonation over downloaded service account keys for local development. The skill notes that keys are a security risk if not managed carefully. For production credentials, the skill points to Google's deploy-to-production guide rather than covering it.
What people use it for
- Setting up a local machine so a developer can make first calls to the Data Manager API
- Configuring gcloud credentials for a Google Ads or Display & Video 360 team
- Preparing a service account for local development using impersonation instead of a key file
- Installing the Python or Node utility library so user emails and phone numbers are formatted correctly before ingestion
- Creating partner links in advertiser accounts as a data partner, using the partner links reference
Frequently asked questions
Is the Data Manager API Setup skill free?
The source material for this skill is licensed under Apache-2.0, which is listed on this page. The skill's steps use Google Cloud and the gcloud CLI, so check Google Cloud's own terms for any costs tied to your project.
What do I need to use the data-manager-api-setup skill?
You need a Google Cloud project, the Google Cloud CLI (gcloud), and a Google Account with Owner, Editor or Service Usage Admin role on the project. For user account login you also need a Desktop app OAuth client JSON file, and a package manager for your language such as pip, Maven, npm, Composer or NuGet.
Where do I put the skill folder?
Place it in ~/.claude/skills/ to use it everywhere, or in a project's .claude/skills/ folder to use it in one project. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.
Does this skill write my audience or event upload code?
No. It covers installation and authentication only. For audience uploads it points to data-manager-api-audience-ingestion, and for events it points to data-manager-api-event-ingestion.
Why does gcloud show an unverified app warning?
The Data Manager API scopes are sensitive, so the warning appears for user account logins. During Testing, external test users can continue past it, but before other users can sign in the app must complete OAuth app verification. Service accounts do not need verification.
What should I do if I get PERMISSION_DENIED with a valid token?
Add the user or service account to the destination account, such as the Google Ads account or its manager account. For service accounts, also confirm the Service Usage Consumer role on the Cloud project.
Is this skill an alternative to the official Google documentation?
It is a guided playbook that links to Google's own setup guides for each step. For production authentication, the skill directs you to Google's deploy-to-production documentation rather than covering it itself.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you are starting your first Data Manager API integration and want an agent to walk you through enabling the API, setting up credentials and installing libraries. Skip it if you need audience or event upload code, production credential deployment, or if you do not have a Google Cloud project with a role that can enable APIs.
Download the skill