API SOAP Exception

I've been trying to create a new template using CampaignMonitorAPIWrapper.Template.Create call. The API called seemed to be working I was getting the following error.
Return Message : Invalid HTML Page URL

This was correct as the URL was locked down to specific IP ranges. I opened up the page to the IP's on your white list http://help.campaignmonitor.com/topic.aspx?t=77

I am now getting this error( SOAP Exception):

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: Sorry, but we've run into a problem. Please try again or contact support\n   at Pronto.API.ExceptionHandlers.TryThis[T](WebService service, Func`1 body)\n   at Pronto.api.api.CreateTemplate(String ApiKey, String ClientID, String TemplateName, String HTMLPageURL, String ZipFileURL, String ScreenshotURL)\

I'm using the .net library.

Can you shed some light on this?
Many thanks

tobystokes, 7 years ago


I've found the problem. I was passing null for the zip file and screenshot when I should have been passing an empty string. e.g.

var templateID = CampaignMonitorAPIWrapper.Template.Create(APIKey, ClientID, "Test template 2", "http://example.com/SimpleTest/Render/", string.Empty, string.Empty);

instead of

var templateID = CampaignMonitorAPIWrapper.Template.Create(APIKey, ClientID, "Test template 2","http://example.com/SimpleTest/Render/", null, null);


Join 150,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free