1

I have 2 instances of Marketing Cloud I'm currently working with. Both have been configured identically for API access and I created a OAUTH 1 package for Web API integration for each of them.

Security settings for each instance and both users are set the same.

I'm using Postman and the Marketing Cloud library from GitHub to make the calls.

Instance 1 works perfectly. I can make Soap calls to retrieve Data Extensions and create them.

Instance 2 allows me to retrieve a token, but no other SOAP calls work. Every call I make returns the following error:

<h2>405 - HTTP verb used to access this page is not allowed.</h2>
<h3>The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.</h3>

Any idea what could be causing this?

EDIT (2/17/2019): I am using POST and the SOAP Endpoint to make the calls after requesting a token.

Here is an example of one of the Soap calls I made to create a test Data Extension:

    <?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <s:Header>
      <a:Action s:mustUnderstand="1">Create</a:Action>
      <a:MessageID>urn:uuid:7e0cca04-57bd-4481-864c-6ea8039d2ea0</a:MessageID>
      <a:ReplyTo>
         <a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
      </a:ReplyTo>
      <a:To s:mustUnderstand="1">{{soapEndPoint}}</a:To>
      <o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
         <o:UsernameToken>
            <o:Username>{{soapUsername}}</o:Username>
            <o:Password><![CDATA[{{soapPassword}}]]></o:Password>
         </o:UsernameToken>
      </o:Security>
   </s:Header>
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
        <!--
            <Options>
             <SendResponseTo>
          <ResponseType>email</ResponseType>
          <ResponseAddress>your_address@salesforce.com</ResponseAddress>
          <RespondWhen>OnCallComplete</RespondWhen>
          <IncludeResults>true</IncludeResults>
          <IncludeObjects>true</IncludeObjects>
         </SendResponseTo>
             <RequestType>Asynchronous</RequestType>
            </Options>
        -->
         <Objects xsi:type="DataExtension">
            <Client>
                <ID>{{accountId}}</ID>
            </Client>
            <CustomerKey>de_custkey</CustomerKey>
            <Name>DE Test</Name>
            <!-- Specify folder DE created in
            <CategoryID>432655</CategoryID>
            -->
            <IsSendable>true</IsSendable>
            <SendableDataExtensionField>
                <CustomerKey>SubscriberKey</CustomerKey>
                <Name>Subscriber Key</Name>
                <FieldType>Text</FieldType>
            </SendableDataExtensionField>
            <SendableSubscriberField>
                <Name>Subscriber Key</Name>
                <Value/>
            </SendableSubscriberField>
            <Fields>
                <Field>
                    <CustomerKey>SubscriberKey</CustomerKey>
                    <Name>Subscriber Key</Name>
                    <FieldType>Text</FieldType>
                    <MaxLength>50</MaxLength>
                    <IsRequired>true</IsRequired>
                    <IsPrimaryKey>true</IsPrimaryKey>
                </Field>
                <Field>
                    <CustomerKey>EmailAddress</CustomerKey>
                    <Name>Email Address</Name>
                    <FieldType>EmailAddress</FieldType>
                    <IsRequired>true</IsRequired>
                    <IsPrimaryKey>true</IsPrimaryKey>
                </Field>
                <Field>
                    <CustomerKey>FirstName</CustomerKey>
                    <Name>First Name</Name>
                    <FieldType>Text</FieldType>
                    <IsNillable>true</IsNillable>
                    <IsPrimaryKey>false</IsPrimaryKey>
                </Field>
                <Field>
                    <CustomerKey>SignupDate</CustomerKey>
                    <Name>Signup Date</Name>
                    <DataType>Date</DataType>
                    <IsNillable>true</IsNillable>
                    <IsPrimaryKey>false</IsPrimaryKey>
                    <FieldType>Date</FieldType>
                </Field> 
            </Fields>
         </Objects>
    </CreateRequest>
  </s:Body>
</s:Envelope>
  • Going to guess you are using GET not POST? – Doug Feb 18 at 2:28
  • Nope, using POST. Tried GET for the heck of it after POST wasn't working. – Karl Barndt Feb 18 at 2:55
  • put like "SoapAction: Create" in header – pkharries Feb 18 at 5:35
  • @pkharries I was using "SoapAction: Retrieve" in the header. I just tried your suggestion and still get the same result. – Karl Barndt Feb 18 at 12:59
  • you need to create data extension with some fields right? – pkharries Feb 18 at 13:24
1

I was using the SOAP Base URI from the package I created. When I switched to "webservice.exacttarget.com/Service.asmx" for my endpoint it worked perfectly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.