I'm trying to create a campaign using the CM API and I'm receiving an error..
I receive an error from the API:
stdClass Object ( [Code] => 310 [Message] => HTML Content URL Required )
The URL I am passing is this (path is the path to the PHP file):
The PHP Code is:
$args = array(
'Subject' => $post->post_title,
'Name' => $post->post_title + time(),
'FromName' => get_option('cm_from_name'),
'FromEmail' => get_option('cm_from_email'),
'ReplyTo' => get_option('cm_reply_to'),
'HtmlUrl' => "http://path/display.php?pt=mediarelease&type=html&id=".$post->ID,
'TextUrl' => get_bloginfo("url") . "/path/display.php?pt=mediarelease&type=text&id=".$post->ID,
'ListIDs' => $subscribers
$campaign = $cm_campaign->create(get_option('cm_client_id'), $args);
Can someone please help as I have a deadline to have this up and running for the client by the end of the week!
It's hard to troubleshoot these things without precise details, so if my suggestions here don't help, i'd advise contacting support with more specific information.
But most likely you're receiving that error because the eventual value of HtmlUrl isn't accessible to our servers. You need to ensure that anything you put into HtmlUrl and TextUrl is visible to the web in general. Is it a public page, or something limited to just your intranet? For example, can you see it from home, or in a web proxy like kproxy?