Flow Service API を使用した Google Ads のExperience Platformへの接続
作成対象:
- 開発者
ベース接続は、ソースと Adobe Experience Platform 間の認証済み接続を表します。
Flow Service API を使用して Google Ads アカウントをAdobe Experience Platformに接続する方法については、このチュートリアルをお読みください。
はじめに
このガイドは、Adobe Experience Platform の次のコンポーネントを実際に利用および理解しているユーザーを対象としています。
次の節では、Flow Service API を使用してに正常に接続するために必要な追加情報を示 Google Ads ています。
Experience Platform API の使用
Experience Platform API を正常に呼び出す方法について詳しくは、Experience Platform API の概要を参照してください。
必要な資格情報の収集
認証について詳しくは、Google Ads ソースの概要を参照してください。
ベース接続の作成
ベース接続は、ソースとExperience Platform間の情報(ソースの認証資格情報、現在の接続状況、一意のベース接続 ID など)を保持します。 ベース接続 ID により、ソース内からファイルを参照および移動し、データタイプやフォーマットに関する情報を含む、取り込みたい特定の項目を識別することができます。
ベース接続 ID を作成するには、/connections
エンドポイントに対して POST リクエストを実行し、その際にGoogle Ads 認証資格情報をリクエストパラメーターの一部として指定します。
API 形式
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
auth.params.loginCustomerID
auth.params.developerToken
auth.params.refreshToken
auth.params.clientID
auth.params.clientSecret
auth.params.googleAdsApiVersion
v17
です。connectionSpec.id
d771e9c1-4f26-40dc-8617-ce58c4b53702
。応答
リクエストが成功した場合は、一意の ID(id
)を含め、新しく作成されたベース接続の詳細が返されます。この ID は、次の手順でソース接続を作成する際に必要になります。
{
"id": "2484f2df-c057-4ab5-84f2-dfc0577ab592",
"etag": "\"10033e77-0000-0200-0000-5e96785b0000\""
}
広告データを取り込むデータフローの作成
このチュートリアルでは、Flow Service API を使用して Google Ads ベース接続を作成し、Google Ads アカウントをExperience Platformに接続しました。 このベース接続 ID は、次のチュートリアルで使用できます。