Forums

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

Why Keep Getting 401 Error when accessing API

Mohammad Hariri January 25, 2024

Fighting this for days now. Using standard code in the API documentation here to get a list of projects for my account. Not sure what to do. Have tried the following alternate methods including:

1) Atlassian Python Library

2) Jira Python Library

3) Requests Python Library

4) Postman

Are there any settings when you create the token which I have missed? 

1 answer

0 votes
Nikola Perisic
Community Champion
January 25, 2024

Hello @Mohammad Hariri ,

I am using Postman to make the API calls. You would need to go to the Authorization page:

Screenshot 2024-01-25 at 15.44.19.png

Then you would need to choose the "Basic auth" from the dropdown menu.

After that do the following:

  • For the username enter your email address that your Atlassian account is associated with (this counts even if you have used Google, Microsoft way of SSO)
  • For the password, you need to generate your Jira API key:Screenshot 2024-01-25 at 15.49.09.png

Then use this key as the password, and click on the "Save" button in Postman, so it can authenticate.

Mohammad Hariri January 25, 2024

Thank you for the suggestion. I have tried it and still the same error. I am wondering if there is a setting on the server side to enable API access. Any ideas?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events