Skip to main content
Confluence

Use OAuth 2.0 to create a Confluence integration.

Updated over 2 months ago

Integrating Confluence with OAuth 2.0 allows your application to securely access Confluence resources on behalf of a user. This guide will walk you through the process of creating an app in Confluence, configuring OAuth 2.0, and obtaining the necessary credentials for authorization.


Prerequisites

  • Atlassian Account: You must have an active Atlassian account with administrative access to Confluence. This account will be used to create and manage the OAuth 2.0 app.

  • Confluence Cloud Subscription: Your Confluence instance must be hosted on Atlassian’s cloud platform. OAuth 2.0 integration as described here is specifically for Confluence Cloud, not for Confluence Server or Data Center.

  • Access to Atlassian Developer Portal: You need access to the Atlassian Developer Portal, where you can create and manage your OAuth 2.0 apps. This requires an Atlassian account with the necessary permissions.

Create an App in Confluence

  • Create a New App: Go to Apps > Create App and select OAuth 2.0 integration.

    • Provide a name and description for your app and click Save.

  • Define App Permissions: Under the Permissions section, click Add for Confluence API.

  • Configure Desired API: Click Configure to set the desired API scopes (Classic or Granular) such as: write:confluence-contentread:confluence-space.summary write:confluence-space read:confluence-content.all

  • Generate Auth URL: Under the Authorization section, click Add next to OAuth 2.0 (3LO)

  • Callback: In the Callback URl enter https://redir.torq.io/integrations/oauth_2

  • Generate Confluence API URL: Click Save and copy the generated Authorization URL. Save it in a safe location.

  • Obtain Client ID/Secret: Under Settings, copy the Client ID and Client Secret and save them in a safe location.

Create a Confluence Integration in Torq Using OAuth 2.0

  • Navigate to Build > Integrations > OAuth 2.0 and click Add.

    • Give the integration a unique and meaningful name.

    • Set Grant Type to Authorization Code.

    • Set the Callback URL to https://redir.torq.io/integrations/oauth_2

    • Set the Auth URL to https://auth.atlassian.com/authorize

    • Set the Token URL to https://auth.atlassian.com/oauth/token

    • Paste the Client ID and Client Secret you copied earlier.

  • In Scopes, create a comma seperated list that matches the Confluence Scopes you gave your app earlier, for example: offline_access,write:confluence-content,read:confluence-space.summary,write:confluence-space

    • Note that offline_access allows your application to access resources on behalf of a users even when they are not logged in.

  • Click Add to finalize the integration.

Using Confluence OAuth 2.0 Integration in a Workflow

Because you created a Confluence OAuth 2.0 integration, it will not show in the regular Integration drop down in a step. Instead, click on the ellipsis icon next to the Integration drop down and click Set Values Seperately.

In the Token field that will be presented, set the path for the Confluence based OAuth 2.0 integration you created earlier, for example: {{$.integrations.confluence_oauth_app.access_token }}

Did this answer your question?