> ## Documentation Index
> Fetch the complete documentation index at: https://docs.circuit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Confluence

> Sync pages from Confluence spaces into a Circuit index.

The Confluence feed connects an index to Atlassian Confluence Cloud through OAuth 2.0 (3LO). After connecting, Circuit imports the pages in the spaces you select and keeps them in sync as they change.

## What you can do

* **Sync entire spaces**: Bring pages and their attachments from any Confluence space you select.
* **Cover multiple spaces in one feed**: Pick as many spaces as you like during setup. Adding a space later is also supported.
* **Respect Confluence permissions**: Circuit only imports pages your Confluence user can read. Restricted pages stay restricted.
* **Stay in sync automatically**: Circuit re-checks each selected space periodically. New pages, edits, and deletions are mirrored to the index.

## Before you start

* An Atlassian account with access to the Confluence Cloud site and the spaces you want to sync.
* The cooperation of an Atlassian organization or site admin. Atlassian sites typically require an org admin to authorize third-party apps before users can connect. See [For IT and security teams](#for-it-and-security-teams) below.
* An index in Circuit where the Confluence pages should live. See [Indexes](/admin/indexes) if you need to create one.

## Connect Confluence

<Steps>
  <Step title="Open the index's Integrations tab">
    In Circuit, open the index that should receive the Confluence pages, then choose **Integrations** > **New integration**.
  </Step>

  <Step title="Choose Import from Confluence">
    Select **Import from Confluence**. Circuit redirects you to Atlassian's sign-in page.
  </Step>

  <Step title="Sign in to Atlassian">
    Sign in with the Atlassian account that has access to the spaces you want to sync.
  </Step>

  <Step title="Pick the Confluence site">
    If your account has access to more than one Atlassian site (sometimes called a cloud ID), Atlassian asks which site to authorize. Choose the site that hosts the spaces you want.
  </Step>

  <Step title="Review and consent to the requested scopes">
    Atlassian shows a consent screen listing the scopes Circuit requests. Review them (see [What Circuit accesses](#what-circuit-accesses) below) and click **Accept**. If your organization blocks third-party apps, the screen is blocked until an org admin approves Circuit.
  </Step>

  <Step title="Choose the spaces to sync">
    After consent, Circuit lists the spaces your account can see. Select the spaces you want imported into the index. Pages outside the selected spaces are never accessed.
  </Step>

  <Step title="Start the import">
    Click **Done**. Circuit imports the selected spaces. The initial import takes a few minutes to a few hours depending on volume. Subsequent updates run in the background.
  </Step>
</Steps>

## What Circuit accesses

Circuit requests the following Confluence OAuth scopes:

```
read:confluence-content.all
read:confluence-space.summary
read:confluence-user
offline_access
```

| Scope                           | Why Circuit needs it                                                                                             |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `read:confluence-content.all`   | Read the body of pages, blog posts, and comments in the spaces you select, so Circuit can import them.           |
| `read:confluence-space.summary` | List the spaces your account can see, so you can pick which ones feed into the index.                            |
| `read:confluence-user`          | Resolve page authors and the last editor for each page, so the index can show author metadata in search results. |
| `offline_access`                | Issue a refresh token so Circuit can keep the feed in sync without asking you to reauthenticate.                 |

<Note>
  Circuit's access to a space is bounded by your Confluence user's permissions. If your user cannot view a page in Confluence, Circuit cannot import it either.
</Note>

## For IT and security teams

The Confluence feed uses Atlassian's three-legged OAuth flow (3LO). Each user authorizes the app individually, but Atlassian organization admins can block third-party apps for the whole organization, which prevents any user from completing the flow.

If your Atlassian organization has **Block user apps** enabled, users hitting Circuit's connect flow will see a "your site admin must authorize this app" error. An org or site admin can approve Circuit from **Atlassian Administration** > **Apps** > **Connected apps**.

For the full Atlassian walkthrough, see [Approving Circuit in Atlassian](/it/integration-security#approving-circuit-in-atlassian). For broader cross-integration security details, see [Integration security and admin consent](/it/integration-security).

## Disconnect or rotate access

* **From Circuit**: open the index's **Integrations** tab, select the Confluence feed, and click **Remove**. Circuit deletes the stored refresh token and stops syncing. Already-imported documents stay in the index until you delete them.
* **From Atlassian**: at [id.atlassian.com](https://id.atlassian.com), open **Connected apps**, find Circuit, and click **Revoke**. Circuit will lose access on the next sync attempt.
* **Org-wide revocation**: an Atlassian org admin can remove Circuit from **Connected apps** in Atlassian Administration, which invalidates all tokens for the organization.

## Troubleshooting

<AccordionGroup>
  <Accordion title="&#x22;Your site admin must authorize this app&#x22; at the consent screen">
    Your Atlassian organization blocks third-party apps. Ask an org or site admin to approve Circuit (see [For IT and security teams](#for-it-and-security-teams)).
  </Accordion>

  <Accordion title="A space is missing from the picker">
    The picker only shows spaces your Atlassian account can view. Ask a space admin to add you as a member, or pick a different account when reconnecting.
  </Accordion>

  <Accordion title="A page is in the space but missing from the index">
    Page restrictions in Confluence still apply. If your user does not have view permission on a specific page, Circuit cannot read it. Ask the page owner to grant access and the page will appear on the next sync cycle.
  </Accordion>

  <Accordion title="Sync stops working after a password change or MFA reset">
    The refresh token is invalidated. Open the feed in Circuit and click **Reconnect**.
  </Accordion>

  <Accordion title="A page was updated in Confluence but the index still shows the old content">
    Updates are picked up on the next sync cycle, usually within a few hours. If a page remains out of date for longer, force a re-sync from the feed's settings.
  </Accordion>
</AccordionGroup>

## Reference

* **OAuth flow**: Atlassian OAuth 2.0 (3LO), authorization code
* **Scopes requested**: `read:confluence-content.all`, `read:confluence-space.summary`, `read:confluence-user`, `offline_access`
* **Token endpoint**: `https://auth.atlassian.com/oauth/token`
* **Redirect URI**: `https://app.circuit.ai/api/confluence-oauth`
* **Application name shown on consent screen**: Circuit
* **Atlassian's own docs**: [OAuth 2.0 (3LO) apps](https://developer.atlassian.com/cloud/confluence/oauth-2-3lo-apps/), [Confluence scopes for OAuth 2.0 (3LO) and Forge apps](https://developer.atlassian.com/cloud/confluence/scopes-for-oauth-2-3LO-and-forge-apps/), [Manage third-party apps](https://support.atlassian.com/security-and-access-policies/docs/manage-your-users-third-party-apps/)
