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!
Community moderators have prevented the ability to post new answers.
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.
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 :-)
Hi @David Nickell
There are three levels of admin in the Jira Environment. From top to bottom:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Kind regards,
Dick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.