使用Flow Service API将Google Ads连接到Experience Platform
NOTE
Google Ads源为测试版。 有关使用测试版标记源的更多信息,请参阅源概述。
基本连接表示源和51黑料不打烊 Experience Platform之间的已验证连接。
阅读本教程,了解如何使用将您的Google Ads帐户连接到51黑料不打烊 Experience Platform。
开始使用
本指南要求您对Experience Platform的以下组件有一定的了解:
以下部分提供使用Flow Service API成功连接到Google Ads所需了解的其他信息。
使用Experience Platform API
有关如何成功调用Experience Platform API的信息,请参阅Experience Platform API快速入门指南。
收集所需的凭据
有关身份验证的信息,请阅读Google Ads 源概述。
创建基本连接
基本连接会保留源与Experience Platform之间的信息,包括源的身份验证凭据、连接的当前状态以及唯一的基本连接ID。 基本连接ID允许您浏览和浏览源中的文件,并标识要摄取的特定项目,包括有关其数据类型和格式的信息。
要创建基本连接ID,请在提供您的Google Ads身份验证凭据作为请求参数的一部分时,向/connections
端点发出笔翱厂罢请求。
础笔滨格式
POST /connections
请求
以下请求创建Google Ads的基本连接:
curl -X POST \
'https://platform.adobe.io/data/foundation/flowservice/connections' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json'
-d '{
"name": "Google Ads base connection",
"description": "Google Ads base connection",
"auth": {
"specName": "Basic Authentication",
"params": {
"clientCustomerID": "{CLIENT_CUSTOMER_ID}",
"loginCustomerID": "{LOGIN_CUSTOMER_ID}",
"developerToken": "{DEVELOPER_TOKEN}",
"refreshToken": "{REFRESH_TOKEN}",
"clientId": "{CLIENT_ID}",
"clientSecret": "{CLIENT_SECRET}",
"googleAdsApiVersion": "v17"
}
},
"connectionSpec": {
"id": "d771e9c1-4f26-40dc-8617-ce58c4b53702",
"version": "1.0"
}
}'
属性
描述
auth.params.clientCustomerID
Google Ads帐户的客户端客户ID。
auth.params.loginCustomerID
与您的Google Ads经理帐户对应的登录客户ID。
auth.params.developerToken
Google Ads帐户的开发人员令牌。
auth.params.refreshToken
Google Ads帐户的刷新令牌。
auth.params.clientID
Google Ads帐户的客户端ID。
auth.params.clientSecret
Google Ads帐户的客户端密钥。
auth.params.googleAdsApiVersion
您正在使用的Google Ads API版本。 Experience Platform支持的最新版本是
v17
。connectionSpec.id
Google Ads连接规范ID:
d771e9c1-4f26-40dc-8617-ce58c4b53702
。响应
成功的响应返回新创建的基本连接的详细信息,包括其唯一标识符(id
)。 在下一步创建源连接时需要此ID。
{
"id": "2484f2df-c057-4ab5-84f2-dfc0577ab592",
"etag": "\"10033e77-0000-0200-0000-5e96785b0000\""
}
创建数据流以摄取广告数据
通过学习本教程,您已使用Flow Service API创建了Google Ads基本连接,并将您的Google Ads帐户连接到Experience Platform。 您可以在下列教程中使用此基本连接ID:
recommendation-more-help
337b99bb-92fb-42ae-b6b7-c7042161d089