Adding a Contact with PHP

Participant

Adding a Contact with PHP

I am trying to add a contact via the API. I have tried several methods, and none have worked. So, I downloaded the CC package with cc_class.php, and the little mini interface to demonstrate the API. I've plugged in my username, password, and API key. When I go to the "Simplified form", and plugin a new email, first and last name, the system comes back with "An Error Occurred".

 

So I turned on $curl_debug, and this is the error I got: "The requested URL returned error: 400".

 

Can anyone assist me in getting this simple example to work?

 

Thanks!

1 REPLY 1
Employee

Hey Julia,

 

It sounds as if there was an error the XML before it was submitted.  This is typically the case when the XML does not contain necessary information such as a list or other node.  This should not happen if you are using our CC simple forms.   They should work as the are once you enter your own credentials.  I would suggest taking a look at our wrapper which you can find here. You will be able to find the documentation that you need to create a contact. 

 

Please let me  know if this helps.

Ryan Davis
Quality Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page