Skip to main content

I want to retrieve a user from a project that I can see in https://app.eu.amplitude.com/

For the life of me, I cannot figure out why I’m getting a 400 response. This should be a simple REST call. Does anyone have any suggestions what I’m missing? 

 

GET /api/2/useractivity?user=202cfc2b-4673-44b6-afe8-a0a7d520e9f3 
Host: analytics.eu.amplitude.com
Authorization: Basic ZmQ1YWZhODc4NTQwODBjYz...
Accept: application/json, text/json, text/x-json, text/javascript, application/xml, text/xml
User-Agent: RestSharp/106.12.0.0
Connection: Keep-Alive
Accept-Encoding: gzip, deflate
Content-Type: application/json
Content-Length: 0

HTTP/1.1 400 Bad Request
Date: Sat, 06 Apr 2024 23:03:10 GMT
Content-Type: text/html; charset=UTF-8
server-timing: dash;dur=207.7
x-amzn-trace-id: Root=1-6611d4ae-60738f651b792c6f520367bb
x-content-type-options: nosniff
cache-control: no-cache, no-store, must-revalidate
pragma: no-cache
expires: 0
strict-transport-security: max-age=31536000; includeSubDomains; preload;
x-frame-options: SAMEORIGIN
set-cookie: SERVERID=; Expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/
Content-Length: 73
Connection: keep-alive

<html><title>400: Bad Request</title><body>400: Bad Request</body></html>

 

Hi Richar,

It looks like you’re passing a User or Device ID to the User Activity API, which only supports Amplitude ID. Please use the User Search API to find the Amplitude ID of the user first, and then pass that as the “user” parameter to the User Activity API. Hope this helps!

-Jeffrey


Thank you Jeffrey. You are 100% correct!

 


Reply