1

I am using C# and the FuelSDK to use the Marketing Cloud API. I have tried multiple methods but they each give me the same Exception -> Method Not Allowed.

I looked into this but i couldn't find the exact reason why i'm getting this error.

Config:

  <fuelSDK appSignature="none"
     clientId="xxxxxxxxxxxxxxxxxxxxxxxx"
  clientSecret="xxxxxxxxxxxxxxxxxxxxxxxx"
  authEndPoint="https://xxxxxxxxxxxxxxxx-xxxxxxxxxxx.auth.marketingcloudapis.com/"
  soapEndPoint="https://xxxxxxxxxxxxxxxx-xxxxxxxxxxx.soap.marketingcloudapis.com/"
  restEndPoint="https://xxxxxxxxxxxxxxxx-xxxxxxxxxxx.rest.marketingcloudapis.com/" />

<system.serviceModel>
  <bindings>
   <basicHttpBinding>
     <binding name="MC binding">
       <security mode="Transport" />
     </binding>
  </basicHttpBinding>
 </bindings>

  <client>
      <endpoint address="https://xxxxxxxxxxxxxxxx-xxxxxxxxxxx.soap.marketingcloudapis.com/"
       binding="basicHttpBinding" bindingConfiguration="MC binding"
       contract="FuelSDK.Soap" name="FuelServicePort" />
  </client>
</system.serviceModel>

Code:

private static void startSQl()
{
    var client = new SoapClient();

    String requestId = "";
    string sOverallStatus = "";
    string sOverallStatusMessage = "";

    QueryDefinition qd = new QueryDefinition();
    qd.Name = "ApiTester";
    qd.CustomerKey = "ApiTester";

    PerformResult[] results = client.Perform(new PerformOptions(), "start", new APIObject[] { qd }, out sOverallStatus, out sOverallStatusMessage, out requestId);
}

Your Answer

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

Browse other questions tagged or ask your own question.