• Tim Greenwood
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hello,

I am trying to use the SOAP API, authenticating using the newest OAuth 2.0 features (Using the new "enhanced features" installed package), however any SOAP requests I make result in a "Error: API Permission Failed."

I have played around with the package's permission, re-created the packages, on several instances, always with the same results.  The moment I revert back to using a token obtained via the Legacy package the requests work as expected.

Below is an example request/response for a simple request to retrieve data extensions:
 
=========== Request ===========
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://exacttarget.com/wsdl/partnerAPI">
  <SOAP-ENV:Header>
    <SOAP-ENV:fueloauth>ZKCQIyLMVJoSXYIAFuvk3r6a</SOAP-ENV:fueloauth>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:RetrieveRequestMsg>
      <ns1:RetrieveRequest>
        <ns1:ObjectType>DataExtension</ns1:ObjectType>
        <ns1:Properties>Name</ns1:Properties>
        <ns1:Properties>CustomerKey</ns1:Properties>
        <ns1:Properties>CategoryID</ns1:Properties>
      </ns1:RetrieveRequest>
    </ns1:RetrieveRequestMsg>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<?xml version="1.0" encoding="utf-8"?>

=========== Response ===========
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
  <soap:Header>
    <wsa:Action>RetrieveResponse</wsa:Action>
    <wsa:MessageID>urn:uuid:432bc01d-4a73-47b4-961b-470ed5f0a9ff</wsa:MessageID>
    <wsa:RelatesTo>urn:uuid:85e421bf-ce04-4bcf-a86c-7643edb63ea2</wsa:RelatesTo>
    <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
    <wsse:Security>
      <wsu:Timestamp wsu:Id="Timestamp-9e129000-dbc7-4146-9772-edcaf925da47">
        <wsu:Created>2019-03-04T21:02:49Z</wsu:Created>
        <wsu:Expires>2019-03-04T21:07:49Z</wsu:Expires>
      </wsu:Timestamp>
    </wsse:Security>
  </soap:Header>
  <soap:Body>
    <RetrieveResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
      <OverallStatus>Error: API Permission Failed.</OverallStatus>
      <RequestID>a96f0362-7754-4b7f-94c9-988fa314558c</RequestID>
    </RetrieveResponseMsg>
  </soap:Body>
</soap:Envelope>

I have also attached a screenshot showing the configuration of the API component in my package.

User-added image

It seems as though the permissions are not being applied correctly.  Is there any additional steps I might be missing to be able to use OAuth 2.0 with SOAP API requests ?  Any other insights regarding this issue?

Thank you!