I am writing an application in PHP, using basic authentication. I have working code that creates an EXPORT_CONTACTS activity, and saves the URI of the created activity for later polling.
When I throw a GET at that URI, I get back the expected XML entry with a status of COMPLETE, with the file name sitting in a FileName element (formatted like ws/customers/<username>/activities/a07e3zwev56gohmazws.csv, I fill in the https://api.constantcontact.com).
However, when I try to GET that filename, I get the following in return: 'Error 400: The request contains errors in the common Atom sections, which lie outside <entry> or <Content>, such as <feed>, <id>, <author> or <updated>'.
I am very used to this error, but only in the context of POSTing or PUTting contacts. In this case, I am not providing any XML data, but am only initiating a GET request to a URI. Anyone encountered this before?
I tried to recreate the error that you are receiving, by pulling a GET on a recently created activity in my own account, and then doing a GET on the activities CSV file. It returned a 200 message with the correct data.
You definitely should not be getting back a 400 error with that error message, because you are not sending or receiving atom XML. One thing to check is in your curl statements, are you setting a content type in the curl options for atom+xml? If so, try removing that.
If that does not work, please send me your code here. I will take a look at it and try to determine why you are getting this error message.
If you have any questions please let me know.
Here's the resolution for this, just in case anyone else has this problem. This turned out to be a defect on the Constant Contact side. The cause of the failure was having an '@' sign in a username.