Dear all,
I got myself an API token and tried to run this:
I get
jiraone.exceptions.JiraOneErrors: <JiraOneError: Authentication failed. Please check your credentials. Reason: Unauthorized>
The user that generated the API key has full access. I tried it with two different keys. One full one, one scoped one. Maybe the API key is not what I should paste as "password" into the config.json? If so, how do I turn the API key into the right "password"?
Best,
Wolfgang
Welcome to the community!
Yes, the API token itself is what normally replaces the password for Jira Cloud basic auth, so you should not “convert” it into some other password value.
For Jira Cloud basic auth, the username is your Atlassian account email and the password is the raw API token.
So my first test would be:
- generate a classic token with no scopes
- try a simple REST call with your email + raw token
- if that works, the problem is probably the example/library setup rather than your account permissions
Hello and welcome to the Community @Wolfgang Müller
I think @Ajay _view26_ is already on the right track with the token part
For Jira Cloud basic auth, the password value is simply the raw API token. There is nothing to convert there. Atlassian’s current auth docs still describe basic auth as email + API token, and the jiraone article uses that same approach in its example config.
The part I would double-check is whether you created a scoped token or a classic/unscoped one. Atlassian now distinguishes between those, and scoped tokens are not always a drop-in replacement for older examples or tools.
Please test it in this order:
- use your Atlassian account email
- use the raw API token as the password
- first try a very simple REST call outside the script/tool
If that works, then the credentials are fine and the issue is probably with the example or the library and not with the token itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.