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
-> how can i utilize rest apis operations to this local jira instance
Community moderators have prevented the ability to post new answers.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is something to do with data center version. Probably rest/api/3/myself is not supported
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.