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
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
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.
That fixed it, thanks!
It looks like you're new here. Sign in or register to get started.