We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Contact List ID is not valid

bhachmeister
Occasional Participant

Contact List ID is not valid

Actually, it's a 400 error:

400Contact List id: 'http://api.constantcontact.com/ws/customers/fakeusername/lists/fakelistname' is not valid

My code finally gained access to the CC server, but now I am getting the above error in response to trying to post a new contact to my list.
The username and listname actually used in the URL is definitely correct, since I can sign on through the CC web site using them and look at that list.
I didn't put my API key and the "%" on the front of the username either in the POSTed URL or in the XML. I did use the API key when I set up my credentials.
So... any idea what I'm doing wrong?
1 REPLY 1
CC_TomM
Frequent Participant

Hello,

The "fakelistname" is the "title" for your list. It is not the Contact List "id". Valid List ids for customer specific lists (like 'fakelistname') are numeric. You can use the Contact Lists Collection resource to retrieve the set of Contact Lists that exist in an account and the associated List ID (number) for the list. Your URL will look something like this:

http://api.constantcontact.com/ws/customers/fakeusername/lists/17



System defined lists (which have fixed titles) like "Active" and "Removed" are identified by their text names.



Thanks,
Tom M
Group Product Manager – Content Editing
Constant Contact
Developer Portal

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

Visit Page