Helicone Community Page

Updated 2 months ago

Error 400 when Calling Get User Data

At a glance

The community member is experiencing an Error 400 when calling the Get User Data endpoint in https://docs.helicone.ai/rest/user/post-v1userquery, and has tried the request in both JavaScript and Postman. The comments suggest that the issue was due to a missing bearer token in the header, and that the time parameters should be in milliseconds instead of seconds. The final comment indicates that using Date.now() as unix microseconds and passing that to the seconds variable resolved the issue.

Useful resources
Error 400 when calling Get User Data in https://docs.helicone.ai/rest/user/post-v1userquery

I tried both in JS and Postman.
L
3 comments
Okay, muscle memory issue - there is no bearer in the header value.

But now I'm not getting any results passing the userId (the string value that I copy from dashboard).

I set start and end time to be 0 and Date.now()/1000 respectively.
Okay, so parameters are misleading. It is NOT seconds, it is Miliseconds.
Using Date.now() as unix microseconds and passing that to seconds variable works πŸ˜„
Add a reply
Sign up and join the conversation on Discord