Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal length for User Id #105

Open
ZoharBergman opened this issue Apr 18, 2021 · 1 comment
Open

Minimal length for User Id #105

ZoharBergman opened this issue Apr 18, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@ZoharBergman
Copy link

We are using Amplitude Node SDK for events reporting.
While implementing, we've noticed that when trying to log an event and attach it a user id that its length is lower than 5 chars, we get an error:
Status code: 400, Status: invalid, Response body: {"error":"Invalid id length for user_id or device_id", ...}.
To overcome this error, we concatenated 5 leading spaces, after that, the error has gone and the logEvent function succeeded (we also validated that the leading spaces are trimmed in the Amplitude analytics site).

Could you please fix this issue, to avoid the 5 leading spaces trick?

  • SDK Version: 1.5.3
  • Node version: 15.6.0
@ZoharBergman ZoharBergman added the bug Something isn't working label Apr 18, 2021
@ajhorst
Copy link
Contributor

ajhorst commented Apr 23, 2021

Hi @ZoharBergman. We suggest users stick to the minimum ID length (see here), but it can be overridden. The Node Client accepts an optional parameter minIdLength that will override the default minimum id length when set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants