SOAP API Connection with Access Token

I am trying to connect to the SFMC SOAP API using an access token that I’ve successfully retrieved. (I have successfully made REST API request using same token.)

I’ve been struggling with this for a few days, but it does feel as if I’m missing something simple. I’m hopeful that someone will point out whatever it is:

I’ve cobbled together the raw SOAP by reviewing SFMC docs and a number of Q&As on this site. Assume that I have just retrieved a new {{access token}}


POST URL : https://{{xxxxx}}     
SOAPAction : Retrieve
Content Type : Text/XML; charset=UTF-8


<soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi="">
    <RetrieveRequestMsg xmlns="">
        <ObjectType>DataExtensionObject[{{DE Name}}]</ObjectType>

SFMC does not appear to like this request. I receive a Failure when receiving data from the peer error.

I believe it is SFMC because if I were to swap out the {{access token}} line in the SOAP Header with this:

<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="">

Then I get a response, but this time the error says: An invalid security token was provided

Additional (possibly) relevant details:

  • I’m performing these calls with R, using the httr package (which has worked for the access token and REST API requests)
  • Making the SOAP Request with invalid username/password gives me an Invalid Login error. I assume this means that my actual creds are making it past the login part of the process.

As mentioned, I do feel as if I’m missing something basic. Ideally, someone will be able to tell me how to get the {{access token}} variant working, but I’d settle for a good username/password connection too.


My team manages a postman collection that has a large collection of both SOAP and REST APIs. All of the SOAP calls use access token vs UN/PW that you can see for future examples.

Currently the collection is available at:

We’re working to get it added to the official Salesforce Postman network in the future.

Source : Link , Question Author : JPB , Answer Author : Aaron Cates

Leave a Comment