Downloading attachment content using OAuth 2


Apologies if I’m missing something obvious but I can’t seem to find a way to download the content of an attachment using the data center API via OAuth 2. I’m looking for something similar to the Confluence Cloud API call:
as per cloud related discussions such as:

but for Confluence Data Center.
The only APIs I can see for attachments are returning the meta-data of the attachment. Programatically following the links to the content returned here using OAuth 2.0 just returns a page stating that my logged in user (the token user) doesnt have permission to access the resource although when I view the relevant page as that user I can see it fine. Interestingly if I try the same thing using a Personal Access Token it worls.

I’ve tried a few combinations of the above cloud API call on our 7.19.0 data-center instance but to no avail.



1 Like

As it happens, I’m working on something similar and running into the same challenge. The Personal Access Token approach wouldn’t be really viable in our case.

Is there any way around this using the OAuth 2.0 authentication flow?

Although no-one has responded here, it seems that this is not yet implemented for DC, please vote for this issue if you’d like this supported: