Solved

Getting a 'missing_event' response on identify request

  • 14 November 2021
  • 6 replies
  • 118 views

Badge

 

Hello,

I’m encountering an error where trying to run the identify request. I’m getting in the response (with no formatting) ‘missing_event’. Not in the format that is describe in your documentation.

im sending an identify request as per the documentation: https://developers.amplitude.com/docs/identify-api

to this end point: https://api.amplitude.com/identify
im sending this as my json body:

{

"api_key": AMPLITUDE_API_KEY,

"identification": [

{

"user_id": "kqlvwyvomsxnaets_170",

"user_properties": {

"userRole": "owner"

}

}

]

}

icon

Best answer by anuriel 27 November 2021, 16:28

View original

6 replies

Userlevel 4
Badge +2

Hi @apollograce ,

 

I have an answer for the above on this thread. Would you be so kind as to see if it helps? Thank you.

 

Kind Regards,

Denis

Badge

I’m hitting this too, and changing my payload to encase the identifications in a string didn’t help. Working in python, and using this data as a json body in a POST to https://api.amplitude.com/identify.

I’m previously tried:

{
'api_key': '<my-key>',
'identification': [{
'user_id': 'my_id',
'user_properties': {'email': 'me@mydomain.com'}
}]
}

After reading the above, I tried:

{
'api_key': '<my-key>',
'identification': '[{"user_id": "my_id", "user_properties": {"email": "me@mydomain.com"}}]'
}

I’m still getting the very uninformative “missing_event” 400 error.

Meanwhile, a direct curl call that follows the style given on https://developers.amplitude.com/docs/identify-api, with the two --data arguments (--data api_key=<my-key> and --data identification=[{...}]), works. (Returns 200, effectively changes my email.)

(Is there a difference between the two --data arguments and one JSON dictionary?)

Userlevel 2
Badge +2

Hi @anuriel - sorry for the delayed response here! Glad to hear you resolved the issue :slight_smile:

Badge

so after talking to one of their sales people that send the question to one of the tech people, I got this information:

“missing_event” gets sent when they are not able to parse the request correctly.

looks like a general error that isn't explained…

the way I got it to work in the end is sending identification as a json stringify instead of the whole json object. which is kinda weird but what ever

so my payload was:

{

"api_key": API_KEY,

"identification": “[{“user_id”:”blablabla”...}]”

}

Badge

First I’d like to say thanks for the help!

it seems like I’m still getting the missing_event error.

 

I’m attaching the post request using curl that im running maybe the request will be clearer there…@jmagg any chance you can try running the request with your api key and see what you get?

 

curl --location --request POST 'https://api2.amplitude.com/identify' \

--header 'Content-Type: application/json' \

--data-raw '{

"api_key": API_KEY,

"identification": [

{

"user_id": "kqlvwyvomsxnaets_170",

"user_properties": {

"company": "kqlvwyvomsxnaets",

"industry": "healthcare",

"numberOfEmployeeRange": "21-50",

"signupTimestamp": "1616678036",

"conversionToPaidTimestamp": "1628003369",

"planId": "enterprise",

"userRole": "owner"

},

"country": "Israel"

}

]

}'

Userlevel 2
Badge +2

Hi @anuriel - hope to help you with this! Would you mind trying this endpoint in your Identify call? 

https://api2.amplitude.com/identify

(please note it is identical to the endpoint you have already tried except there is a “2” after “api”)

Please let me know how this goes for you!

Reply