Cause: Token is missing, expired, or lacks the export:markdown:custom scope.
Solutions:
Authorization header format: Bearer YOUR_ACCESS_TOKENexport:markdown:custom and read:forge-app:confluence scopesCause: App REST APIs not enabled on the site, or the OAuth integration is connected to the wrong Forge app or environment.
Solutions:
ENV_ID in your URL matches the environment where the app is installed (dev / staging / production)Cause: The spaceKey or pageId does not exist or is inaccessible to the app.
Solutions:
spaceKey is correct (visible in Confluence space settings)pageId is correct (visible in the page URL or via Confluence REST API)Cause: Unexpected server error in the Forge function.
Solutions:
forge logs -e production
exportId from the response (if available)Cause: An old refresh token was reused after a newer one had already been issued. Atlassian invalidates the entire token chain when this happens.
Solution: Re-authorize from scratch — repeat Step 3 from Getting Started to get a fresh token pair. Going forward, always save and use the latest refresh token returned by each refresh call.
Cause: The export matched no accessible pages.
Solutions:
spaceKey, verify the space has pages visible to the OAuth userpageId with bulkExport: true, verify the page has childrenmaxPages — if set to 1, only the root page is exported with no descendantsCause: The export exceeded the 5 MB Forge platform response limit.
Solutions:
maxPages and paginate by exporting subtrees using specific pageId valuesincludeAttachments to reduce response size