Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

User profile API gives 401 from api.atlassian.com but works with id.atlassian.com

AJP February 20, 2024

I followed the API documentation to access my user profile via the API as well as eventually finding the (bizarre) way to find my account ID.

On requesting https://api.atlassian.com/users/712...dce/manage/profile it returns a 401 however by looking at the profile UI I see it requests https://id.atlassian.com/gateway/api/users/712...dce/manage/profile successfully.

Does anyone know why is the documented API gives a 401 unauthorised when the undocumented API is working without problem?

1 answer

1 vote
David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2024

Hello @AJP 

The reason you can't access that endpoint is because it's part of the Atlassian Cloud Admin APIs that are restricted to only being accessible by your organisation's admins.

For your personal account ID, just use the various Myself endpoints, such as:

GET

https://<your_domain>.atlassian.net/rest/api/3/myself 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events