I just registered a new API key for a different CC account different from the one I had been using. Using the exact same code (aside from username/password and api key), I get a 400 - Bad request from CC when trying to add a new contact via a web form.
I can even use the code (in question) that is not working, with the username/pass/key fom the other account and it works fine.
Is there some kind of wait period or activation I am missing?
If you're changing accounts, the 400 error likely is something about the data you're sending that is account specific such as List ID. Have you looked at the error message we are sending back to you to see what it is that is wrong with the data? Typically we send back a very detailed and specific error message in the response body of the 400 error that tells you exactly what is wrong with the data.
It seems like the lists are the right direction, but I get my error trying to get a response from CC server, so dot net returns the code, but no information.
This is the string as I am sending to CC - MYACCOUNT is depersonalized
I have found many posts that are no longer valid as per finding a list Id. Why should this be so convulated, ever changing when it is so widely used? After all, it's just a numeric Id..
Any more clear examples/KB articles etc to get this?
Sorry for the frustrations you're having. We have not changed how list IDs are retrieved through the API in nearly 5 years. However, there were some unintended ways to find the list ID in our UI by poking around under the covers of our website application. Those are always changing as we change our product and were not intended to be used by integrations leveraging our API.
We provide API endpoints in both our v1 and v2 API for pulling lists. For the v2 API, you can find the documentation here: http://developer.constantcontact.com/docs/contact-list-api/contactlist-collection.html
For the v1 API, you can find the documentation here: https://community.constantcontact.com/t5/Documentation/Retrieving-a-Contact-List-Collection/ba-p/250...
Both of those API calls will provide you with all of the lists in your account and the IDs of those lists. Hope this helps!
I found that and got help via the mashery site but unfortunately spent too much time before I got your response.
It appears the new ListIds (from newly generated Lists) are long int where as the previous ListId where a small num starting at 1. Adding a contact to using a new style ListIds added the contact to that listId and to some old style listids - almost at random. Very strange! I had to remove the old lists and move contacts over t keep things straight.