我试图将线索添加到精确目标 api,但总是收到错误“错误请求”。所有代码都遵循来自 Exacttarget 的示例,任何人都可以帮助
下面是 SOPA 信封:
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
<Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<UsernameToken>
<Username>****</Username>
<Password>****</Password>
</UsernameToken>
</Security>
</Header>
<Body>
<CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
<Objects xsi:type="Subscriber">
<EmailAddress>test@example</EmailAddress>
<SubscriberKey>test@example</SubscriberKey>
<EmailTypePreference>HTML</EmailTypePreference>
<Attributes>
<Name>FIRST_NAME</Name>
<Value>test</Value>
</Attributes>
<Attributes>
<Name>LAST_NAME</Name>
<Value>test</Value>
</Attributes>
<Attributes>
<Name>BIRTHDAY</Name>
<Value>'04/03/1988'</Value>
</Attributes>
<lists>
<partnerkey xsi:nil="true"></partnerkey>
<id>111111</id>
<objectid xsi:nil="true"></objectid>
<status>Active</status>
</lists>
<Status>Active</Status>
</Objects>
</CreateRequest>
</Body>
</Envelope>
这是我的卷曲代码:
$endpoint = 'https://webservice.s6.exacttarget.com/service.asmx';
$soap_do = curl_init();
curl_setopt($soap_do, CURLOPT_URL, $endpoint);
curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($soap_do, CURLOPT_TIMEOUT, 10);
curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true);
curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($soap_do, CURLOPT_POST, true);
curl_setopt($soap_do, CURLOPT_POSTFIELDS, $dataString);
curl_setopt($soap_do, CURLOPT_HTTPHEADER, array('Content-Type: text/xml; charset=utf-8', 'Content-Length: ' . strlen($dataString),'SOAPAction: "http://exacttarget.com/wsdl/partnerAPI/Create"'));
$result = curl_exec($soap_do);
请帮忙