data-manager-api-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseData Manager API Setup
Data Manager API 设置
Setup Authentication
配置认证
Refer to Set up API access
for more details.
- Enable API (Prerequisite): Check that the user has enabled the Data Manager API in their Google Cloud project.
- Generate ADC: Authenticate the local workspace using Application
Default Credentials (ADC) via .
gcloud auth application-default login- Required Scopes: Include scopes
and
https://www.googleapis.com/auth/datamanager.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
IAM role, and the user executing
Service Usage Consumerhas the Token Creator role (gcloud) on that Service Account for impersonation.roles/iam.serviceAccountTokenCreator
- Required Scopes: Include scopes
如需了解更多详情,请参阅设置API访问权限
- 启用API(前提条件):检查用户是否已在其Google Cloud项目中启用Data Manager API。
- 生成ADC:通过命令,使用Application Default Credentials(ADC)对本地工作区进行认证。
gcloud auth application-default login- 所需权限范围:需包含权限范围
和
https://www.googleapis.com/auth/datamanager。https://www.googleapis.com/auth/cloud-platform - 多API权限范围:如果同一凭据用于其他API,请追加对应权限范围(例如
)。
https://www.googleapis.com/auth/adwords - 服务账号:确保服务账号拥有IAM角色,且执行
Service Usage Consumer命令的用户拥有该服务账号的Token Creator角色 (gcloud)以进行模拟操作。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: and
google-ads-datamanager)google-ads-datamanager-util - Java Setup Reference (packages: and
com.google.api-ads:data-manager)data-manager-util - Node Setup Reference (packages: and
@google-ads/datamanager)@google-ads/data-manager-util - PHP Setup Reference (packages: and
googleads/data-manager)googleads/data-manager-util - .NET Setup Reference (packages: and
Google.Ads.DataManager.V1)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