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.
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
Go to Atlassian Administration. Select your organization if you have more than one.
Select Organization settings > API keys.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.