Forums

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

Confluence OAuth 2.0 - 401 Error

정지민 _ruirui4_
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!
February 18, 2026

Hello,

We have created a service account in our Atlassian admin settings, following the instructions in the documentation.

Using this service account, we were able to successfully connect to Jira by generating an API token.

However, for Confluence, we created credentials of the OAuth 2.0 type following the same process, but we are consistently receiving a 401 error. We have already granted the service account all 'classic' permissions within Confluence, so we don't understand why this error persists.

I am providing the configured scopes and the full error message below.

Could you please help us resolve this?

Thanks

"scope":"manage:confluence-configuration manage:jira-configuration manage:jira-data-provider manage:jira-project manage:jira-webhook manage:servicedesk-customer read:confluence-content.all read:confluence-content.permission read:confluence-content.summary read:confluence-groups read:confluence-props read:confluence-space.summary read:confluence-user read:jira-user read:jira-work read:servicedesk-request readonly:content.attachment:confluence search:confluence write:confluence-content write:confluence-file write:confluence-groups write:confluence-props write:confluence-space write:jira-work write:servicedesk-request"

{"code":401,"message":"Unauthorized; scope does not match"}

 

2 answers

1 accepted

4 votes
Answer accepted
Trudy Claspill
Community Champion
February 18, 2026

Hello @정지민 _ruirui4_ 

Welcome to the Atlassian community.

There is no error information included with your post.

What API endpoints are you trying to use? Can you show us the call and payload you are using?

Trudy Claspill
Community Champion
February 18, 2026

What API endpoints are you calling? What parameters and data are you providing with that call?

정지민 _ruirui4_
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!
February 18, 2026

For now, I am simply testing it with a curl command.

curl -H "Authorization: Bearer {TOKEN}" -H "Accept: application/json" "https://api.atlassian.com/ex/confluence/{cloudid}/api/v2/spaces"
curl -H "Authorization: Bearer {TOKEN}" -H "Accept: application/json" "https://api.atlassian.com/ex/confluence/{cloudid}/api/v2/pages"

However, 401 is returned.

 

Trudy Claspill
Community Champion
February 18, 2026

According to this documentation for the Spaces endpoint:

https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space/#api-group-space

...for a scoped token you must have the scope "read:space:confluence" which is a Granular Scope. Your scope list shows only Classic scopes, and the API documentation does not indicate those are supported for the Spaces endpoint.

Have you tried creating a token with that granular scope and then retried the API call?

0 votes
정지민 _ruirui4_
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!
February 18, 2026

Please note that I have updated the description in the main ticket. Please take a look.

Suggest an answer

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

Atlassian Community Events