Hi all!
I have a sandbox account. I’m using PHP API wrapper. It’s working fine in terms of adding contact to a list etc.
When it comes to adding a contact to automation, I get the response from server that contact was added, but in fact it’s not!
I’ve simplified the script to demo the issue:
define("ACTIVECAMPAIGN_URL", "__url__");
define("ACTIVECAMPAIGN_API_KEY", "__key__");
require_once("includes/ActiveCampaign.class.php");
$ac = new ActiveCampaign(ACTIVECAMPAIGN_URL, ACTIVECAMPAIGN_API_KEY);
$auto = array(
"contact_id" => 11,
"automation" => 2
);
$res = $ac->api("automation/contact/add", $auto);
$success = $res->success;
$error = $res->error;
print (json_encode(array('success' => $success,'error' => $error,'debug' => $res)));
the server response:
{
http_code: 200
result_code: 1
result_message: "Contact added to automation"
result_output: "json"
success: 1
}
When I check the automation 2, there are no contacts added to automation there.
Note: contact ID 11 does exist, Automation 2 does exist.
Any ideas? I would appreciate any help.
Thanks!