I'm trying to add some contacts using the php wrapper of the getresponse mailer. On their official API docs, it says addContacts() should return a code and a message, but in my case, it returns NULL, which has grown quite upsetting. I can't really see my mistake.
Many thanks in advance.
Notes:
- The second case of the if returns an empty array.
- I've checked the variables literally dozens of times and they're correct.
- I've tried three different email addresses, but to no avail.
Here's the code:
require_once('GetResponseAPI.class.php');
$api = new GetResponse('apikey'); //triple checked. it is correct
echo '<pre>';
var_dump($_GET);
if($_GET['action_type'] == "register_new"){
$response = $api->addContact($_GET['campaign_id'], "john smith", $_GET['email']);
var_dump($response);
}else if($_GET['action_type'] == "check_existance"){
$contacts = (array)$api->getContacts((array)$_GET['campaign_id']);
var_dump($contacts);
}
echo '</pre>';