Forums

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

Atlassian Admin API returns 401 when inviting users via automation (API token vs OAuth)

Raj Rawal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 29, 2026

Hi Community,

I’m trying to automate inviting users to Confluence using n8n (HTTP Request node) and Atlassian Admin APIs.

Endpoints used:

GET https://api.atlassian.com/admin/v1/orgs
POST https://api.atlassian.com/admin/v1/orgs/{orgId}/users


Setup:

I am an Organization Admin

Using Admin email + API token

Authentication: Basic Auth

Token created from Atlassian account security page

Issue:
Both endpoints return:

401 Unauthorized


even though:

The API token is valid

I am confirmed as an Org Admin

API tokens work for Jira/Confluence REST APIs

Question:

Do Atlassian Admin APIs support API tokens at all, or

Is OAuth 2.0 (3LO) the only supported way to automate user invitations?

If OAuth is mandatory, is there an official automation-friendly example for tools like n8n?

Thanks in advance.

1 answer

0 votes
Trudy Claspill
Community Champion
January 30, 2026

Hello @Raj Rawal 

Welcome to the Atlassian community.

You said 
"Token created from Atlassian account security page"

If you created the token by clicking on your avatar and selecting Account Settings > Security > Create and Manage API tokens, then you created a token for accessing application functionality, not Organization Admin functionality

As per the Organization Admin documentation:

https://developer.atlassian.com/cloud/admin/organization/rest/intro/#about

...there is a link to  Create an API key and get the organization ID

If you follow that link, the document says that to create an API key you need to 

  1. Go to Atlassian Administration. Select your organization if you have more than one.

  2. Select Organization settings > API keys.

  3. Select Create API key.

You need to create a token in that manner for use with the Organization Admin APIs.

Let me know if that works for you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events