Skip to main content
Solved

Min_id_length not working for track_event api


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

}

})

Best answer by Saish Redkar

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

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

3 replies

Saish Redkar
Expert
Forum|alt.badge.img+10

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.


Saish Redkar
Expert
Forum|alt.badge.img+10
  • Expert
  • 1380 replies
  • Answer
  • December 7, 2023

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


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