Forums

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

Automation with Jira Server: 401 Error with Bearer/Basic Web Request

nicholas kurtz May 1, 2024

I'm attempting to build an automation which would allow for updating an Epic's Original Time and Remaining Time based on the values associated with their stories. I'm having an issue though because when I do a web request I'm getting a 401 error regardless of whether I'm using a bearer or basic authentication method. I know that I have access to this Epic and its Stories.

This is my request.

 

Screenshot 2024-05-01 152418.png

 

I'm getting a 401 error when I attempt to use it. I've used both Bearer and Basic Auth methods. Bearer with my PAT and Basic with a base64 encoded username:password. I'm not sure why I'm having this error and I would appreciate any assistance.

 

Screenshot 2024-05-01 152852.png

1 answer

1 accepted

1 vote
Answer accepted
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 1, 2024

Hello @nicholas kurtz 

In Data center, Bearer<space>PAT is the correct way. (Basic + base64 encoding is only for Cloud. Also, you dont need to pass additional headers to the API, so remove Application/Json entry.) 

Finally, instead of trying endpoints with smart values like you are doing,  replace the URL with generic end point, like below:

https://yourdomain.net/rest/api/2/projectCategory

And click validate with out passing any argument to verify your credentials are good and you are seeing 200.

Hope it helps.

nicholas kurtz May 2, 2024

Yes thank you. Working with a bearer token does fix the issue and I'm able to authenticate. 

Like Kalyan Sattaluri likes this

Suggest an answer

Log in or Sign up to answer