Documentation Index
Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
Create an integration
In Nango (free signup), go to Integrations -> Configure New Integration -> Atlassian Government Cloud. Nango doesnât provide a test OAuth app for Atlassian Government Cloud yet. Youâll need to set up your own by following these instructions. After that, make sure to add the OAuth client ID, secret, and scopes in the integration settings in Nango. Authorize Atlassian Government Cloud
Go to Connections -> Add Test Connection -> Authorize, then log in to Atlassian Government Cloud. Later, youâll let your users do the same directly from your app. Call the Atlassian Government Cloud API
Letâs make your first request to the Atlassian Government Cloud API (fetch a list of issues from Jira). Replace the placeholders below with your secret key, integration ID, and connection ID:curl "https://api.nango.dev/proxy/ex/jira/{connectionConfig.cloudId}/rest/api/3/search?maxResults=10" \
-H "Authorization: Bearer <NANGO-SECRET-KEY>" \
-H "Provider-Config-Key: <INTEGRATION-ID>" \
-H "Connection-Id: <CONNECTION-ID>"
Install Nangoâs backend SDK with npm i @nangohq/node. Then run:import { Nango } from '@nangohq/node';
const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' });
const res = await nango.get({
endpoint: '/ex/jira/{connectionConfig.cloudId}/rest/api/3/search',
params: {
maxResults: 10
},
providerConfigKey: '<INTEGRATION-ID>',
connectionId: '<CONNECTION-ID>'
});
console.log(JSON.stringify(res.data, null, 2));
Or fetch credentials dynamically via the Node SDK or API.The {connectionConfig.cloudId} in the URL represents the cloudId. You can get this value from your connection configuration after creating the connection. The cloudId is automatically set by Nango.
â
Youâre connected! Check the Logs tab in Nango to inspect requests.Next step: Embed the auth flow in your app to let your users connect their Atlassian Government Cloud accounts. Request access to an AGC developer account
Create a new OAuth 2.0 (3LO) app for Government Cloud
- Go to the AGC 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.
Configure OAuth 2.0 (3LO)
- In the left sidebar, select Authorization.
- Next to OAuth 2.0 (3LO), click Configure.
- Enter
https://api.nango.dev/oauth/callback as the Callback URL.
- Click Save Changes to save your changes.
Add API permissions
- In the left sidebar, select Permissions.
- Next to the API you want to add (e.g., Jira API), click Add.
- Click Configure, then click Edit Scopes.
- Select the scopes your application requires. For reference, see our Common Scopes table below.
- Click Save to save your changes.
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.
Make your app available to users
- In the left sidebar, select Distribution.
- Enable sharing using the toggle switch in the Enable sharing section.
By default, your app is private and can only be used by you. Making it public allows other users to authorize your app.
Common Scopes
| Scope | Description |
|---|
read:jira-user | Read user information |
read:jira-work | Read Jira issues and projects |
write:jira-work | Create and update Jira issues |
manage:jira-project | Manage project settings |
offline_access | Access refresh tokens for offline use |
read:page:confluence | Read Confluence pages |
write:page:confluence | Create or update Confluence pages |
read:confluence-space.summary | View space information |
write:confluence-file | Upload files or attachments |
manage:confluence-configuration | Manage Confluence settings |
- To use the AGC, a customer or entity must be a United States government agency or contractor/vendor working with the United States government.
- When connecting to Atlassian Government Cloud, you have two options for specifying which site to connect to:
- Provide a
Subdomain during connection creation (recommended)
- Let Nango auto-select the first available site: If no
Subdomain is specified, Nango will use the first site from the accessible resources API.
const response = await nango.get({
endpoint: `oauth/token/accessible-resources`
});
const cloudId = response.data[0].id;
-
A single Atlassian OAuth token can grant access to multiple Atlassian products and sites. For example, the same token might grant access to both âmyorg-gov.atlassian.netâ and âmyorg-test-gov.atlassian.netâ. This is why specifying the
Subdomain during connection creation is important if you need to connect to a specific site.
-
The
cloudId is required when making requests to the Jira or Confluence Cloud REST APIs through the global Atlassian domain (https://api.atlassian.com) using OAuth 2.0 (3LO). Nango handles getting this automatically by matching it to your specified subdomain if provided, or by selecting the first available site if it is not. You will then need to construct your Nango integrationâs endpoint accordingly.
-
When using the Atlassian proxy, note that API requests need to be routed through product-specific paths:
- Jira apps use the
/jira/{cloudId}/{api} endpoint.
- Confluence apps use the
/confluence/{cloudId}/{api} endpoint.
-
Refresh tokens will expire after 365 days of non-use and will expire after 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 reference here.
-
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.