The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

401 Unauthroized error when running curl GET API command on my localhost

craig lemay
October 16, 2017

Hello all, I'm trying to run a simple GET request through the JIRA API. However, every time I run the code, I am getting a 401 Unauthorized error, despite using my admin username password.

What am I missing in my snippet in order to give authorization?

Here is the snipped of what I'm using:

curl -D- -u user:userPassword -X GET -H "Content-Type: application/json" "http://localhost:8080/rest/api/2/user?username=selectedUser

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 16, 2017

Everything looks good. There is an extra double quotes before your url but I am guessing that is a typo.

Make sure your username and password is correct. Can't think of any other issues.

craig lemay
October 23, 2017

That fixed it, thanks!

TAGS
AUG Leaders

Atlassian Community Events