cant get the subscriber.add to work

hi all

very new to this so go easy :)

i am simply trying to use the api with PHP and SOAP (nuSOAP) - but am having some problems...

here is my code - any ideas?


$APIKey = 'xxxxxxxxxxxxxxx';
$ListID = 'xxxxxxxxxxxxxxxxxx';
$email = "";
$name = "test";

$s = new soapclient('',true); //or $s = new soapclient('');

$prams = array('ApiKey' => $APIKey, 'ListID' => $ListID, 'Email' => $email, 'Name' => $name);

$rVal = $s->call('Subscriber.Add',$prams,'', '','','','rpc','literal');

if(!$err = $s->getError()){
    echo 'Result Code '.$rVal['Code'].' - '.$rVal['Message'].'<br><br>';
    echo '<strong>Error:</strong> '.$err.'<br><br>';

if i use the ?wsdl for the client i get the error
'Error: operation Subscriber.Add not present.

if i use the non wsdl i get this
'Result Code 101 - Invalid ListID'

any help appreciated


natty, 8 years ago

well in case anyone cares.. found the answer

seems it preferred a call like this :
$res = $s->call('AddSubscriber',$prams,'', '','','','rpc','literal');

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