Solved

Raw data export API returns terminated early

  • 18 February 2021
  • 6 replies
  • 335 views

Hi, I’m new using mixpanel and I am actually trying around to decide whether to use this tool for my project or not. I’m interested in the raw data of my events rather than the dashboards and pretty visual reports. I was trying the raw data export api, with basic parameters (only from_date and to_date), directly from https://developer.mixpanel.com/reference/export but I am getting a 200 status response with the only response being “terminated early”, no JSON or event data. Can anyone explain why this happens?

 

Thanks

icon

Best answer by raquelhortab 25 February 2021, 12:14

View original

6 replies

Having a similar issue my tokens seem to be correct as well the error isn’t descriptive at all.

Having a similar issue my tokens seem to be correct as well the error isn’t descriptive at all.

Hi! I contacted support and it seems it was because I have a EU based project

Doing it like this worked:

curl --request GET \

--url 'https://data-eu.mixpanel.com/api/2.0/export?from_date=2021-02-01&to_date=2021-02-22' \

--header 'Accept: application/json' \

--header 'Authorization: Basic YOUR_AUTH_HERE'

 

Although instead of the auth header line I used (note the trailing colon)

-u API_SECRET: 

Hope it helps!

 

Raquel
 

Having a similar issue my tokens seem to be correct as well the error isn’t descriptive at all.

Hi! I contacted support and it seems it was because I have a EU based project

Doing it like this worked:

curl --request GET \

--url 'https://data-eu.mixpanel.com/api/2.0/export?from_date=2021-02-01&to_date=2021-02-22' \

--header 'Accept: application/json' \

--header 'Authorization: Basic YOUR_AUTH_HERE'

 

Although instead of the auth header line I used (note the trailing colon)

-u API_SECRET: 

Hope it helps!

 

Raquel
 

Thanks!!! this worked for me!.

 

Good job!

Hi there!
Faced the same problems, don't understand which password I am asked to type during performing request.

As it was mentioned above, I use -i <MY_API_SECRET_TOKEN> in the end but I still got the same result - terminated early!
How to get it to work? :-)

Oh!Jesus! I figured it out! Haven't noticed small changes of url I was using.
data.mixpanel.com → date-eu.mixpanel.com

It was nowhere mentioned on the developer reference. Definitely worth to mention.
 

Having a similar issue my tokens seem to be correct as well the error isn’t descriptive at all.

Hi! I contacted support and it seems it was because I have a EU based project

Doing it like this worked:

curl --request GET \

--url 'https://data-eu.mixpanel.com/api/2.0/export?from_date=2021-02-01&to_date=2021-02-22' \

--header 'Accept: application/json' \

--header 'Authorization: Basic YOUR_AUTH_HERE'

 

Although instead of the auth header line I used (note the trailing colon)

-u API_SECRET: 

Hope it helps!

 

Raquel
 

I have tried the same, but still getting the same response.

 

Reply