API Auth suddenly stopped working

Until friday I could get info about my open issues through the REST API with:

curl -D- -u user:pwd -X POST -H "Content-Type: application/json" --data '{"jql":JQL-QUERY}' https://URL.atlassian.net/rest/api/2/search

But now with the exact same api request i get the following error:

HTTP/1.1 401 Unauthorized

What could happened?


1 answer

Try this:

  1. Turn off anything you use to perform API requests
  2. Update your password manually via id.atlassian.com
  3. Update your API tools with the new password
  4. Turn them back on.

I was having the same issue because the API tools would hammer the API and cause a captcha lockout which is not visible via any API request. Logging in via ID will work fine because it bypasses JIRA's internal captcha requirement, so you will never be made aware of it.

Thanks! I change the password and now it is working again but will i have to change the password everytime this issue appear?

This will happen whenever you need to change the password and the automated services continue to hammer the API with the old password resulting in a lockout.

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Feb 15, 2018 in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

1,209 views 6 19
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot