The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

API Authorization

Highlighted
Occasional Participant

API Authorization

Do I need only one authorization code for the Account, or one per list ID?

6 REPLIES 6
Highlighted
Employee

Re: API Authorization

I am not sure what you mean by 'authorization code', but I am assuming that you are referring to an api key? If so, you only need to have 1 api key for you account, and in-fact, this can be used across multiple accounts. The key is not account specific, and each seperate application/integration that you develop should have their own api key.


 


Regarding the list ID, each list had their own ID but this is not tied to the apikey in any way. You can retrieve your list ID's by performing an http GET on https://api.constantcontact.com/ws/customers/{user-name}/lists. For more information on retrieving all of your lists, please visit Retrieving a Collection of Contact Lists.


 


I hope this helps. Please let me know if you have any questions.If this is not what you were referring to please let me know.

David J

Highlighted
Occasional Participant

Thanks

That is what I wanted to know.


I have a working program using the api to enter new contacts into my list, but it only works with list 1. I used the api you mentioned to get the list ID of a different list. I change the working api to the new list Id and it does not work. Any ideas?

Highlighted
Employee

List ID

Hello,



Once you receive the list ID, are you adding the ID to the XML that you are passing when you send the post to the Contact Collection URI?



If you look at that link, we have sample XML that has the requirements of what you need when you post to the collection. In the sample you will notice towards the bottom this:



<ContactLists>

<ContactList id="http://api.constantcontact.com/ws/customers/geeksquad/joesflowers/lists/1" />

</ContactLists>



This is where you need to change the Contact List ID.  The number at the end is what the ID is, so you would change that before you do the post.



If you have any further questions regarding this, please let me know.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Occasional Participant

List Id

This is what I have which works on list 1, but not on the list 16


 


<ContactList id=\"http://api.constantcontact.com/ws/customers/account/lists/16\" />

      </ContactLists>

 


16 is the list Id of the list I am trying to use

Highlighted
Employee

List ID

Hi,



Does it give you an error when you post using List ID 16?



When you are retrieving the List ID, where are you getting the data on the List Collection XML? It should be the ID tag, not SortOrder:



<id>http://api.constantcontact.com/ws/customers/joesflowers/lists/2</id>



If you are still having an issue with it, is it possible you can send the XML you are using, as well as your username, and the list name that you are trying to add the contact to?  You can send it to the webservices support team.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Occasional Participant

Moved question to correct forum

No comment, moved to other forum.

Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured