Forums

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

Bulk remove users from 'confluence-users-xxxxx' group as user license cleanup API errors

Darren Johnston
May 27, 2026

Using python script to connect to atlassian API

was working 6  months ago.
Now getting:
03 Error - ['{"statusCode":403,"message":"com.atlassian.confluence.mvc.rest.common.exception.StacklessResponseStatusException: 403 FORBIDDEN \\"Request rejected because caller cannot access Confluence\\""}']

using this  endpoint

https://{BASE_URL}/wiki/rest/api/group/user

last admin was using 
endpoint 
f"https://{BASE_URL}/rest/api/3/group/user"  which is a Jira  endpoint but auth fail error for that one.

 any hints on what I doing wrong here??

2 answers

0 votes
Tomislav Tobijas
Community Champion
May 27, 2026

Hey @Darren Johnston ,

Are you using the user's API token or service account for this?

Can you try using scoped API tokens as described here: Scoped API Tokens in Confluence Cloud?
Note that you'll have to use a slightly different format here:

https://api.atlassian.com/ex/confluence/{cloudId}/wiki/rest/api/group/user

When talking about scripts and authentication, you can use these two methods:

  • Basic Auth (Recommended for scripts): You must Base64-encode the string email:api_token.

    • Header: Authorization: Basic <base64_encoded_credentials>

  • Bearer Token: If you are using a Service Account API key specifically designed for Bearer auth, use:

    • Header: Authorization: Bearer <api_key>

Can you try configuring these and see how that will go?

Cheers,
Tobi

0 votes
marc -Collabello--Phase Locked-
Community Champion
May 27, 2026

Just a guess: maybe your API key expired.

Darren Johnston
May 27, 2026

Thanks but have created new api key

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events