cancel
Showing results for 
Search instead for 
Did you mean: 

API Authorization

Occasional Participant

API Authorization

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

6 REPLIES
CTCT 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

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?

CTCT 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
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

CTCT 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
Occasional Participant

Moved question to correct forum

No comment, moved to other forum.

Still need help?
You can post a new message in the Community or find us on Twitter Mon-Fri 8am - 8pm ET. We've got real people waiting to help you out. Click below to start a conversation!