I am trying to access the HTML content of a Confluence page using this API: https://xxxx.atlassian.net/wiki/rest/api/content/{pageId}?expand=body.view However, I get an error message like this:
I can see the content if I visit the link directly. But when I use the API, it says I don’t have permission. I think this is because the Confluence page uses the Page Tree macro. How can I grant permission for the API to access the Page Tree macro?
Hi @Alex Guo and welcome,
rest API have not specific permissions and they should follow the caller user permission. It is weird that you can access page via browser and you have error using apis.
Please verify that user used for rest API is the same that you are using to access page via browser.
Fabio
Hi, thank you for your answer. I'm sure that the user I used for rest API is the same as that I used in browser
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.