Download attachment from Confluence page

I am trying to download the file attachments of a Confluence page, using 3LO and rest api v2.

What I’ve tried:

  1. I have all the permissions/scopes needed.
  2. I get the list of the attachments of a page from:{cloudID}/wiki/api/v2/pages/{pageID}/attachments
  3. From endpoint (2), I get the downloadLink as described here:
  4. Then I tried every possible combination of endpoints to get the file, but they all fail with:
    code: 401 message: Unauthorized; scope does not match or 404 not found

Endpoints I tried to grab the file:


Nothings works!

How can I download the attachment of a page using api v2 with an authenticated app?


I’m no expert but saw your post and do have this working. Take a look at:

Specifically, I think you need to use the V1 endpoint added specifically for downloading the content using OAuth (no V2 version that I can see):

Apologies if I’m misinterpreting your question!


Thank you @MarkSpooner , yes I’m aware that with v1 it’s possible, that is what I’m currently doing to get the files. I was wondering about v2, and if I was missing something obvious using it.
Thank you.


The V2 API is not a complete replacement for V1. So not everything exists in the V2 API. Please continue to to use the V1 API for attachments.

1 Like