The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

REST call to /manage/profile results in Unauthorized, but provided API token is correct

Anurag Bharati
Contributor
September 16, 2025

Unable to make a REST call to https://api.atlassian.com/users/<accountid>/manage/profile (https://developer.atlassian.com/cloud/admin/user-management/rest/api-group-profile/#api-group-profile) as it always results in Unauthorized error. I’m giving the correct token as i can use same to make other rest call. Following is the curl command:

curl -k -X GET "<https://api.atlassian.com/users/<accountid>/manage/profile" -H "Authorization: Bearer <API-Token>" -H "Accept: application/json"
{"code":401,"message":"Unauthorized"}

<accountid> is also correct, checked it multiple times.

I’m puzzled by this behavior, please help me resolve this issue, thank you!

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
David Nickell
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 Champions.
September 16, 2025

Good morning.   I have been doing REST API calls for decades and thought answering your question would be a slam dunk.  I haven't had to make any calls using the Bearer Token in quite some time.

So I was surprised that it has taken me 1 hour+ to get a REST call with a Bearer token working and it came down to using the instructions on this page.  The interface was different than I had seen in the past and the format of the token (key) was different as well.   But once I created the key through the new(er) interface, everything works as expected.

https://support.atlassian.com/organization-administration/docs/manage-an-organization-with-the-admin-apis/

Hope you find the same success I did by simply generating a new token this way.

 

AN UPDATE:   My use of the new Bearer Token is working fine -- but when I try to use the endpoint you asked about, I am getting FORBIDDEN which is different than the Unauthorized you are seeing. I'm not sure why I am forbidden on the user manager endpoints, but I'm moving on :-) 

 

Dick
Community Champion
September 17, 2025

Hi @David Nickell 
There are three levels of admin in the Jira Environment. From top to bottom:

  • Organizational Admin
  • Jira Admin
  • Project Admin

Your link concerns the top-level admin interface. It is yet unclear which level @Anurag Bharati is working with. It could explain the discrepancies.

Kind regards,
Dick

0 votes
Anurag Bharati
Contributor
September 19, 2025

Hi @David Nickell,
Hi @Dick,

Thank you for your replies!

Problem got resolved after using API key in my request I was using the API token. 

Thanks a lot :)

0 votes
Dick
Community Champion
September 16, 2025

Hi @Anurag Bharati 

The token you use holds the same permission level as the user that created it. 
I can imagine that user management calls requires admin permission. 

  • Does the token that you use have such (user derived) permissions?

Kind regards,
Dick

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events