Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Attachments coming in comment section

muhammad August 14, 2023

Hi,

 

I do have attachments coming in the issue, in the attachment object, some of the attachments are for the comments which I don't know how to link those attachments with their specific comments. 

 

The ID I'm getting in comments section for that attachments is not an actually integer id for the attachment so that i cannot use /attachment/ endpoint here at all. 

 

I tried to use the solution to fetch using binary

https://community.atlassian.com/t5/Jira-questions/Linking-inline-image-to-attachment-using-API/qaq-p/1980564#M555940

 

But no its giving me error that its forbidden. I'm using my same jira api credentials. 

14.08.2023_12.53.44_REC.png

1 answer

0 votes
Jehan Bhathena
Community Champion
August 14, 2023

Hi,

I'm assuming you're using basic auth for this API

Try using the bearer token instead, perhaps that would work.

muhammad August 14, 2023

@Jehan Bhathena  I have tried this with bearer token too, but still giving forbidden.

14.08.2023_14.39.16_REC.png

Jehan Bhathena
Community Champion
August 14, 2023

I used a similar workaround for a different api in the past, for any API that isn't available in the Jira documentation you need to pass the cookie as the auth.

Login to your browser session and copy the cookie from there, perhaps that might work.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events