Hello! I’m using Amplitude HTTP API v2 for a WebGL project, where users are anonymous. The Amplitude documentation clearly states “Don't set the user ID if there isn't one.” So, I did that, but whenever I upload an event without a user ID I get this error:
400 Bad Request:
{
"events_with_missing_fields": {
"device_id":
0
],
"user_id":
0
]
},
"code": 400,
"error": "Request missing required field"
}
So, then I tried to send an event with the user_id set to an empty string and got a different error (also happens if “null” is sent):
400 Bad Request:
{
"code": 400,
"events_with_invalid_ids": {
"user_id": "
0
]
},
"error": "Invalid id provided: omit the user_id or device_id field if they are unknown"
}
This is quite the conflict. The HTTP API v2 appears to be completely unable to ingest events that don’t contain a user ID. Could someone from the Amplitude team please fix this issue on the back-end?