Forums

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

401 Errors When Connecting to Jira Data Center 10.3.4 Locally via REST API using PAT

Jeel March 12, 2025

 

 

I’m trying to connect to a local Jira Data Center instance (version 10.3.4) running on http://localhost:8080 from a Node.js Express app running on http://localhost:5000. My goal is to authenticate using either a Personal Access Token (PAT) However, I keep getting 401 Unauthorized with PAT. I’m testing locally as an admin user, and I can log into Jira via the browser, but the API calls fail.

Setup

  • Jira: Data Center 10.3.4 on http://localhost:8080 (local install).
  • Route: GET to fetch user info via /rest/api/3/myself.
  • Authentication Tried:
    • PAT with Authorization: Bearer <pat> (401 error).
  • User: Admin with full permissions (can log in via UI and create PATs).
  • using this jira local instance under free license.

-> how can i utilize rest apis operations to this local jira instance

1 answer

0 votes
Vishal Biyani
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.
March 12, 2025

@Jeel 

Can you try to pass PAT in the header as part of your json payload?

Authorization: Bearer <PAT>

 

See this link for more details

 

Using Personal Access Tokens | Atlassian Support | Atlassian Documentation

Jeel March 12, 2025

thanks for the guide @Vishal Biyani 

I figure out the issue but don't know why this happening. If I use the rest/api/2/myself end-point that it gives expected json response but if I use rest/api/3/myself than I got html page as a response with 200. 

Vishal Biyani
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.
March 12, 2025

This is something to do with data center version. Probably rest/api/3/myself is not supported

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
10.3.4
TAGS
AUG Leaders

Atlassian Community Events