Search Contacts By Email Address

Highlighted
Occasional Participant

Search Contacts By Email Address

Hi,


I know that I can search for contacts by email address by issuing a GET with multiple email addresses like so:


https://api.constantcontact.com/ws/customers/joesflowers/contacts?email=u89439%40example.com&email=u10432%40example.com


I am finding that in certain cases, my query string exceeds the maximum length and things error out. Is it currently possible to perform this query using a POST?


If not, I can come up with serveral workarounds, but the POST option would be best, if available.


Thanks for any advice.


Matt

7 REPLIES 7
Highlighted
CTCT Employee

search contacts by email address

Hello,



Do you know how many characters you were posting that started giving you the error? Also, what type of error does it give you? I am going to look into this on my end and see if this is something that we can try to fix, or if this is a limitation with the length of URI's.



Currently the only way to search for specific contacts on our end would be do do this through the URI. The other way would be to do this on your end by doing a GET of the contacts URI, and getting a list of all contacts in your account, then parsing them out manually.



If you have any questions please let me know.



Sincerely,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
CTCT Employee

search contacts by email address

Hello,



Do you know how many characters you were posting that started giving you the error? Also, what type of error does it give you? I am going to look into this on my end and see if this is something that we can try to fix, or if this is a limitation with the length of URI's.



Currently the only way to search for specific contacts on our end would be do do this through the URI. The other way would be to do this on your end by doing a GET of the contacts URI, and getting a list of all contacts in your account, then parsing them out manually.



If you have any questions please let me know.



Sincerely,

Benjamin Soder
NOC Analyst
Constant Contact
Highlighted
Occasional Participant

search contacts by email address

Hi Ben,


Here's the logged exception:


The remote server returned an error: (414) Request-URI Too Long. ---> System.Net.WebException: The remote server returned an error: (414) Request-URI Too Long.


I can get you the exact uri. Just need a couple of minutes to add some additional logging and redeploy to QA. I'll post here shortly.


Thanks,


Matt

Highlighted
Occasional Participant

search contacts by email address

Hi Ben,


I've got a version of the URI that fails. I'd rather not post it - do you have an email I could send it to?


I do have a working solution now using your suggestions, so there is no panic on this - just following up.


Thanks,


Matt

Highlighted
CTCT Employee

Re: search contacts by email address

Hi Matt,


You can certainly send this over to our webservices support team and we would be happy to take a look. Thanks!

David J

Highlighted
Member

Re: search contacts by email address

Hello, 

What was the solution for this post?

I have a similar problem and was wondering what was the workaround.

Thanks,

Stefan Corjinovschi 

Highlighted
Moderator

Re: search contacts by email address

Unfortunately, I'm not able to find the email that was sent to us for this issue. You can feel free to send us the information you're using, and we can see if there is a workaround, or you can set your searches to run multiple times.

Nick Galbraith
Support Engineer
Developer Portal

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

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured