Skip to content

Confluence #40382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
vivek-appsmith opened this issue Apr 25, 2025 · 2 comments
Closed
4 tasks done

Confluence #40382

vivek-appsmith opened this issue Apr 25, 2025 · 2 comments
Assignees
Labels
Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. Integrations Product Issues related to a specific integration Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE Task A simple Todo

Comments

@vivek-appsmith
Copy link
Contributor

vivek-appsmith commented Apr 25, 2025

🎯 Objective

Set up an Atlassian Confluence OAuth 2.0 application to allow users to authenticate and integrate their Confluence accounts with our app. We'll obtain the Client ID and Client Secret required for the OAuth 2.0 authorization flow.


✅ Step-by-Step Instructions

1. Go to Atlassian Developer Console

Visit: https://developer.atlassian.com/console
Log in with your Atlassian account.


2. Create a New App

  • Click "Create app"
  • Select "OAuth 2.0 integration"
  • Fill in:
    • App Name (e.g., My Confluence Integration)
    • (Optional) App Description
    • Select a Workspace

Click Create.


3. Configure OAuth 2.0

  • Go to the "Authorization" tab
  • Enable OAuth 2.0 (3LO) if not already enabled
  • Set the Redirect URI to:
    https://yourapp.com/oauth/callback
    
  • Add any additional redirect URIs if necessary

4. Add Required Scopes

Go to the "Permissions" or "Authorization > Scopes" section and add the required scopes:

Common Confluence scopes:

  • read:confluence-content.all
  • write:confluence-content
  • read:confluence-space.summary
  • read:confluence-user

📚 Full list of scopes: https://developer.atlassian.com/cloud/confluence/oauth-2-jwt/#scopes


5. Save and Retrieve Credentials

  • Return to the Authorization tab
  • Copy the Client ID and Client Secret
  • Store them securely (e.g., environment variables)

6. Implement OAuth 2.0 Authorization Code Flow

Authorization URL:

https://auth.atlassian.com/authorize?
  audience=api.atlassian.com&
  client_id=YOUR_CLIENT_ID&
  scope=YOUR_SCOPES&
  redirect_uri=YOUR_CALLBACK_URL&
  state=SOME_STATE&
  response_type=code&
  prompt=consent

Token Exchange Endpoint:

POST https://auth.atlassian.com/oauth/token
Content-Type: application/json

{
  "grant_type": "authorization_code",
  "client_id": "YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET",
  "code": "AUTH_CODE_FROM_CALLBACK",
  "redirect_uri": "YOUR_CALLBACK_URL"
}

7. Get Cloud ID and Call Confluence APIs

Get Cloud ID:

GET https://api.atlassian.com/oauth/token/accessible-resources
Authorization: Bearer ACCESS_TOKEN

Use Confluence API:

GET https://api.atlassian.com/ex/confluence/{cloudid}/wiki/rest/api/...
Authorization: Bearer ACCESS_TOKEN

✅ Outcome

  • App registered in Atlassian Developer Console
  • OAuth 2.0 enabled with correct redirect URI and scopes
  • Client ID and Secret acquired and stored securely
  • Ready to implement the OAuth integration in the app
@vivek-appsmith vivek-appsmith added the Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE label Apr 25, 2025
@Nikhil-Nandagopal Nikhil-Nandagopal added the Task A simple Todo label Apr 25, 2025
@github-actions github-actions bot removed the Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE label Apr 25, 2025
@vivek-appsmith vivek-appsmith self-assigned this Apr 25, 2025
@vivek-appsmith vivek-appsmith added the Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. label Apr 25, 2025
@github-actions github-actions bot added Integrations Product Issues related to a specific integration Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE labels Apr 25, 2025
@vivek-appsmith
Copy link
Contributor Author

@vivek-appsmith
Copy link
Contributor Author

Screenshot 2025-04-25 at 1.05.23 PM.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. Integrations Product Issues related to a specific integration Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE Task A simple Todo
Projects
None yet
Development

No branches or pull requests

2 participants