Skip to main content

Dashboard API error: HTTP 401: Unauthorized


jackqack

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 [api_key]:[secret_key]`. API key and secret key are obtained from https://analytics.amplitude.com/[...]/settings/projects/[...]/general.

 

It works as if my API key pair is invalid.

 

What am I missing?

4 replies

Yuanyuan Zhang
Team Member
Forum|alt.badge.img+5

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!


jackqack
  • Author
  • New Member
  • 2 replies
  • August 23, 2022

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

 

 


Yuanyuan Zhang
Team Member
Forum|alt.badge.img+5

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? 

 


jackqack
  • Author
  • New Member
  • 2 replies
  • September 4, 2022

It works now. Thanks @Yuanyuan Zhang!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings