0

This code works fine (I am getting data):

            ETDataExtension de = new ETDataExtension
        {
            AuthStub = mcClient,
            SearchFilter = new SimpleFilterPart
            {
                SimpleOperator = SimpleOperators.equals,
                Property = "Name",
                Value = new[] { "<name from MC>" }
                //Property = "CustomerKey",
                //Value = new[] { "<external key from MC>" }
            }
        };           //ETClient mcClient = new ETClient();
        GetReturn deGet = de.Get();

but this one is getting an "Error: API Permission Failed." for getQuery.Message, 0 for Code, and false for Status.

        ETQueryDefinition query = new ETQueryDefinition
        {
            AuthStub = mcClient,
            SearchFilter = new SimpleFilterPart
            {
                SimpleOperator = SimpleOperators.equals,
                Property = "Name",
                Value = new[] { "07_Append_JobFill_Staging_Hourly_Test" }
                //Property = "CustomerKey",
                //Value = new[] { "<external key from MC>" }
            }
        };
        GetReturn getQuery  = query.Get();

I am using FuelSDK v.1.1.1

Is there a property that needs to be set/filtered that I am missing?

  • Are you using a fueloauth token or are you using the old username/password authorization? – Mike Mar 28 '19 at 13:38
  • using clientID and clientSecret when creating ETClient instance (mcClient) that was created for me. Its been working for getting data extension information, fields, folders. – rokzi Mar 29 '19 at 2:14
  • I would suggest making a Postman//Insomnia/whatever requests using a fueloauth token to attempt to retrieve the query def to see if that works. I have seen a number of SOAP calls in which username/password authorization does not return results and have had to enhance that Fuel SDK in my solution(s) to use fueloauth in all cases. – Mike Mar 29 '19 at 13:59
  • Apologies for not posting back sooner. i have the code working now as is. I do not really know what fixed it but I am now on FuelSDK v. 1.2.1. It could be that. – rokzi Jul 13 '19 at 18:22

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.