When using langchain ConfluenceLoader, I am getting ApiPermissionError

Shaikh, Roofi Y
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 16, 2024

I am using langchain to load the confluence pages but getting Api Permission error. 


Here is the code :

from langchain_community.document_loaders import ConfluenceLoader
loader = ConfluenceLoader(
url="https://ge-hc.atlassian.net/wiki", username="roofi.shaikh@gehealthcare.com", api_key="my-api-key"
documents = loader.load(space_key="SPACE", include_attachments=True, limit=50)


Here is the error : 

Retrying atlassian.confluence.Confluence.get_all_pages_from_space in 2.0 seconds as it raised ApiPermissionError: The calling user does not have permission to view the content.

How do I enable permissions ? 

1 answer

0 votes
Hariharan Iyer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 18, 2024

Hi @Shaikh, Roofi Y ,

You will have to ask your Confluence administrator to add permissions. Most likely you will need to have "View" permissions on the specific space. You can verify if this is the issue by running your script on a more restricted space (e.g. you personal space).


On an unrelated note - for privacy reasons - it would be advisable to mask the URL of your confluence account.


Hope that helps!

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events