Got a 'How do I' question? Join 'Ask a Trainer' Monday to Friday, 11am to 4pm ET for instant help and pro tips!

Getting "Internal server error" response when trying to export all contacts using V3 API.

SOLVED
Go to solution
user403551
Rookie
0 Votes

Hi, I am trying to export around 38709 contacts to csv using the V3 API but getting the following error response. I was able to export around 25000 contacts just fine.  I wonder if there is a limit when exporting all contacts and how to set it in the API.

{
    "error_key": "server_error",
    "error_message": "Internal server error"
}
 
  1. I started the activity to export contacts to csv using this API https://api.cc.email/v3/activities/contact_exports (POST) with no body data. [Image 1]
  2. Then I checked the activity status with this API https://api.cc.email/v3/activities/f913de52-49a7-11ed-b056-fa163e6e3085 (GET) and got completed state. [Image 2]
  3. Then I tried to export the csv using this API https://api.cc.email/v3/contact_exports/f91249c0-49a7-11ed-b056-fa163e6e3085 (GET) and after some time I get the "internal server error" response. [Image 3]

 

user403551_0-1665523129411.png

 

user403551_2-1665523169192.png

 

user403551_3-1665523201139.png

 

 

1 ACCEPTED SOLUTION
Courtney_E
Moderator

Hello user403551,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

After looking further into our logs, it looks like the error being returned by the request indicates that while the activity completed successfully, the resulting file was too large to download via the API.

 

It looks like the list you were attempting to export is too large for the API to process. This error occurs in files larger than 6MB.

 

Our engineering team is in the process of improving the overall user experience for this request which would potentially include providing more descriptive responses when a file size limit is reached and providing the file size limit in our documentation.

 

I have tracked the open request ticket "500 Error Response When Retrieving a Contacts Export That is Too Large" with your account.

 

In the meantime, the best workaround would be to segment or narrow the criteria in your requests and then make multiple requests in order to return the desired data in batches of smaller files.

 

Please have a look and let us know if you have any other questions!




Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.

View solution in original post

2 REPLIES 2
Courtney_E
Moderator

Hello user403551,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

After looking further into our logs, it looks like the error being returned by the request indicates that while the activity completed successfully, the resulting file was too large to download via the API.

 

It looks like the list you were attempting to export is too large for the API to process. This error occurs in files larger than 6MB.

 

Our engineering team is in the process of improving the overall user experience for this request which would potentially include providing more descriptive responses when a file size limit is reached and providing the file size limit in our documentation.

 

I have tracked the open request ticket "500 Error Response When Retrieving a Contacts Export That is Too Large" with your account.

 

In the meantime, the best workaround would be to segment or narrow the criteria in your requests and then make multiple requests in order to return the desired data in batches of smaller files.

 

Please have a look and let us know if you have any other questions!




Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
user403551
Rookie
0 Votes

Thanks

Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up