-
Type:
Bug
-
Resolution: Fixed
-
Priority:
High
-
Component/s: Page - Attachments (Image, Video, etc.)
-
None
-
5
-
Minor
-
2
-
Warranty
Issue Summary
Users are unable to download the attachments using the download link obtained from the "Get Attachments for Page" API; a 401 error occurs. While loading the download link in a browser works without any issues, attempts to use the download link with curl or wget, along with basic authentication using an email and API token, result in a 401 error.
Steps to Reproduce
- Utilize the API to retrieve the attachments linked to the page. The API output will be in JSON format and will include download links for the attachments.
- Create a CURL command to download attachments using the provided download link with basic authentication; it will result in a 401 error.
Expected Results
The attachment should be downloadable using API, curl or wget.
Actual Results
401 error occurs
Workaround
Use the V1 API's Get URI to download attachment endpoint:
curl -L --request GET --url "YOUR_SITE/wiki/rest/api/content/PAGE_CONTENT_ID/child/attachment/ATTACHMENT_ID_WITH_ATT_PREFIX/download" --header 'authorization: Basic AUTH_TOKEN_GOES_HERE' --output download.png
- duplicates
-
CONFCLOUD-84472 Confluence Cloud attachment APIs return deprecated/non-functional downloadLink URLs
-
- Closed
-
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...