Forums

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

Axios PUT Request: XSRF-Check Failed

wolfbiker_1
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!
October 12, 2020

Hello everybody,

 

i want to modify Jira Ticket descriptions from my ReactJS Application. Therefore I figured out how to connect to Jira with the RestAPI - no problem so far, I used the tool Insomnia to check the database endpoint. Everything went fine. The description gets updated, the Server response is 200.

When doing so from my React App i use the following code:

 axios.put(url, {
method: 'put',
headers: {

'Authorization': `Basic ${token}`,
'X-Atlassian-Token': 'no-check',
'content-type': 'application/json'
},
data: {

"fields": {
"description": "foo bar \r\n\r\n\r\n"
}
}
})

 

When doing so from my React APP, everything i get is the following:

Error 403 - "XSRF check failed"

So I suspect that something with the header is wrong, because this error is usually a sign, that the AtlassianToken isn't set. Request_Header.png

Can somebody see what's going on here? Obviously, the header information doesn't reach the server.
Here is the Server Response:

 

Response_1.pngResponse_2.png

Thans in advance!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events