Skip to main content
Solved

Getting a 'missing_event' response on identify API v2

  • August 19, 2022
  • 1 reply
  • 595 views

Forum|alt.badge.img+1

Hi,

Seems like the API https://api2.amplitude.com/identify is broken. 


I tried sending a JSON payload using https://api2.amplitude.com/identify, but I keep getting a very vague error message: HTTP 400 missing_event.

I am sending the call using POST with a Conten-Type of “application/json”.

I have tried a few different JSON Payload:
 

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

I also tried

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



I also tried using Postman. 

Each time I get a HTTP 400 missing_event.

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

Thank you

Best answer by Stephane

I was able to make the API work in POSTMAN using “form-data”. 
Also, make sure you use “api_key” and not “api-key” like what Amplitude Docs gives you in POSTMAN. 

As for JSON, not sure how to make it work… :( 

I will move ahead with FormData

 

 

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+1
  • Author
  • Conversationalist
  • 5 replies
  • Answer
  • August 19, 2022

I was able to make the API work in POSTMAN using “form-data”. 
Also, make sure you use “api_key” and not “api-key” like what Amplitude Docs gives you in POSTMAN. 

As for JSON, not sure how to make it work… :( 

I will move ahead with FormData

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings