1
Create an Atlassian developer account
If you don’t already have one, sign up for an Atlassian developer account.
2
Create a new OAuth 2.0 (3LO) app
- Go to the Atlassian Developer Console.
- Click Create and select OAuth 2.0 integration.
- Enter a name, agree to Atlassian’s developer terms by checking the agreement checkbox for your app and click Create.
- Your app will be created and you’ll be taken to the app management page.
3
Configure OAuth 2.0 (3LO)
- In the left sidebar, select Authorization.
- Next to OAuth 2.0 (3LO), click Add.
- Enter
https://api.nango.dev/oauth/callbackas the Callback URL. - Click Save to save your changes.
4
Add API permissions
- In the left sidebar, select Permissions.
- Find the Confluence API and click Add, and then click Configure.
- Click Edit Scopes then select the scopes your application requires. Common scopes include:
read:confluence-user- Read user informationread:confluence-content.all- Read all contentread:confluence-content.summary- Read content summarieswrite:confluence-content- Create and update contentdelete:confluence-content- Delete contentmanage:confluence-configuration- Manage Confluence instance settingsread:page:confluence- Read Confluence pagesoffline_access- Get refresh tokens (required for long-term access)
- Click Save to save your changes.
5
Obtain your client credentials
- In the left sidebar, select Settings.
- Note your Client ID.
- Copy both the Client ID and Secret by clicking the copy buttons next to them, as you’ll need them when configuring your integration in Nango.
6
Make your app available to users (optional)
If you want to distribute your app to other users:
- In the left sidebar, select Distribution.
- In Distribution controls, click the Edit button, then select the Sharing radio button.
- Return to the Authorization page and copy the Authorization URL to share with your users.
Changes to your OAuth 2.0 (3LO) app can take a few minutes to propagate.
Important notes for Confluence API
When working with the Confluence API through Nango, keep these important points in mind: Refresh token requirement: To allow the possibility of refreshing the token, you must addoffline_access to your scopes when creating the integration on the Nango UI.
Cloud ID and domain configuration:
A single Confluence OAuth token can be valid for multiple Atlassian sites. For example, the same token might grant access to both “nango-hq.atlassian.net” and “nango-test.atlassian.net”. This is why specifying the domain during connection creation is important if you need to connect to a specific site.
When connecting to Confluence, you have two options for specifying which Confluence site to connect to:
- Provide a
domainduring connection creation (recommended): This ensures you connect to the specific Confluence site you want. - Let Nango auto-select the first available site (legacy behavior): If no baseUrl is specified, Nango will use the first site from the accessible resources api.
- Nango fetches all accessible sites for the OAuth token
- If you specified a
domain, Nango finds the matching site and sets itscloudId - If no
domainis specified, Nango uses the first available site and sets itscloudId - The selected site’s
cloudIdanddomainare stored in the connection configuration
https://api.atlassian.com/ex/confluence/${cloudId}/wiki/rest/api/<endpoint>
App distribution:
When you create an OAuth 2.0 (3LO) app, it’s private by default. Before using the integration, you must make your app public. See Distributing OAuth 2.0 Apps for details.
Refresh token expiration:
Refresh tokens will expire after 365 days of non use and will expire by 90 days if the resource owner is inactive for 90 days. Make sure you call nango.getConnection() at least every 365 days to trigger a refresh. See Atlassian’s OAuth documentation for more details.
Rotating refresh tokens:
Confluence’s OAuth implementation uses rotating refresh tokens. Each time you refresh an access token, you’ll receive a new refresh token that invalidates the previous one.
User permissions:
When making API calls, remember that the permissions of the user who authorized your app will limit what your app can do, regardless of the scopes you’ve requested.
Shared OAuth infrastructure:
Confluence and Jira share the same OAuth infrastructure, so the OAuth setup process is identical for both products.
For more details on Confluence’s OAuth implementation and API, see the Confluence Cloud Platform Documentation.