Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.
Based on the provided code, there are two areas that may need to be adjusted:
$contact->id = "12345678"; I would remove this line from the code, as we assign an ID automatically upon creating the contact.
$contact->addList('099896ba-0ce6-11eb-81d5-**********'); This line appears to be identifying the list_id. The V2 API doesn't use the list_id and needs a different value here, as V2 and V3 APIs use different formats for list IDs.
If you are unsure how to get the correct values for the account's lists, you can use this function from the PHP SDK: http://constantcontact.github.io/php-sdk/class-Ctct.Services.ListService.html#_getLists
You can also just use the V2 API tester to get those values:
https://v2.developer.constantcontact.com/docs/contact-list-api/contactlist-collection.html
If fixing those two items doesn't resolve the issue, we would need to know the new response you’re receiving, preferably with the full error message so that we can look into this further for you.
... View more