We are migrating our app from Connect to Forge and we are looking the way to download attachment thumbnail using system/user token provided by Forge. Similar to
Community moderators have prevented the ability to post new answers.
You can try using the Forge REST API endpoint for attachments with query parameters to request a thumbnail. Typically, Forge doesn’t provide a dedicated “thumbnail” endpoint like Jira Cloud REST, but you can use the GET /wiki/rest/api/content/{id}/child/attachment/{attachmentId} endpoint and inspect the metadata or mediaType fields. Many attachments include a representation object with a thumbnail URL you can fetch directly using the same Forge auth token.
Make sure your app has the read:confluence-content or read:confluence-user scopes depending on whether it’s a system or user token.
If the attachment doesn’t include a thumbnail automatically, you may need to generate it server-side after downloading the full attachment.
There is no `read:confluence-content` scope permission, maybe `read:confluence-content.all`? My test permissions scopes are:
read:app-user-token: {}
read:app-system-token: {}
read:content:confluence: {}
read:content-details:confluence: {}
read:page:confluence: {}
read:blogpost:confluence: {}
read:attachment:confluence: {}
read:confluence-content.summary: {}
read:confluence-content.all: {}
readonly:content.attachment:confluence: {}
read:hierarchical-content:confluence: {}
read:space:confluence: {}
`GET /wiki/rest/api/content/{id}/child/attachment/{attachmentId} ` returns `405 Method Not Allowed` when invoked from a web browser and `401 Unauthorized; scope does not match` when called with Forge system token either from `GET https://api.atlassian.com/ex/confluence/{cloudId}/rest/api/content/{contentId}/child/attachment/{attachmentId}` or `GET https://api.atlassian.com/ex/confluence/{cloudId}/wiki/rest/api/content/{contentId}/child/attachment/{attachmentId}`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.