Unauthorized 401 error to admin user

I am now trying to use jira rest api. And I follow https://confluence.atlassian.com/display/DOCSPRINT/The+Simplest+Possible+JIRA+REST+Examples.

I already enable Remote API.

I have right to acces the project and also create issue.I created new issue and try to call from the jira rest api .When I call the rest api https://mycompany.atlassian.net/jira/rest/api/2/issue/APP-1.json from the browser, I get json reply .

But when I try to access using curl

curl -u User 2:password https://mycompany.atlassian.net/jira/rest/api/2/issue/APP-1.json, I get unauthorized 401 error.

My username includes whitespace like 'User 2'.Is this one cause that error?Can I use email instead of username?

My OS is Window7 32. could Anyone help me ,please?I really need help!

2 answers

This widget could not be displayed.

I found that the problem is whitespace .Anyone know how to pass username with white space to jira api?

This widget could not be displayed.

Hi Seint,

You can try with a plus sign, like: User+2.

Best regards,

Felipe Alencastro

Hi Felipe,

Thank you !.But adding a plus sign ,still unauthorized. so I changed to new user .

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

171 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you