campaignmonitor/createsend-dotnet

createsend_dotnet.Template.Create method not working now from 9-Feb-2016

ArifurKhan opened this issue · 4 comments

Dear Concern,

I am working on your API from last month and from the last month, I successfully created template, create campaign by calling your API. But suddenly I am getting Error Code: 4350 when I try to create template and according to your API documentation it means :

4350: Files Missing from ZIP File
"It appears that there are files missing from your zip file which are referenced by your HTML file. Please ensure that all necessary files are included in the zip file and that the HTML file references all other files correctly."

But I tried according to your suggestion and not included in my API call. See the below examples which I tried :

  1. Template.Create(auth, cid, campaignname,templateurl, null);
  2. Template.Create(auth, cid, campaignname,templateurl, "");

Even I tried with a valid zip file url also like
3. Template.Create(auth, cid, campaignname,templateurl, validzipfileurl);

But for all the above stated cases, I got 4350 error code.

where templateurl = https://cnaalpha.247salescenter.com/emailtemplates/buyline%20for%20agents/buyline-email-template.html
. Though I dont need a zip file. But I also tried the 3 rd option and my zip file url =
https://cnaalpha.247salescenter.com/emailtemplates/buyline%20for%20agents/emails.zip

My project is about to go live and in this stage, I can not create template as well as campaign. Our owner is a big client of yours. So please hurry and give me a solution about how to create template.

Sorry to hear that you are having issues. I'll have a look and see if I can work out what is going on.

In the meantime, could you confirm whether https://cnaalpha.247salescenter.com/emailtemplates/buyline%20for%20agents/emails.zip is pointing to an actual zip file? For me it is 404ing (redirecting to https://agent.247salescenter.com/404.aspx ).

I just wrote a unit test as follows - it runs fine and it appears to create the template fine:

    [TestMethod]
    public void TestMethod1()
    {
        var auth = new ApiKeyAuthenticationDetails("apikeyhere");

        var template = Template.Create(auth, "clientidhere", "BobTemplate",
            "https://cnaalpha.247salescenter.com/emailtemplates/buyline%20for%20agents/buyline-email-template.html",
            null);
    }

If you write a unit test and run the same code (putting in your appropriate api key and client id) does it also pass and create the template?

Thanks Mr Wills.

My issue is solved. I sent email to campaign monitor help desk meanwhile and they replied that there is a issue in my html template where there is an image link which was not accessible. So the api searches for that image in the zip file and since I didnt provide zip file url ( even when I provided zip file, that didnt include that image) and as a result I was getting that error.

If there is a specific error code for this issue specifying the problem was in the html file, then it would be easy for me to solve this.

Campaign Monitor support team also agreed with me and here is there reply

**Hey Arifur,

Thanks for following up here! You're absolutely right that it would make much more sense to provide a clear error there to indicate an image could not be found, I'll let our product team know of the issue you saw.

Sorry again for the confusion with this! Please do let me know if you have any other questions.**

Awesome, excellent to hear that you got it working.