[SalesForce] Salesforce Marketing Cloud SOAP API: Which Username and Password I need use for SOAP API calls

I need to make SOAP API calls to get the data in Data Extension present in Salesforce Marketing Cloud.

As per Salesforce link, it says using "Username" and "password" in the SOAP call (https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/retrieving_data_from_a_data_extension.htm).

Which credentials I should be using SFMC login credentials or Marketing Cloud App Login Credentials?

Best Answer

What you need is your username and password (the same one you use to access SFMC). You would need to ensure that your user is a "API enabled" first though.

See below from SFMC documentation:

Authenticate with UsernameToken

You can use a Marketing Cloud username and password to authenticate your calls. UsernameToken authentication is simple but not as secure as access token authentication.

When setting up the Marketing Cloud user, select API User. For Marketing Cloud accounts with role-based permissions, select the Role | Email | Admin | API Access | WebServices API permission. For accounts with legacy permissions, select the Grant the user access to the web services permission. Use the Marketing Cloud username and password to authenticate your SOAP calls in the header.

Sample Header below:

<soap:header>
     <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <UsernameToken>
             <Username>XXXXX</Username>
             <Password>XXXXX</Password>
         </UsernameToken>
     </Security>
    </soap:header>
Related Topic