Why is nothing returned when I try to export message data through the API? (Version 2.2)

  • 2 November 2020
  • 3 replies


I’ve been trying to pull out data from the message export model, as detailed here:


Everything here “works” in the sense that there are no errors, and I get 200 http response codes, but when it comes to downloading the data at the end, there doesn’t appear to be any!


The app I’m making this for is Python-based, but using curl directly gives the same results:




First, set up an export job (in this case exporting the last 10 days of messages):

curl -X POST -H ‘Authorization:Bearer <token>’ -H “Intercom-Version: Unstable” -H ‘Accept: application/json’ -H ‘Content-Type: application/json’ -d ‘{“created_at_after”: 1603407600, “created_at_before”: 1604275200}’


As expected, this gives a response like





Secondly, check status:

curl<job-id> -X GET -H ‘Authorization:Bearer <token>’ -H “Intercom-Version: Unstable” -H ‘Accept: application/json’


which gives a response like





Finally, pinging the download_url above (and just telling it to dump any raw data in console to see if there’s anything):

curl -X GET -H ‘Authorization:Bearer <token>’ -H “Intercom-Version: Unstable” -H ‘Accept: application/octet-stream’ --output -


But when I do this, nothing appears. Similar story in the Python environment - specifically on the final step I have a requests response object, but looking at its content (response.content) just returns an empty bytes object (b’’).




Unless I’m being horribly misled we should have message data available - according to the reports in the customer engagement UI, we send a few hundred each day.


The two question marks I have right now are:

  • The default API version is 2.2 (I think) - passing “Intercom-Version: Unstable” in the request headers seems to work, but maybe things are more nuanced than that?
  • The url returned to download data from seems suspiciously generic: - the no-data-timeframe seems to imply that the time bounds aren’t being picked up properly, but that’s confusing considering I do send them, and get an error if I don’t anyway.


Any pointers in solving this very appreciated!


Best answer by Eric Fitz 6 November 2020, 17:09

View original

3 replies

Userlevel 1

Hey @sam a12​, you're correct that this endpoint is currently only accessible via our Unstable API version for now, so you'll need to make sure that the unstable version is specified in the request headers.


As for the timeframe in your export link, let me check in with our team who manage our API, and I'll come back to you when I have an update!

Thank you!

Userlevel 1

Thanks so much for your patience here, @sam a12​! The team advise me that, if is showing here, it means that no messages were found in the timeframe you specified.


However, if that's definitely not the case, let me know!