Confluence Cloud Rest api 401

Xiaoqiang.Zhao
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!
August 6, 2020

curl -D- \
-X GET \
-H "Authorization: Basic base64string" \
-H "Content-Type: application/json" \
"https://sharkninja.atlassian.net/wiki/rest/api/content"

Response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><status> <status-code>401</status-code> <message>Request rejected because issuer is either not authorized or not authorized to impersonate</message></status>

 

What permissions are required to use rest api?

1 answer

2 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 10, 2020

Hello @Xiaoqiang.Zhao,

Welcome to Atlassian Community! It’s nice to have you join us!

You can find the required permissions to get content on the page below:

Permissions required: Permission to access the Confluence site ('Can use' global permission). Only content that the user has permission to view will be returned.

I also recommend reviewing Basic Auth for REST-APIs for for details on how to authenticate properly, as it may be that your token isn’t being generated correctly. You can review Krister’s response on this similar question for details:

I hope this helps, but let me know if you have any trouble!

Take care,

Shannon

Stephen Ellwood February 17, 2022

I also get this message:

HTTPError: Request rejected because issuer is either not authorized or not authorized to impersonate

The file size I am trying to upload is 1093kB.  Interestingly if i simply remove about 30% of the file, this error goes away. Is it possible that there is a limit to the size of file that can be written by the REST API?

Suggest an answer

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

Atlassian Community Events