Solved

Raw data export API returns terminated early

  • 18 February 2021
  • 3 replies
  • 36 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

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
 

View original

3 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!

Reply


Mixpanel