{"record":{"id":"3aa3c46e1e2ccc28","repo":"infiniflow/ragflow","slug":"no-confluence-spaces-found-either-your-credential","errorCode":null,"errorMessage":"No Confluence spaces found. Either your credentials lack permissions, or there truly are no spaces in this Confluence instance.","messagePattern":"No Confluence spaces found\\. Either your credentials lack permissions, or there truly are no spaces in this Confluence instance\\.","errorType":"validation","errorClass":"ConnectorValidationError","httpStatus":null,"severity":"warning","filePath":"common/data_source/confluence_connector.py","lineNumber":1856,"sourceCode":"            spaces = self.low_timeout_confluence_client.get_all_spaces(limit=1)\n        except HTTPError as e:\n            status_code = e.response.status_code if e.response else None\n            if status_code == 401:\n                raise CredentialExpiredError(\"Invalid or expired Confluence credentials (HTTP 401).\")\n            elif status_code == 403:\n                raise InsufficientPermissionsError(\"Insufficient permissions to access Confluence resources (HTTP 403).\")\n            raise UnexpectedValidationError(f\"Unexpected Confluence error (status={status_code}): {e}\")\n        except Exception as e:\n            raise UnexpectedValidationError(f\"Unexpected error while validating Confluence settings: {e}\")\n\n        if self.space:\n            try:\n                self.low_timeout_confluence_client.get_space(self.space)\n            except ApiError as e:\n                raise ConnectorValidationError(\"Invalid Confluence space key provided\") from e\n\n        if not spaces or not spaces.get(\"results\"):\n            raise ConnectorValidationError(\"No Confluence spaces found. Either your credentials lack permissions, or there truly are no spaces in this Confluence instance.\")\n\n\nif __name__ == \"__main__\":\n    import os\n\n    # base url\n    wiki_base = os.environ[\"CONFLUENCE_URL\"]\n\n    # auth stuff\n    username = os.environ[\"CONFLUENCE_USERNAME\"]\n    access_token = os.environ[\"CONFLUENCE_ACCESS_TOKEN\"]\n    is_cloud = os.environ[\"CONFLUENCE_IS_CLOUD\"].lower() == \"true\"\n\n    # space + page\n    space = os.environ[\"CONFLUENCE_SPACE_KEY\"]\n    # page_id = os.environ[\"CONFLUENCE_PAGE_ID\"]\n\n    confluence_connector = ConfluenceConnector(","sourceCodeStart":1838,"sourceCodeEnd":1874,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/confluence_connector.py#L1838-L1874","documentation":"Raised by validate_connector_settings() when get_all_spaces(limit=1) succeeds but returns an empty result set. The connector cannot distinguish an instance with genuinely no spaces from credentials that can see nothing, so the message names both possibilities. Raised as ConnectorValidationError, i.e. treated as a configuration problem.","triggerScenarios":"Fresh Confluence instance with zero spaces; API token whose account has no space visibility so Atlassian filters the list to empty; wrong wiki_base pointing at a different (empty) instance.","commonSituations":"Trial/sandbox instance never populated; service account not added to any group; wiki_base points to the wrong site among several Atlassian cloud tenants.","solutions":["Log in to the Confluence UI with the same account and confirm at least one space exists and is visible","If spaces exist but are not visible, grant the account read permission (see permissions fix for HTTP 403)","Verify wiki_base targets the intended site (check the site selector in Atlassian account settings)","For a genuinely empty instance, create a space or drop the restriction that the connector must find one"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    connector.validate_connector_settings()\nexcept ConnectorValidationError as e:\n    if 'No Confluence spaces found' in str(e):\n        # check account visibility in UI; may be permissions not emptiness\n        ...","preventionTips":["Before indexing, confirm the integration account can see at least one space in the Confluence UI","Prefer per-space connectors over whole-instance indexing for restricted service accounts"],"tags":["confluence","validation","empty-result"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}