Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • Getting XSRF check failed when trying to upload same attachment to multiple issues using REST API

Getting XSRF check failed when trying to upload same attachment to multiple issues using REST API

Tekur HS May 27, 2020

Hi,

I have a custom solution that use JIRA REST API to create issue and also upload attachment to a JIRA PA. In one of my scenarios i have had to upload an attachment to multiple issues in JIRA. This is where the XSRF issue occurs, when creating the first issue i am able to see that there is no issue in uploading the attachment, when processing the second issue, i get the Http Response of Not Found and the Response content saying XSRF check failed.

I have searched the issue and found few similar questions where it is suggested to add the Header "X-Atlassian-Token:no-check" to my POST call, but i already have this header added to my call.

Any help in this issue would be appreciated.

Thanks,

1 answer

0 votes
Michael Raj July 30, 2020

Hi @Tekur HS ,

did you try to add a header with Origin?

With POST requests via XMLHttp I use something like this:

setRequestHeader "Origin", "https://{yourJiraServerAddress}.com"

 

Best,

Michael

Suggest an answer

Log in or Sign up to answer