
Documentation
Markdown Exporter for ConfluenceBrowse
Documentation
Markdown Exporter for ConfluenceGetting Started with the REST API
Setting up API access requires three one-time steps: enabling the feature on your Atlassian site, creating an OAuth 2.0 integration and connecting it to the app, then completing the authorization flow to obtain an access token.
Note: App REST APIs on Forge are disabled by default and must be explicitly enabled by a site or org admin. See the official Atlassian documentation for a full walkthrough.
Step 1 — Enable App REST APIs (site admin)
This step must be completed by a site or org admin and only needs to be done once per Confluence site.
- Go to the Manage apps section in your Atlassian admin panel and find Markdown Exporter for Confluence
- Click View app details
- Open the Details tab and locate the App REST APIs section
- Toggle it on to enable
Once enabled, the base URL for the API is displayed under this toggle.
Step 2 — Create an OAuth 2.0 Integration
Only site members can create OAuth 2.0 integrations that connect to that site's Forge app APIs.
Create the integration
- Go to developer.atlassian.com/console
- Click Create → OAuth 2.0 integration and give it a name (e.g.
Markdown Exporter API)
Connect it to Markdown Exporter
- Open the Permissions section of your new integration
- Click Add Marketplace or custom app
- Select the site where Markdown Exporter is installed
- Select Markdown Exporter for Confluence and the environment from the list
- Add the scope:
export:markdown:custom - Click Add
- Still under Permissions, also add the Confluence product scope:
read:forge-app:confluence
Both scopes must be present before you authorize. Use only the minimum scopes required.
Configure the callback URL
- Go to the Authorization section
- Add your callback URL. For quick testing,
https://httpbin.org/anythingworks — the auth code will appear in the redirect response JSON.
Step 3 — Authorize and Obtain Tokens
Get the authorization URL
- In the Authorization section of your integration, locate the authorization URL generated for the Markdown Exporter entry
- Copy that URL and open it in a browser
- On the consent screen, select the site and click Accept
- You will be redirected to your callback URL — copy the
codequery parameter from the URL
If you need
offline_access(refresh token for automated pipelines), append%20offline_accessto thescopeparameter in the authorization URL before opening it.
Exchange the code for tokens
curl --request POST \
--url 'https://auth.atlassian.com/oauth/token' \
--header 'Content-Type: application/json' \
--data '{
"grant_type": "authorization_code",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"code": "CODE_FROM_REDIRECT",
"redirect_uri": "YOUR_CALLBACK_URL"
}'
Your Client ID and Client Secret are available in the Settings tab of your OAuth integration.
Response:
{
"access_token": "eyJ...",
"refresh_token": "eyJ...",
"expires_in": 3600,
"token_type": "Bearer"
}
Store both tokens. The access_token is valid for 1 hour. Use the refresh_token to obtain new access tokens without user interaction — see Authentication for rotation details.
Step 4 — Find Your Cloud ID
Your Cloud ID is required to construct the API URL:
GET https://your-site.atlassian.net/_edge/tenant_info
It is also displayed in the REST API tab inside the app settings: Confluence Admin → Apps → Markdown Exporter → REST API.
Step 5 — Make Your First Request
Two URL formats are supported:
https://api.atlassian.com/svc/confluence/{cloudId}/apps/{appId}_{envId}/{path}
https://{site-name}/gateway/api/svc/confluence/apps/{appId}_{envId}/{path}
App IDs
| Field | Value |
|---|---|
| App ID | 0def1d4f-1593-4dd0-99a3-a098b3959067 |
| Production env ID | 796457c9-9c03-4382-b44f-d19571068ece |
| Staging env ID | 73c9d7be-47c5-479a-b08d-14fb79453df8 |
| Dev env ID | 08a10a13-932b-47bb-b760-0cc1e93d4a50 |
Export a single page
curl --request POST \
--url "https://api.atlassian.com/svc/confluence/{cloudId}/apps/0def1d4f-1593-4dd0-99a3-a098b3959067_796457c9-9c03-4382-b44f-d19571068ece/singleExport" \
--header "Authorization: Bearer YOUR_ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"pageId": "123456"}' \
> my-page.md
A successful response returns the page's Markdown content as plain text.
Next Steps
- Authentication — Token rotation and long-running automation
- API Reference — Full endpoint documentation
- Examples — Ready-to-use code samples
- Atlassian official tutorial — Accessing REST APIs exposed by a Forge app
Guides for Markdown Exporter for Confluence
Stuck on something this page does not cover? Ask the developers.