cancel
Showing results for 
Search instead for 
Did you mean: 

Obtaining a List ID manually still possible?

Occasional Participant

Obtaining a List ID manually still possible?

I have an API script created for me by a developer I hired for the purpose awhile back. I use it to coordinate constant contact list sign-ups with my webinar registrations from my website.

 

Up until the recent changes I used to be able to create a new list for my webinar events and obtain it's list ID for use with my API script by going into the contact's admin section and displaying the list of my lists and hovering the mouse over the link for the list and I could see its ID in the link's URL.

 

This has all changed, however, and when I called their tech support line I was directed here.

 

Does anyone know how I can obtain my list IDs now without having to pay to get a script written for that purpose?

 

Thanks,

Simeon

 

UPDATE: I managed to find and use https://api.constantcontact.com/ws/customers/{username}/lists in my browser and my API key/pass etc to get the browser to generate an xml of my lists. Problem is, they are not all there, looks like some sort of limitation on how many it will return or something.

 

Any help would be appreciated on how to get them all or at least the IDs for those which were most recently created.

8 REPLIES 8
Moderator

Re: Obtaining a List ID manually still possible?

That API endpoint you mentioned is a paginated endpoint, it only allows up to 50 lists per request.  Within the payload of the request is a link to the next set of 50 lists (which will have another next link if there are any more, etc.).  You can then use these next links in your browser URL to get the next set of lists.  This is probably the easiest way to do that. 

 

Sorry for the workaround here, we did not intend the selection of lists to be done this way with an API integration.  We usually recommend developers use our Lists endpoint to allow users to select their lists through the API.  The UI workaround to mouse over links and see the ID was more a clever use of the way we had previously formatted lists but that was not intentional on our part and never recommended or support. 

 

If you still have access to the developer that built this integration for you, it could be a better experience for you long term to have them update the integration to use all of our API endpoints.  We can certainly help them if they have any questions.

Dave Berard
Senior Product Manager, Constant Contact
Occasional Participant

Re: Obtaining a List ID manually still possible?

Hi Dave, TY for responding.

 

Problem is there is no clickable hyperlink in the xml fil being generated to the next 50 lists other wise I would be fine with it. I saw that there should be a link someplace else too prior to posting about this limitation here.

 

The only thing I see that might be this link is this:

 

<link href="/ws/customers/{username}/lists?next=85" rel="next"></link>

 

I tried this in the browser in its own tab like this:

 

https://api.constantcontact.com/ws/customers/{username}/lists?next=85

 

But this only generates an error, so it apparently needs to be executed from within the original document but there is nothing to click when it is in xml like that.

 

Please advise.

 

Thanks,

Simeon

Moderator

Re: Obtaining a List ID manually still possible?

The link in the XML is a partial URL (/ws/customers/{username}/lists?next={someValue}).  The URL is also potentially XML encoded, so you could have to decode it prior to using it.  Then, you would combine it with the base URI (https://api.constantcontact.com) to get the real URL of the next 50 lists in your account.

 

It sounds like you may be using an integration that you didn't develop.  This certainly is not the ideal experience to use an integration and we have developed the API to not require any user to have to deal with this.  It may be best to get in touch with the developer of the integration to have them update it to use all of the API endpoints effectively or potentially use a different integration that has a better user experience.  Can you share more information about it with us?

Dave Berard
Senior Product Manager, Constant Contact
Occasional Participant

Re: Obtaining a List ID manually still possible?

The developers did what I asked and t has worked perfectly until you made changes to the CC system recently. I am not needing or wanting a fully itegrated API list/contact management system. I have one small specific circumstance wherein I need some automation to save me time, that is what I hired the developers to create for me.

 

As I had noted in my previous post I had properly adjusted the URL in the XML file. In playing with it some more (I am using this in a browser as previously stated) if I adjust the "next=" number parameter in the URL I get different results. For example if I use 180 it pulls up just the very end of the list where my most recently created lists are and then I can view the page source and see the listID there.

 

I have played around with using different numbers in that URL's "next=" parameter but have not been able to yet determine the exact logic that causes it to produce what it does. In other words, why entering 180 would produce only that last page of results I am unsure.

 

Is there a parameter that could be used that would produce multiple pages of results? The "next" parameter only produces one page.

 

What is the logic behind limiting the .../lists result to only one page of results to start with?

 

Thanks,

Simeon

Moderator

Re: Obtaining a List ID manually still possible?

We did confirm with our tests that the ?next=XXX functionality for list pagination is working correctly.  This could have something to do with invalid encoding or data modifications in using a browser to display the XML.  We recommend using something intended to make API test calls, such as the Google RestClient project or the Postman REST client for Chrome browsers

 

The reason we do pagination for lists, and all of our API endpoints, is for performance reasons.  Any account with a very large number of lists could potentially cause very long processing times, extremely large payloads, etc.  In our v1 API, which you are using, the pagination is limited to 50 results per request.  In our v2 API, we have increased this maximum to 500 per request.  However, the v2 API does not allow you to use Username/Password authentication.  You could use our API tester to access your account, but it would require you to create a new API key and set that up.

 

I certainly understand your frustration on this.  We certainly did not intend to have our customers dealing with these types of issues.  My apologies for the impact our changes have had on your process.

Dave Berard
Senior Product Manager, Constant Contact
Solution Provider

Re: Obtaining a List ID manually still possible?

And two years later it still hasn't been addressed?   Is there a status update on making this available?

Highlighted
Moderator

Re: Obtaining a List ID manually still possible?

Sorry for any confusion there may have been on this topic. We are not planning any changes to make list ID available as it was in our older contact management platform.  The integration described above is not a recommended or supported way of building an integration with Constant Contact.  I apologize for any frustrations this may cause to customers who were using our UI that way.  We are not able to prioritize the level of effort it would take to to implement these changes in our UI to support this workflow given that we already have alternative solutions available through the API that do support this today. 

Dave Berard
Senior Product Manager, Constant Contact

Re: Obtaining a List ID manually still possible?

To find list IDs go https://ui.constantcontact.com/rnavmap/em/contacts/signuptools the click on sign-up forms. You will then be presented with a list of list. The ID is in the html of the list element. It is denoted by the attrubute data-id.
See the attached image.


constant contact.PNG