Skip to main content

I tried to get events for a user by using Dashboard REST API - User activity.

https://amplitude.com/docs/apis/analytics/dashboard-rest#user-activity

But I got return with code 400, and message: “Invalid definition”.

And it says “Argument user must be an int”.

 

In my project, when a user does sign-up, user-id changes to non-int-value like “fcd234-2kwosnm”.

So I can’t get events for a user with user-id like “fcd234-2kwosnm”.

 

Is there a way to solve this problem?

 

Thank you.

Hi Chaster,

This is Liping Yin from Amplitude Technical Support Team. I am happy to help!

It seem that you are using the User ID as an Amplitude ID for the request in User Activity API. AS User Activity API only supporting Amplitude ID, not User or Device ID. You'll need to first use the User Search API to find the Amplitude ID of the user. Once you have the Amplitude ID, you can then pass that as the “user” parameter to the User Activity API.

You can also refer to our document to get more information about the User ID, Device ID and Amplitude ID.

I hope this helps! Let me know if you have any other questions.

Best regards,
Liping Yin | Technical Support Engineer
Amplitude


P.S. Checkout upcoming events and user meetups on our events page.

Reply