使用Flow Service API创建Salesforce Marketing Cloud基本连接
基本连接表示源和Adobe Experience Platform之间的已验证连接。
本教程将指导您完成使用[Flow Service API] (https://www.adobe.io/experience-platform-apis/references/flow-service/)为Salesforce Marketing Cloud创建基本连接的步骤。
快速入门
本指南要求您对 Adobe Experience Platform 的以下组件有一定了解:
使用平台API
有关如何成功调用平台API的信息,请参阅平台API快速入门指南。
以下部分提供了使用Flow Service API成功连接到Salesforce Marketing Cloud时需要了解的其他信息。
收集所需的凭据
为了使Flow Service与Salesforce Marketing Cloud连接,您必须提供以下连接属性:
host
host
值时,需要指定{subdomain}.rest.marketingcloudapis.com
。 例如,如果您的主机URL是https://acme-ab12c3d4e5fg6hijk7lmnop8qrst.auth.marketingcloudapis.com/
,则必须输入acme-ab12c3d4e5fg6hijk7lmnop8qrst.rest.marketingcloudapis.com/
作为主机值。clientId
clientSecret
connectionSpec.id
ea1c2a08-b722-11eb-8529-0242ac130003
。有关入门的详细信息,请参阅此[Salesforce Marketing Cloud 文档] (https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/authentication.htm)。
创建基本连接
基本连接会保留您的源和平台之间的信息,包括源的身份验证凭据、连接的当前状态以及唯一的基本连接ID。 基本连接ID允许您浏览和浏览源中的文件,并标识要摄取的特定项目,包括有关其数据类型和格式的信息。
要创建基本连接ID,请在将Salesforce Marketing Cloud身份验证凭据作为请求正文的一部分提供时,向/connections
端点发出POST请求。
API格式
POST /connections
请求
以下请求为Salesforce Marketing Cloud创建基本连接:
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": "Salesforce Marketing Cloud base connection",
"description": "Salesforce Marketing Cloud base connection",
"auth": {
"specName": "Client-Id-Secret Based Authentication",
"params": {
"host": "acme-ab12c3d4e5fg6hijk7lmnop8qrst"
"clientId": "acme-salesforce-marketing-cloud",
"clientSecret": "xxxx"
}
},
"connectionSpec": {
"id": "ea1c2a08-b722-11eb-8529-0242ac130003",
"version": "1.0"
}
}'
auth.params.clientId
auth.params.clientSecret
connectionSpec.id
ea1c2a08-b722-11eb-8529-0242ac130003
。响应
成功的响应返回新创建的连接,包括其唯一连接标识符(id
)。 在下个教程中,需要此ID才能浏览您的数据。
{
"id": "2fce94c1-9a93-4971-8e94-c19a93097129",
"etag": "\"d403848a-0000-0200-0000-5e978f7b0000\""
}
后续步骤
通过完成本教程,您已使用Flow Service API创建了Salesforce Marketing Cloud基本连接。 您可以在下列教程中使用此基本连接ID: