Запрос бизнес-подразделений в маркетинговом облаке

Я пытаюсь получить все BU для маркетингового облака. но не в состоянии сделать. Цель получить все BU, присутствующие в системе. ниже мыльный запрос и ответ,

<soap:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap:Header>
    	<wsa:Action>Retrieve</wsa:Action>
    	<wsa:To>{{SOAPBaseURI}}/Service.asmx</wsa:To>
		<fueloauth xmlns="http://exacttarget.com">{{token}}</fueloauth>
    </soap:Header>
    <soap:Body>
        <RetrieveRequestMsg
            xmlns="http://exacttarget.com/wsdl/partnerAPI">
            <RetrieveRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
            	<Options>
            		<Client>
            			<ID>{{AccountMID}}</ID>
            		</Client>
            	</Options>
                <ObjectType>BusinessUnit</ObjectType>
                <Properties>ID</Properties>
            </RetrieveRequest>
        </RetrieveRequestMsg>
    </soap:Body>
</soap:Envelope>

Выше мыльное тело

Я получаю следующую ошибку:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title>Error</title>
	<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1" />
	<meta name="CODE_LANGUAGE" content="C#" />
	<meta name="vs_defaultClientScript" content="JavaScript" />
	<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
</head>

<body style="margin: 0px; padding: 0px; font-family: Arial;">
	<table style="height:100%; width:100%;" border="0" cellpadding="5" cellspacing="0">
		<tr style="height:10%; background-color:#808080">
			<td>
				<div style="color:#ffffff; font-size: 16px;">An error has occurred and has been logged by our system.
					<br />
						Thank you. </div>
			</td>
		</tr>
		<tr valign="top">
			<td>
				<div id="errorTxt">&nbsp;</div>
			</td>
		</tr>
	</table>
</body>

</html>

введите здесь описание изображения

любые подсказки, что происходит не так.


person ShekharApp    schedule 24.05.2020    source источник


Ответы (1)


Я перешел от логики токена к логике пароля пользователя, плюс запрашиваю всю учетную запись и могу получать данные по мере необходимости.

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
        <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:UsernameToken>
                <wsse:Username>{{Username}}</wsse:Username>
                <wsse:Password>{{Password}}</wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
        <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
            <RetrieveRequest>
                <ObjectType>BusinessUnit</ObjectType>
                <QueryAllAccounts>true</QueryAllAccounts>
                <Properties>ID</Properties>
                <Properties>ParentID</Properties>
                <Properties>Name</Properties>
                <Properties>Client.ID</Properties>                
                <AccountUsers>
                    <AccountUser>
                        <Properties>Email</Properties>
                    </AccountUser>
                </AccountUsers>             
            </RetrieveRequest>
        </RetrieveRequestMsg>
    </soapenv:Body>
</soapenv:Envelope>
person Chandrashekhar Dautpure    schedule 11.07.2020