Hi Keap Support,
I have build an API call using Infusionsoft PHP Library, when i am hitting the direct url in the browser then tags are being assigned properly and when i am using that same url in my client campaign HTTP Post then contact is being created but tags are not being assigned.
Here is the API call url.
// Adding contact into IS system
$contactid = $infusionsoft->contacts('xml')->add($add_contact);
// Applying tags to the new added contact
$contact_service = $infusionsoft->contacts();
$contact_service->id = $contactid;
$contact_service->addTags($tagids);
// Marking Marketable to send emails
$infusionsoft->emails()->optIn($email,'SingleOptIn');
FYI: I have crossed verified the link i have just posted and the link i am using in the campaign is same. Only difference is, if you will access above link it will assign 3 tags properly, when we use in HTTP post then tags are not being assigned.
If I had to guess without testing, I would say that since in the browser you are passing a non existent contact to the code it works, creates the contact then tags it. However when doing the HTTP post in the campaign builder, the contact already exists, so when the add contact code runs it does not return a contactid as the contact exists and no new contact needs to be created so the add function does not return one.
Since you are doing a post from infusionsoft you already know the contact id, you can pass the code just that Id instead of email and name, think it is ~Contact.Id~, then you don’t need to run the add code and just tag instead.