Forums

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

How can I add attachment to jira issue.I have a problem returne the jason code XSRF check faild

Illya Yakovlev
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!
May 17, 2020

a

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 26, 2020

Hi Illya,

If I understand correctly here, it looks like you are using the unirest library to make a REST API call to Jira Cloud in order to add an attachment, however this appears to be failing with a 404 error code here.

I would expect that you would be trying to call the endpoint POST /rest/api/3/issue/{issueIdOrKey}/attachments in order to add an attachment to an issue in Jira Cloud.  However I'm not sure if that is what you are using here, nor can I tell the specifics of how your call is attempting to authenticate this request.

Are you using Basic Auth for this REST API call to Jira Cloud?  If so, then you will need to encode your email_address:API_token into a base64 encoded string and then use that string in an authorization header along with your request. 

I am interested to learn more about the specifics of your call in order to understand better the possible causes of this error message.  Please let me know.

Andy

Illya Yakovlev
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!
May 31, 2020

Thanks, solved.

Suggest an answer

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

Atlassian Community Events