cancel
Showing results for 
Search instead for 
Did you mean: 
Some customers are seeing intermittent errors when attempting to upload a new image or insert an image into their email. While we look into getting this fixed we have found if you try to reattempt your previous action, the image will be visible. We apologize for this inconvenience.

Contact list not showing when retrieving campaign details using ws API.

Participant

Re: Contact list not showing when retrieving campaign details using ws API.

Hi Elijah,

I have more than 500 contacts in my contact list. I can get 500 contacts at a time with the help of following URL.


https://api.constantcontact.com/v2/lists/<ListID>/contacts?api_key=<APIKey>

But I need all contacts. After researching in constant contact developer guide I found there is an option that I get all contacts(more than 500 contacts in a list). The method that I found is "next_link ".

As per the instruction I gave following URL for getting next contacts after 500 contacts.

https://api.constantcontact.com/v2/lists/<ListID>/contacts?api_key=<APIKey>&next=/v2/lists/<ListID>/...

But on this step "HttpWebResponse response = request.GetResponse() as HttpWebResponse;" I got following error.

"The remote server returned an error: (400) Bad Request."


Please help me on this.

Moderator

Re: Contact list not showing when retrieving campaign details using ws API.

Hello,

 

This is called using pagination and the URL is a bit different than what you have. You should have something more like this.

https://api.constantcontact.com/v2/lists/<ListID>/contacts?limit=500&api_key=<APIKey>

 

This will give you a response that includes a URL that will contain the next page of data. You can get the format that needs to be used and an example of the response from this website. (http://developer.constantcontact.com/docs/developer-guides/paginated-output.html)


Regards,
Jimmy D.
Tier II API Support Engineer
Participant

Re: Contact list not showing when retrieving campaign details using ws API.

Hi ,

 

Is there anyway to get Constant contact token using Requesting URL . Currently I am using Constant contact Authentication window to get token. I attached the screen shot with this mail. 

 

But I need a URL to get authentication token. Please help me on this and let me know how to proceed and how to take Token from it.


2016-07-22_204902.jpg
Participant

Re: Contact list not showing when retrieving campaign details using ws API.

Its an urgent task.Please help me on this.

Moderator

Re: Contact list not showing when retrieving campaign details using ws API.

Hello,

 

Without being able to see the code behind that window I couldn't say for sure what method is being used. However; it does not look like it is using oAuth 2. I am just guessing, but it is probably using a URL to request the Access Token. If you can look at the code you will probably see the information being sent.

 

I would suggest setting up your application to take advantage of oAuth 2 and you can find that documentation located here. http://developer.constantcontact.com/docs/authentication/authentication.html

 

If you just need to get an Access Token you can also retrieve that data using our I/O Docs located here. https://constantcontact.mashery.com/io-docs


Regards,
Jimmy D.
Tier II API Support Engineer