Hi,
I'm using OAuth 2.0 to login users to Confluence. I want to get content of pages with attachments.
To get attachments info i use this method:
https://api.atlassian.com/ex/confluence/{cloud_id}/wiki/rest/api/content/{content_id}/child/attachment
response is like this:
"_links": {
"webui": "/pages/viewpageattachments.action?pageId=xxx&preview=zzz",
"self": "https://aaa.atlassian.net/wiki/rest/api/content/ccc",
"download": "/download/attachments/{attachments_id}/{file_name}?version=1&modificat
ionDate=1744797121672&cacheVersion=1&api=v2"
}
I trying to use this download url and construct API call but nothing is working. I tried multiple prefixes like https://api.atlassian.com or myconflience.atlassian.com and non of them are working. I'm can find multiple post from 2021 from people claiming they also have problems with it but i'm not sure it was fixed.
regards
Method you provided do not allow to download attachment, it only returns metadata.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are right. I thought it was the method you were using to get the attachments. Not sure if that will help you, but I've seen that using "https://yourdomain.atlassian.net/wiki" before download link, starts downloading in browser straight away. Not sure how it's going to behave while running from script.
https://yourdomain.atlassian.net/wiki/download/attachments/{attachments_id}/{file_name}?version=1&modificationDate=1744797121672&cacheVersion=1&api=v2"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://yourdomain.atlassian.net/wiki/download/attachments/{attachments_id}/{file_name}?version=1&modificationDate=1744797121672&cacheVersion=1&api=v2"
In Postman call this return me login page in html even if i attached Access token.
When i tried this link in browser it went in to some infinite look of redirects.
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.