Skip to main content

 

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": i

{

"user_id": "kqlvwyvomsxnaets_170",

"user_properties": {

"userRole": "owner"

}

}

]

}

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!


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": i

{

"user_id": "kqlvwyvomsxnaets_170",

"user_properties": {

"company": "kqlvwyvomsxnaets",

"industry": "healthcare",

"numberOfEmployeeRange": "21-50",

"signupTimestamp": "1616678036",

"conversionToPaidTimestamp": "1628003369",

"planId": "enterprise",

"userRole": "owner"

},

"country": "Israel"

}

]

}'


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": “o{“user_id”:”blablabla”...}]”

}


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


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': t{
'user_id': 'my_id',
'user_properties': {'email': 'me@mydomain.com'}
}]
}

After reading the above, I tried:

{
'api_key': '<my-key>',
'identification': 'i{"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=a{...}]), works. (Returns 200, effectively changes my email.)

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


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


Hi, @anuriel & @apollograce:slight_smile: I wanted to close the loop here. Were you able to resolve the issue? I’m looping in platform specialist @ning.chang, who can take a closer look, if needed. Leave us a comment if you need us!


 

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": i

{

"user_id": "kqlvwyvomsxnaets_170",

"user_properties": {

"userRole": "owner"

}

}

]

}


Hi,

Seems like this API is broken. 

Could someone let me know how to make this Identity API work please?

I tried the sending a JSON payload using https://api2.amplitude.com/identify
JSON Payload:

{
"api_key": "MY API KEY",
"identification": "t{\"user_id\":\"b2d0dc3e-7ec4-48ad-bdbf-30723d461067\", \"user_properties\":{\"$set\": {\"province\":\"ON\"}}}]"
}

I also tried
 

{
"api_key": "MY API KEY",
"identification": "n{\"user_id\":\"b2d0dc3e-7ec4-48ad-bdbf-30723d461067\", \"user_properties\":{\"province\":\"ON\"}}]"
}

Each time I get a HTTP 400 missing_event.

Could the API be improved so that we get a detailed error message also.

​​​​​​​Thanks


Hi @Stephane ,

 

That looks like an issue with the way the API call is being done as I am able to use the API myself. Can you create a community post and myself or one of my teammates will pick it up as soon as we can? Thank you!

 

I would also recommend the URL endpoint https://api2.amplitude.com/identify 

Are you passing the parameters in form-data or as query params? If you can create the community post, we will help you there, thank you!


Hi @Denis Holmes 

I was able to make it work using form-data.  See here my question:


In my first attempt to use the API, I was trying to pass in a JSON body which does not work as per the documentation.


Hi @Stephane ,

 

I see in the documentation they say to pass it in the body of the request. I see the content type is not specified.  If your request is formData but you’re putting it in the raw window, you would need to include the Content-Type header so your API knows how the data is formatted. This is not recommended though. 

I would use the form-data as the content-type is automatically set for you. Content-Type: application/x-www-form-urlencoded. 

 


Reply