Skip to main content

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': a{
'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!

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


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


What were the proper headers?


Hi @rishindoshi , could you please provide headers ?


Reply