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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,895
Community Members
 
Community Events
176
Community Groups

Access rest api for admin.atlassian.com

Edited

Hi, 

 

I am trying to query the following API: admin.atlassian.com/gateway/api/adminhub/um/site/{org-id}/users with an admin api key but I am getting the following error back, even though I am site owner/global admin: 

 401,"message":"Unauthorized.

I can access this rest api in the browser, or using a cloud.session.token, but am trying to move away from that. 

i am passing through the bearer token in my code as follows: 

headers = {
    "Accept""application/json",
    "Authorization""Bearer ioashd8a7ysdlda" #not a real token
}

Any ideas on what I need to be able to get the users query back? 

I am trying to obtain the following data back, whuch comes from suing the cloud-session-token: 

 "platformRole"null,

        "id""",

        "email""",

        "displayName""",

        "active",

        "hasVerifiedEmail",

        "picture"""

        "activeStatus""",

        "nickname""",

        "title"null,

        "timezone"null,

        "location"null,

        "companyName"null,

        "department"null,

        "presence""2022-01-26T17:58:04.134421Z",

        "created""2021-12-17T09:10:10.850Z",

        "invitationStatus"null,

        "system"false,

        "orgAdmin"false,

        "siteAdmin"false,

        "sysAdmin"false,

        "trustedUser"false,

        "presenceUnavailable"false,

        "managedStatus": {

            "managed"false,

            "owner"null

1 answer

Hi Scott, 

 

I am facing the same issue but making this work with cloud.session.token is ok in my use-case.

 

Could you please tell me how you managed to make it work ? 

 

Thanks,

 

Louis

Hi, 
I'm trying to use this API too. How can I get cloud.session.token to use this API? Is there any documentation about this?

Thank you!

Suggest an answer

Log in or Sign up to answer