Solved

"missing_event" error on request to identify API

  • 26 May 2022
  • 3 replies
  • 100 views

Badge

Hey!

I’m attempting to submit a post request via python to the Identify API, but I keep getting back a 400 “missing_event” error.

 

My request looks like:

 

        IDENTIFY_ENDPOINT = 'https://api2.amplitude.com/identify'
data = {
'api_key': API_KEY,
'identification': [{
'user_id': 'user_id',
'user_properties': { 'exp_group': 'control' }
}]
}
res = post(IDENTIFY_ENDPOINT, headers={}, json=data)

 

I’ve seen other threads about a similar topic on this forum, but no helpful solutions from them.

 

Thanks in advance!

icon

Best answer by rishindoshi 27 May 2022, 20:54

View original

3 replies

Badge

Update: was able to fix by plugging data into json.dumps and setting the proper content-type headers.

Userlevel 5
Badge +2

Thanks for the update @rishindoshi. So glad that you were able to find a solution here. 😃

What were the proper headers?

Reply