how can i get attachement(img) with oauth token?

GeunCheol Yeom July 2, 2021

Hi. I'm trying to get image from confluence contents.

 

I made some app and i using oauth2.0 for user auth.

 

So.. i want  take attachement(img) like this url.

 

 

curl --location --request GET 'https://DOMAIN.atlassian.net/wiki/download/attachments/14778479/image-20210317-174604.png?version=1&modificationDate=1616599854340&cacheVersion=1&api=v2 ' \
--header 'Authorization: Bearer somethingoauthtoken'

 

but i got response 

Encountered a 401 - Unauthorized error while loading this page.

 

what scope should i set?

 

i already set scopes

'read:confluence-space.summary read:confluence-content.all read:confluence-content.summary read:confluence-props'

 

or isn't it possible get image with oauth bearer token?

1 answer

1 accepted

0 votes
Answer accepted
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 5, 2021

Hello @GeunCheol Yeom,

Welcome to Atlassian Community. It's nice to meet you.

First, I recommend you review the following Atlassian Developer articles if you have not already.

This Community is more for end-users, so if you still encounter any problems, I recommend raising this topic with our Atlassian Developer Community. They are better suited to assist with these types of questions. 

Thanks again, and take care!

Shannon

GeunCheol Yeom July 6, 2021

ahh thanks alot. I'll re ask about it

Like Shannon S likes this
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 7, 2021

You're welcome! I hope it helps. smile

Take care,

Shannon

Suggest an answer

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

Atlassian Community Events