Forums

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

Using API Token - Stuck at "Unauthorized (401)"

Chuck Youngfeldt September 15, 2018

I'm running Jira 7.3.8

I've created an API Token but am unable to get past an "Unauthorized 401"

I have read through, and tried dozens of solutions brought up in communities but still have not gotten success.

I've tried both syntax version with 

  -u <username>:<api token> .  as well as
  -H "Authorization: Basic <base64 encoded username:apiToken> 

Still, I receive the 401 denial. 

Any/all help appreciated !

1 answer

0 votes
Chuck Youngfeldt September 15, 2018

Note, I was using -u <email>:<api token>  and getting 401

I switched to -u <username>:<api token> and now I get 403

progress?

Chuck Youngfeldt September 15, 2018

All I am trying to do is retrieve an issue that I created in JIRA.

Is is possible that there is a jira configuration not allowing the API token the same permissions my userid when logged in ?

Nir Haimov
Community Champion
September 16, 2018

Try --> Authorization: Basic <base64 encoded username:password>

(instead of API Token)

Chuck Youngfeldt September 17, 2018

Thanks for the suggestion. That also resulted in 403.

I should also mention that my access is vai OAuth though OneLogin with DUO for MFA.

According to the documentation I read, because I'm using MFA, I need to use an apitoken for access.

 

I feel like I made progress from 401 when using my email (which may mean it did not auuthenticate me) to a 403 when using username and apitoken or password, which seems to be authenticated but dissallowed.

Not sure if I'm interpreting this right.

End of day, I'd just love to get some success calling Jira REST interface.

Suggest an answer

Log in or Sign up to answer