What is up with the example php code?
I'm getting a list not found error using the example addOrUpdateContact.php.
Connection and list retrieval works - but the add new contact seems to have issues?
Is there some param not getting set in the example code that needs to be set?
I know the list exists because I added code to print out all the lists returned,
it finds all 3 lists, and the new contact to add is not in the list so that works too,
then it goes to add the new contact and gets an exception with the error :
[error_key] => json.field.lists.value.invalid
[error_message] => The contact list WebSignup does not exist.
What am I missing? Thanks in advance.
When you pass in the ID of the list, you should be using the ID field, not the name. The error should in this case be interpreted very literally, the id "WebSignup" does not exist. Since you can change the name of the list at any time, the unique identifier is the ID, which will never change as long as the list exists. Just use the $contactList->$id value instead of $contactList->$name and you should be all set!