Skip to main content

Hi there, I’m getting the error: “Invalid id length for user_id or device_id”,

while calling the track_event api. I passed the min_id_length to one, still I’m getting errors for user ids < 5 character and I have user ids less than 5 character. Here’s the request, Please help me with this.

 

AmplitudeAPI::Event.new({

user_id: user_id,

event_type: event_type,

time: Time.now,

insert_id: SecureRandom.uuid,

event_properties: event_properties,

options: {

min_id_length: 1

}

})

Hi @Himanshu Itoria 

Can you try to set the min_id length in the options parameter during your SDK initialization?

 


Thanks @Saish Redkar,

I was using amplitude-api ruby gem in rails, where that option wasn’t working, I’m just simply making a POST request on the api now, without use of any gem, the option works fine.


HTTP API supports the options parameter where the min_id length can be overridden.


Reply