Forums

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

REST API Endpoint Throwing 401 error on Create Issue

sbbdev
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!
August 23, 2019

I am looking into an issue on one of our applications that uses the REST api to create a new issue as part of a project. We pass over a payload that consists of summary and description.

 

The JSON payload appears to be formatted correctly, but the response status code is 401.

Debug Logs:

14:31:00.1 (26726539)|SYSTEM_METHOD_ENTRY|[34]|System.Http.send(ANY)


14:31:00.1 (26778416)|CALLOUT_REQUEST|[34]|System.HttpRequest[Endpoint=https://mycompany.jira.com/rest/api/3/issue, Method=POST]


14:31:00.1 (679209449)|CALLOUT_RESPONSE|[34]|System.HttpResponse[Status=null, StatusCode=401]

{
"fields": {
"project": {
"id": "17074"
},
"summary": "Testing Submission - \"Please ignore\"",
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "What is the problem that needs to be solved?\n* some\n* bullet\n** indented\n** bullets\n* points\n\n- different\n- bullet\n- types\n\nSome Text goes here.\n\n[Test1|http://yahoo.com]\n[Test2|https://www.google.com]\n\nWho is going to be using this?\nwh\nAdditional information:\nad\n"
}
]
}
]
},
"issuetype": {
"name": "Task"
},
"reporter": {
"name": "someusername"
}
}
}

Is there something in my summary text that is breaking this submission that isn't escaped correctly?

 

1 answer

0 votes
DPKJ
Community Champion
August 23, 2019

Response 401 implies authentication issue.

Also if you are building App have you checked that you have "WRITE" scope.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events