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 Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Mar 09, 2018 in Jira Service Desk

E.L. Fridge's take on education, Jira Service Desk, and creative Jira use cases

...word of mouth, so by 2016, we were working with several other entities on campus to implement Jira Service Desk . The Atlassian motto of “for every team” has really come true for us in this case. We...

970 views 2 14
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