How can I download confluence attachment with Oauth 2.0 3LO

Anuja Deshpande September 18, 2020

2 answers

0 votes
Emre Teomete
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 11, 2023

Is there any solution to solve this issue?

0 votes
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 18, 2020

Please explain how you attempted to download this attachment.

  • In a browser, in the same session as your Confluence Cloud instance?
  • Programmatically with curl or something similar?

What are the steps to reproduce your situation?

Anuja Deshpande September 18, 2020

@David at David Simpson Apps 
I want to do it programmatically , I tried to hit this API/request from the postman with Oauth 2.0 3LO access token.

Step 1: 

I hit this API : https://api.atlassian.com/ex/confluence/{cloudId}/rest/api/content/{pageId}?expand=children.comment,children.attachment

received `downloadUrl` : `download/attachments/684556356/Screen%20Shot%202019-10-11%20at%203.19.28%20PM.png?version=1&modificationDate=157787674135&cacheVersion=1&api=v2`

and tried hitting this received url with postman using Oauth 2.0 access token

Anuja Deshpande September 18, 2020

I just want to know the API for downloading attachments using API and Oauth2.0 3LO access token.

Anuja Deshpande September 18, 2020

@David at David Simpson Apps 

I tried doing it using API (using Postman)
to reproduce follow these steps
1. Get attachments for given page id
API that I used: `https://api.atlassian.com/ex/confluence/{cloudId}/rest/api/content/{pageId}?expand=children.comment,children.attachment`

2. received download url in API response as : `download/attachments/684556356/Screen%20Shot%202019-10-11%20at%203.19.28%20PM.png?version=1&modificationDate=157787674135&cacheVersion=1&api=v2`

Tried to this with Oauth 2.0 3LO access token.
but received 401
what would be the base Url 
I tried using : https://api.atlassian.com/ex/confluence/{cloudId}/rest/api/

Anuja Deshpande September 18, 2020

I tried hitting this request on postman with Oauth 2.0 3LO access token
1. sent API request for get page attachment
2. received download url in response 
3. tried to hit this using Oauth 2.0 access token 

Anuja Deshpande September 18, 2020
Danila Zharenkov November 2, 2020

@Anuja Deshpande did you find any solution for that?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events