data-manager-api-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Data Manager API Setup

Data Manager API 设置

Setup Authentication

配置认证

Refer to Set up API access 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.
如需了解更多详情,请参阅设置API访问权限
  1. 启用API(前提条件):检查用户是否已在其Google Cloud项目中启用Data Manager API。
  2. 生成ADC:通过
    gcloud auth application-default login
    命令,使用Application Default Credentials(ADC)对本地工作区进行认证。
    • 所需权限范围:需包含权限范围
      https://www.googleapis.com/auth/datamanager
      https://www.googleapis.com/auth/cloud-platform
    • 多API权限范围:如果同一凭据用于其他API,请追加对应权限范围(例如
      https://www.googleapis.com/auth/adwords
      )。
    • 服务账号:确保服务账号拥有
      Service Usage Consumer
      IAM角色,且执行
      gcloud
      命令的用户拥有该服务账号的Token Creator角色 (
      roles/iam.serviceAccountTokenCreator
      )以进行模拟操作。

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-datamanager
    and
    google-ads-datamanager-util
    )
  • Java Setup Reference (packages:
    com.google.api-ads:data-manager
    and
    data-manager-util
    )
  • Node Setup Reference (packages:
    @google-ads/datamanager
    and
    @google-ads/data-manager-util
    )
  • PHP Setup Reference (packages:
    googleads/data-manager
    and
    googleads/data-manager-util
    )
  • .NET Setup Reference (packages:
    Google.Ads.DataManager.V1
    and
    Google.Ads.DataManager.Util.csproj
    )
如需了解更多详情,请参阅安装客户端库
配套的实用工具库提供预构建的辅助类和函数,可在API摄取前正确格式化、哈希和加密用户标识符(如电子邮件、电话号码和物理地址)。强烈建议使用这些库,以确保用户标识符的格式符合API规范。
请选择以下特定语言的安装指南:
  • Python设置参考(包:
    google-ads-datamanager
    google-ads-datamanager-util
  • Java设置参考(包:
    com.google.api-ads:data-manager
    data-manager-util
  • Node设置参考(包:
    @google-ads/datamanager
    @google-ads/data-manager-util
  • PHP设置参考(包:
    googleads/data-manager
    googleads/data-manager-util
  • .NET设置参考(包:
    Google.Ads.DataManager.V1
    Google.Ads.DataManager.Util.csproj