Skip to main content

Hi, I’m trying to run a simple Dashboard REST API requests and getting `HTTP 401: Unauthorized` error in any response.

 

In particular, I’m calling `GET` https://amplitude.com/api/2/users with `Authorization` header set to `Basic aapi_key]:ksecret_key]`. API key and secret key are obtained from https://analytics.amplitude.com/....]/settings/projects/e...]/general.

 

It works as if my API key pair is invalid.

 

What am I missing?

Hi @jackqack,

Thanks for posting this question! 

Which tool are you using to make the API calls? Would it be possible to share a screenshot of your API call with API key blurred out? Please let me know. Thanks!


Hi @Yuanyuan Zhang, here’s an example of a call of getting active users taken from docs.

 

 


Hi @jackqack.

Thanks for sharing the screenshot and apologies for the delayed reply! I ran the same request using your API key and secret key just now in Postman and the request got 200 ok response (screenshot). Could you please try to set up the API key and Secret key in the AUTH tab, too? 

 


It works now. Thanks @Yuanyuan Zhang!


Reply